Skip to content

Commit 36d409e

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 36d409e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

collector/src/rustc-fake.rs

Lines changed: 4 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,7 @@ fn main() {
150153
"CSWITCH+PROC_THREAD+LOADER",
151154
"-PMC",
152155
"InstructionRetired,TotalCycles:CSWITCH",
156+
"-b", "1024", "-min", "512", "-max", "2048"
153157
]);
154158
let status = cmd.status().expect("failed to spawn tracelog");
155159
assert!(status.success(), "tracelog did not complete successfully");

0 commit comments

Comments
 (0)