File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,18 @@ mutable struct Parameters
1919 linux_perf_options: :@NamedTuple {events:: Expr , spaces:: Expr , threads:: Bool }
2020end
2121
22+ const DEFAULT_LINUX_PERF_OPTIONS = LinuxPerf. parse_pstats_options ([])
23+
2224function perf_available ()
2325 if ! Sys. islinux ()
2426 return false
2527 end
2628
2729 bench = nothing
2830 try
29- opts = LinuxPerf . parse_pstats_options ([])
30- groups = BenchmarkTools . LinuxPerf. set_default_spaces (opts. events, opts. spaces)
31- bench = make_bench_threaded (groups; threads= opts. threads)
31+ opts = DEFAULT_LINUX_PERF_OPTIONS
32+ groups = LinuxPerf. set_default_spaces (eval ( opts. events), eval ( opts. spaces) )
33+ bench = LinuxPerf . make_bench_threaded (groups, threads = eval ( opts. threads) )
3234 return true
3335 catch
3436 return false
@@ -50,7 +52,7 @@ const DEFAULT_PARAMETERS = Parameters(
5052 0.05 ,
5153 0.01 ,
5254 perf_available (),
53- LinuxPerf . parse_pstats_options ([]) ,
55+ DEFAULT_LINUX_PERF_OPTIONS ,
5456)
5557
5658function Parameters (;
You can’t perform that action at this time.
0 commit comments