File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -608,21 +608,25 @@ function generate_benchmark_definition(
608
608
)
609
609
610
610
try
611
- @noinline $ (setup)
611
+ $ BenchmarkTools . @noinline $ (setup)
612
612
__evals = __params. evals
613
613
# Isolate code so that e.g. setup doesn't cause different code to be generated by e.g. changing register allocation
614
614
# Unfortunately it still does, e.g. if you define a variable in setup then it's passed into invocation adding a few instructions
615
- @noinline (function (__evals)
616
- $ LinuxPerf. enable_all! ()
617
- # We'll run it evals times.
618
- @noinline __return_val_2 = $ (invocation)
619
- for __iter in 2 : __evals
620
- @noinline $ (invocation)
615
+ $ BenchmarkTools. @noinline (
616
+ function (__evals)
617
+ $ LinuxPerf. enable_all! ()
618
+ # We'll run it evals times.
619
+ $ BenchmarkTools. @noinline __return_val_2 = $ (invocation)
620
+ for __iter in 2 : __evals
621
+ $ BenchmarkTools. @noinline $ (invocation)
622
+ end
623
+ $ LinuxPerf. disable_all! ()
624
+ # trick the compiler not to eliminate the code
625
+ return __return_val_2
621
626
end
622
- $ LinuxPerf. disable_all! ()
623
- # trick the compiler not to eliminate the code
624
- return __return_val_2
625
- end )(__evals)
627
+ )(
628
+ __evals
629
+ )
626
630
return $ LinuxPerf. Stats (__linux_perf_bench)
627
631
finally
628
632
close (__linux_perf_bench)
You can’t perform that action at this time.
0 commit comments