File tree Expand file tree Collapse file tree
src/executor/wall_time/profiler/samply Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,21 @@ impl Profiler for SamplyProfiler {
113113 ) ,
114114 ] ) ;
115115
116+ // Extra hardware events to capture alongside the sampling event,
117+ // stored by samply as per-sample delta columns in the profile, as
118+ // `<name>:<type>:<config>` specs resolved for the CPU we run on.
119+ // samply degrades gracefully to cycles-only sampling when the PMU
120+ // can't deliver them, so this is safe to request unconditionally.
121+ // Linux only: the events go through perf_event_open.
122+ #[ cfg( target_os = "linux" ) ]
123+ cmd_builder. env (
124+ "SAMPLY_PERF_EVENTS" ,
125+ runner_shared:: perf_event:: PerfEvent :: all_events ( )
126+ . iter ( )
127+ . filter_map ( |event| event. to_samply_spec ( ) )
128+ . join ( "," ) ,
129+ ) ;
130+
116131 // If `setup` decided the bash on PATH is Apple-signed, prepend brew's
117132 // bin so samply's spawned shell resolves to the ad-hoc-signed brew bash
118133 // instead. Only the samply child's PATH is touched.
You can’t perform that action at this time.
0 commit comments