Skip to content

Commit 6e76888

Browse files
committed
Run setup and teardown expressions when profiling under perf
1 parent e7b1bf9 commit 6e76888

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/execution.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ function generate_benchmark_definition(
585585
),
586586
)
587587
if $(params.experimental_enable_linux_perf)
588+
$(setup)
588589
# Based on https://github.com/JuliaPerf/LinuxPerf.jl/blob/a7fee0ff261a5b5ce7a903af7b38d1b5c27dd931/src/LinuxPerf.jl#L1043-L1061
589590
__linux_perf_groups = BenchmarkTools.LinuxPerf.set_default_spaces(
590591
$(params.linux_perf_options.events),
@@ -605,6 +606,7 @@ function generate_benchmark_definition(
605606
__linux_perf_bench
606607
)
607608
end
609+
$(teardown)
608610
else
609611
__return_val_2 = nothing
610612
__linux_perf_stats = nothing

0 commit comments

Comments
 (0)