Skip to content

Commit 63e5cbe

Browse files
committed
Run setup and teardown expressions when profiling under perf
1 parent 1c258d8 commit 63e5cbe

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
@@ -587,6 +587,7 @@ function generate_benchmark_definition(
587587
),
588588
)
589589
if $(params.experimental_enable_linux_perf)
590+
$(setup)
590591
# Based on https://github.com/JuliaPerf/LinuxPerf.jl/blob/a7fee0ff261a5b5ce7a903af7b38d1b5c27dd931/src/LinuxPerf.jl#L1043-L1061
591592
__linux_perf_groups = BenchmarkTools.LinuxPerf.set_default_spaces(
592593
$(params.linux_perf_options.events),
@@ -607,6 +608,7 @@ function generate_benchmark_definition(
607608
__linux_perf_bench
608609
)
609610
end
611+
$(teardown)
610612
else
611613
__return_val_2 = nothing
612614
__linux_perf_stats = nothing

0 commit comments

Comments
 (0)