Skip to content

Commit 2909b92

Browse files
committed
increase xperf and tracelog buffer sizes
Otherwise a lot of the benchmarks trigger errors and warnings about lost events, for example (pardon my french ...xperf): ``` xperf: error: rustc-perf-counters: Le nom d'instance passé n'a pas été reconnu valide par un fournisseur de données WMI. (0x1069). xperf: warning: Session "rustc-perf-counters" lost 5204 events. ```
1 parent 6a76b61 commit 2909b92

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

collector/src/rustc-fake.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ fn main() {
129129
// falling back to assuming it's on the PATH.
130130
let xperf = std::env::var("XPERF").unwrap_or("xperf.exe".to_string());
131131
let mut cmd = Command::new(&xperf);
132+
cmd.args(&["-MinBuffers", "512"])
133+
.args(&["-MaxBuffers", "3000"])
134+
.args(&["-BufferSize", "1024"]);
132135
assert!(cmd.output().is_ok(), "xperf.exe could not be started");
133136

134137
// Go ahead and run `xperf -stop rustc-perf-counters` in case there are leftover
@@ -150,6 +153,12 @@ fn main() {
150153
"CSWITCH+PROC_THREAD+LOADER",
151154
"-PMC",
152155
"InstructionRetired,TotalCycles:CSWITCH",
156+
"-b",
157+
"1024",
158+
"-min",
159+
"512",
160+
"-max",
161+
"2048",
153162
]);
154163
let status = cmd.status().expect("failed to spawn tracelog");
155164
assert!(status.success(), "tracelog did not complete successfully");

0 commit comments

Comments
 (0)