You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if std::fs::exists("/sys/devices/cpu").expect("Could not check the CPU architecture details: could not check if `/sys/devices/cpu` exists!"){
140
+
// If /sys/devices/cpu exists, then this is not a "Performance-hybrid" CPU.
141
+
None
142
+
}
143
+
elseif std::fs::exists("/sys/devices/cpu_core").expect("Could not check the CPU architecture detali: could not check if `/sys/devices/cpu_core` exists!"){
144
+
// If /sys/devices/cpu_core exists, then this is a "Performance-hybrid" CPU.
145
+
eprintln!("WARNING: Performance-Hybrid CPU detected. `rustc-perf` can't run properly on Efficency cores: test suite will only use Performance cores!");
// If neither dir exists, then something is wrong - `/sys/devices/cpu` has been in Linux for over a decade.
149
+
eprintln!("WARNING: neither `/sys/devices/cpu` nor `/sys/devices/cpu_core` present, unable to determine if this CPU has a Performance-Hybrid architecture.");
150
+
None
151
+
}
152
+
});
153
+
(*PERFORMANCE_CORES).as_ref()
154
+
}
155
+
156
+
#[cfg(not(target_os = "linux"))]
157
+
// Modify this stub if you want to add support for P/E cores on more OSs
158
+
fnperformance_cores() -> Option<&'staticString>{
159
+
None
160
+
}
161
+
162
+
#[cfg(target_os = "linux")]
163
+
/// Makes the benchmark run only on Performance cores.
0 commit comments