Skip to content

Commit 1c128cc

Browse files
committed
Fix off-by-one error in p-core count.
If we have an inclusive range like `0-3`, that's four cores, not three.
1 parent 9d9f24b commit 1c128cc

File tree

1 file changed

+2
-1
lines changed
  • collector/src/compile/execute

1 file changed

+2
-1
lines changed

collector/src/compile/execute/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ fn run_on_p_cores(path: &Path, cpu_list: &str) -> Command {
189189
let core_end: u32 = core_end
190190
.parse()
191191
.expect("Expected a number when parsing the end of the P-core list!");
192-
let core_count = core_end - core_start;
192+
let core_count = core_end - core_start + 1; // e.g. "0-3" is four cores: [0, 1, 2, 3]
193+
193194
let mut cmd = Command::new("taskset");
194195
// Set job count to P-core count. This is done for 3 reasons:
195196
// 1. The instruction count info for E-cores is often incomplete, and a substantial chunk of

0 commit comments

Comments
 (0)