Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
PrettyTables = "2"
julia = "1"
julia = "1.8"
5 changes: 2 additions & 3 deletions src/LinuxPerf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down