Skip to content

Commit 7e9bfba

Browse files
committed
Run setup and teardown expressions when profiling under perf
1 parent f10e0a6 commit 7e9bfba

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
@@ -580,6 +580,7 @@ function generate_benchmark_definition(
580580
),
581581
)
582582
if $(params.experimental_enable_linux_perf)
583+
$(setup)
583584
# Based on https://github.com/JuliaPerf/LinuxPerf.jl/blob/a7fee0ff261a5b5ce7a903af7b38d1b5c27dd931/src/LinuxPerf.jl#L1043-L1061
584585
__linux_perf_groups = BenchmarkTools.LinuxPerf.set_default_spaces(
585586
$(params.linux_perf_options.events),
@@ -600,6 +601,7 @@ function generate_benchmark_definition(
600601
__linux_perf_bench
601602
)
602603
end
604+
$(teardown)
603605
else
604606
__return_val_2 = nothing
605607
__linux_perf_stats = nothing

0 commit comments

Comments
 (0)