@@ -152,31 +152,31 @@ fn performance_cores() -> Option<&'static String> {
152152}
153153#[ cfg( target_os = "windows" ) ]
154154// Windows stub - TODO: implement to add Performance core support to Windows.
155- fn performance_cores ( ) -> Option < & ' static String > {
156- None
155+ fn performance_cores ( ) -> Option < & ' static String > {
156+ None
157157}
158158#[ cfg( target_os = "macos" ) ]
159159// To my knoweladge, MacOS does not run on hardware with P/E cores, so this can simply always return None.
160- fn performance_cores ( ) -> Option < & ' static String > {
161- None
160+ fn performance_cores ( ) -> Option < & ' static String > {
161+ None
162162}
163- #[ cfg( not( any( target_os = "windows" , target_os = "macos" , target_os = "linux" ) ) ) ]
163+ #[ cfg( not( any( target_os = "windows" , target_os = "macos" , target_os = "linux" ) ) ) ]
164164// I don't think rustc-perf runs on OSs other than Linux, Windows, or Mac, but I'll still leave a stub here just in case.
165- fn performance_cores ( ) -> Option < & ' static String > {
166- None
165+ fn performance_cores ( ) -> Option < & ' static String > {
166+ None
167167}
168168#[ cfg( target_os = "linux" ) ]
169169/// Makes the benchmark run only on Performance cores.
170- fn run_on_p_cores ( path : & Path , cpu_list : & str ) -> Command {
171- let mut cmd = Command :: new ( "taskset" ) ;
172- cmd. arg ( "--cpu-list" ) ;
173- cmd. arg ( cpu_list) ;
174- cmd. arg ( path) ;
175- cmd
170+ fn run_on_p_cores ( path : & Path , cpu_list : & str ) -> Command {
171+ let mut cmd = Command :: new ( "taskset" ) ;
172+ cmd. arg ( "--cpu-list" ) ;
173+ cmd. arg ( cpu_list) ;
174+ cmd. arg ( path) ;
175+ cmd
176176}
177177#[ cfg( not( target_os = "linux" ) ) ]
178- fn run_on_p_cores ( path : & Path , cpu_list : & str ) -> Command {
179- todo ! ( "Can't run comamnds on the P cores on this platofmr" )
178+ fn run_on_p_cores ( _path : & Path , _cpu_list : & str ) -> Command {
179+ todo ! ( "Can't run comamnds on the P cores on this platofmr" )
180180}
181181impl < ' a > CargoProcess < ' a > {
182182 pub fn incremental ( mut self , incremental : bool ) -> Self {
@@ -198,9 +198,9 @@ impl<'a> CargoProcess<'a> {
198198 fn base_command ( & self , cwd : & Path , subcommand : & str ) -> Command {
199199 // Processors with P and E cores require special handling
200200 let mut cmd = if let Some ( p_cores) = performance_cores ( ) {
201- run_on_p_cores ( Path :: new ( & self . toolchain . components . cargo ) , p_cores)
202- } else {
203- Command :: new ( Path :: new ( & self . toolchain . components . cargo ) )
201+ run_on_p_cores ( Path :: new ( & self . toolchain . components . cargo ) , p_cores)
202+ } else {
203+ Command :: new ( Path :: new ( & self . toolchain . components . cargo ) )
204204 } ;
205205 cmd
206206 // Not all cargo invocations (e.g. `cargo clean`) need all of these
@@ -606,8 +606,8 @@ fn process_stat_output(
606606 let _unit = get ! ( parts. next( ) ) ;
607607 let mut name = get ! ( parts. next( ) ) ;
608608 // Map P-core events to normal events
609- if name == "cpu_core/instructions:u/" {
610- name = "instructions:u" . into ( ) ;
609+ if name == "cpu_core/instructions:u/" {
610+ name = "instructions:u" . into ( ) ;
611611 }
612612 let _time = get ! ( parts. next( ) ) ;
613613 let pct = get ! ( parts. next( ) ) ;
0 commit comments