diff --git a/Project.toml b/Project.toml index ffd0ef9..a7a81f1 100644 --- a/Project.toml +++ b/Project.toml @@ -8,4 +8,4 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [compat] PrettyTables = "2" -julia = "1" +julia = "1.8" diff --git a/src/LinuxPerf.jl b/src/LinuxPerf.jl index 3f37499..af9f044 100644 --- a/src/LinuxPerf.jl +++ b/src/LinuxPerf.jl @@ -1139,11 +1139,10 @@ macro pstats(args...) bench = make_bench_threaded(groups, threads = $(opts.threads)) try enable_all!() - val = $(esc(expr)) + Base.donotdelete($(esc(expr))) disable_all!() # trick the compiler not to eliminate the code - stats = rand() < 0 ? val : Stats(bench) - return stats::Stats + return Stats(bench)::Stats catch rethrow() finally