diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3491a85f6..c1ac0581f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,7 +20,7 @@ jobs: with: linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" - linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" + linux_6_0_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 92fcde88a..0f334ed51 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -12,7 +12,7 @@ jobs: with: linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" - linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error" + linux_6_0_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error" linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" diff --git a/Benchmarks/Thresholds/6.0/NIOCoreBenchmarks.NIOAsyncChannel.init.p90.json b/Benchmarks/Thresholds/6.0/NIOCoreBenchmarks.NIOAsyncChannel.init.p90.json new file mode 100644 index 000000000..ec2d0ad0f --- /dev/null +++ b/Benchmarks/Thresholds/6.0/NIOCoreBenchmarks.NIOAsyncChannel.init.p90.json @@ -0,0 +1,3 @@ +{ + "mallocCountTotal" : 8000 +} \ No newline at end of file diff --git a/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEcho.p90.json b/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEcho.p90.json new file mode 100644 index 000000000..67abcf36a --- /dev/null +++ b/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEcho.p90.json @@ -0,0 +1,3 @@ +{ + "mallocCountTotal" : 548 +} diff --git a/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEchoAsyncChannel.p90.json b/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEchoAsyncChannel.p90.json new file mode 100644 index 000000000..390ed2415 --- /dev/null +++ b/Benchmarks/Thresholds/6.0/NIOPosixBenchmarks.TCPEchoAsyncChannel.p90.json @@ -0,0 +1,3 @@ +{ + "mallocCountTotal" : 164376 +} \ No newline at end of file diff --git a/dev/stackdiff-dtrace.py b/dev/stackdiff-dtrace.py index 0394d9dab..6f95335f5 100755 --- a/dev/stackdiff-dtrace.py +++ b/dev/stackdiff-dtrace.py @@ -13,18 +13,19 @@ ## ##===----------------------------------------------------------------------===## -import sys -import re import collections +import re +import sys num_regex = "^ +([0-9]+)$" + def put_in_dict(path): # Our input looks something like: # # ===== # This will collect stack shots of allocations and print it when you exit dtrace. - # So go ahead, run your tests and then press Ctrl+C in this window to see the aggregated result + # So go ahead, run your tests and then press Ctrl+C in this window to see the aggregated result # noqa: E501 # ===== # DEBUG: After waiting 1 times, we quiesced to unfreeds=744 # test_1_reqs_1000_conn.total_allocations: 490000 @@ -39,11 +40,11 @@ def put_in_dict(path): # libswiftCore.dylib`swift_allocObject+0x27 # test_1_reqs_1000_conn`closure #3 in SelectableEventLoop.run()+0x166 # test_1_reqs_1000_conn`SelectableEventLoop.run()+0x234 - # test_1_reqs_1000_conn`closure #1 in static MultiThreadedEventLoopGroup.setupThreadAndEventLoop(name:selectorFactory:initializer:)+0x12e - # test_1_reqs_1000_conn`partial apply for closure #1 in static MultiThreadedEventLoopGroup.setupThreadAndEventLoop(name:selectorFactory:initializer:)+0x25 - # test_1_reqs_1000_conn`thunk for @escaping @callee_guaranteed (@guaranteed NIOThread) -> ()+0xf - # test_1_reqs_1000_conn`partial apply for thunk for @escaping @callee_guaranteed (@guaranteed NIOThread) -> ()+0x11 - # test_1_reqs_1000_conn`closure #1 in static ThreadOpsPosix.run(handle:args:detachThread:)+0x1c9 + # test_1_reqs_1000_conn`closure #1 in static MultiThreadedEventLoopGroup.setupThreadAndEventLoop(name:selectorFactory:initializer:)+0x12e # noqa: E501 + # test_1_reqs_1000_conn`partial apply for closure #1 in static MultiThreadedEventLoopGroup.setupThreadAndEventLoop(name:selectorFactory:initializer:)+0x25 # noqa: E501 + # test_1_reqs_1000_conn`thunk for @escaping @callee_guaranteed (@guaranteed NIOThread) -> ()+0xf # noqa: E501 + # test_1_reqs_1000_conn`partial apply for thunk for @escaping @callee_guaranteed (@guaranteed NIOThread) -> ()+0x11 # noqa: E501 + # test_1_reqs_1000_conn`closure #1 in static ThreadOpsPosix.run(handle:args:detachThread:)+0x1c9 # noqa: E501 # libsystem_pthread.dylib`_pthread_start+0xe0 # libsystem_pthread.dylib`thread_start+0xf # 85945 @@ -71,7 +72,7 @@ def put_in_dict(path): key = "\n".join(line.split("+")[0] for line in current_stack[:8]) # Record this stack and reset our state to build a new one. - dictionary[key].append( (int(line), "\n".join(current_stack)) ) + dictionary[key].append((int(line), "\n".join(current_stack))) current_stack = [] else: # This line doesn't contain just a number. This might be an @@ -82,9 +83,11 @@ def put_in_dict(path): return dictionary + def total_count_for_key(d, key): value = d[key] - return sum(map(lambda x : x[0], value)) + return sum(map(lambda x: x[0], value)) + def total_for_dictionary(d): total = 0 @@ -92,6 +95,7 @@ def total_for_dictionary(d): total += total_count_for_key(d, k) return total + def extract_useful_keys(d): keys = set() for k in d.keys(): @@ -99,6 +103,7 @@ def extract_useful_keys(d): keys.add(k) return keys + def print_dictionary_member(d, key): print(total_count_for_key(d, key)) print(key) @@ -106,6 +111,7 @@ def print_dictionary_member(d, key): print_dictionary_member_detail(d, key) print() + def print_dictionary_member_detail(d, key): value = d[key] for (count, stack) in value: @@ -128,6 +134,7 @@ def usage(): print(" # diff them") print(" stackdiff-dtrace.py /tmp/old /tmp/new") + if len(sys.argv) != 3: usage() sys.exit(1) @@ -173,5 +180,4 @@ for x in sorted(list(useful_before_keys & useful_after_keys)): everything_before = total_for_dictionary(before_dict) everything_after = total_for_dictionary(after_dict) -print("Total of _EVERYTHING_ BEFORE: %d, AFTER: %d, DIFFERENCE: %d" % - (everything_before, everything_after, everything_after - everything_before)) +print("Total of _EVERYTHING_ BEFORE: %d, AFTER: %d, DIFFERENCE: %d" % (everything_before, everything_after, everything_after - everything_before)) # noqa: E501