Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: perf_tests: remove [[gnu::always_inline]] attribute from corout…
…ine perf tests Unfortunately, gcc (11.2.1) emits the following error: ``` In file included from ../../tests/perf/coroutine_perf.cc:22: ../../include/seastar/testing/perf_tests.hh:367:37: error: 'always_inline' function might not be inlinable [-Werror=attributes] 367 | [[gnu::always_inline]] future<> test_##test_group##_##test_case::run() ``` This change removes the attribute and lets the compiler decide about inlining the coroutine. The results for gcc are: test iterations median mad min max allocs tasks inst coroutine_test.empty 99179641 10.016ns 0.004ns 10.012ns 10.048ns 1.000 0.000 190.0 coroutine_test.without_preemption_check 90490151 11.131ns 0.021ns 11.049ns 11.151ns 1.000 0.000 209.0 coroutine_test.ready 86973367 11.469ns 0.009ns 11.451ns 11.502ns 1.000 0.000 218.0 coroutine_test.maybe_yield 92291054 10.829ns 0.002ns 10.822ns 10.948ns 1.000 0.000 200.0 And for clang: before: coroutine_test.empty 293173628 3.414ns 0.004ns 3.404ns 3.420ns 0.000 0.000 58.0 coroutine_test.without_preemption_check 292630550 3.400ns 0.001ns 3.399ns 3.419ns 0.000 0.000 58.0 coroutine_test.ready 82969765 12.059ns 0.016ns 12.043ns 12.145ns 1.000 0.000 233.0 coroutine_test.maybe_yield 86828070 11.506ns 0.009ns 11.489ns 11.515ns 1.000 0.000 206.0 after: coroutine_test.empty 314302789 3.181ns 0.002ns 3.180ns 3.239ns 0.000 0.000 58.0 coroutine_test.without_preemption_check 314361925 3.386ns 0.002ns 3.384ns 3.465ns 0.000 0.000 58.0 coroutine_test.ready 83549195 11.963ns 0.002ns 11.961ns 11.968ns 1.000 0.000 229.0 coroutine_test.maybe_yield 87337650 11.431ns 0.005ns 11.426ns 11.451ns 1.000 0.000 202.0 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Message-Id: <20220415061254.186016-1-bhalevy@scylladb.com>
- Loading branch information