File tree Expand file tree Collapse file tree
src/executor/wall_time/perf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#[ derive( Debug , Clone , Copy ) ]
33pub enum PerfEvent {
44 CpuCycles ,
5- CacheReferences ,
5+ L1DCache ,
6+ L2DCache ,
67 CacheMisses ,
78 Instructions ,
89}
@@ -11,26 +12,18 @@ impl PerfEvent {
1112 pub fn to_perf_string ( & self ) -> & ' static str {
1213 match self {
1314 PerfEvent :: CpuCycles => "cpu-cycles" ,
14- PerfEvent :: CacheReferences => "cache-references" ,
15- PerfEvent :: CacheMisses => "cache-misses" ,
15+ PerfEvent :: L1DCache => "l1d_cache" ,
16+ PerfEvent :: L2DCache => "l2d_cache" ,
17+ PerfEvent :: CacheMisses => "l2d_cache_refill" ,
1618 PerfEvent :: Instructions => "instructions" ,
1719 }
1820 }
1921
20- pub fn from_perf_string ( event : & str ) -> Option < PerfEvent > {
21- match event {
22- "cpu-cycles" => Some ( PerfEvent :: CpuCycles ) ,
23- "cache-references" => Some ( PerfEvent :: CacheReferences ) ,
24- "cache-misses" => Some ( PerfEvent :: CacheMisses ) ,
25- "instructions" => Some ( PerfEvent :: Instructions ) ,
26- _ => None ,
27- }
28- }
29-
3022 pub fn all_events ( ) -> Vec < PerfEvent > {
3123 vec ! [
3224 PerfEvent :: CpuCycles ,
33- PerfEvent :: CacheReferences ,
25+ PerfEvent :: L1DCache ,
26+ PerfEvent :: L2DCache ,
3427 PerfEvent :: CacheMisses ,
3528 PerfEvent :: Instructions ,
3629 ]
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ pub fn get_event_flags(perf_executable: &OsString) -> anyhow::Result<Option<Stri
104104
105105 if !missing_events. is_empty ( ) {
106106 warn ! (
107- "Not all required perf events available. Missing: [{}], using default events " ,
107+ "Not all required perf events available. Missing: [{}], disabling detailed event sampling. " ,
108108 missing_events. into_iter( ) . join( ", " )
109109 ) ;
110110 return Ok ( None ) ;
You can’t perform that action at this time.
0 commit comments