Skip to content

Commit

Permalink
Inclusive range for OMNITRACE_SAMPLING_CPUS
Browse files Browse the repository at this point in the history
- previously, a value of 0-3 would be CPUs 0, 1, and 2
- now, a value of 0-3 would be CPUs 0, 1, 2, and 3
  • Loading branch information
jrmadsen committed Jun 20, 2022
1 parent cafed84 commit 6dbb0b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/lib/omnitrace/library/cpu_freq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ config()
_vv.size() != 2,
"Invalid CPU range specification: %s. Required format N-M, e.g. 0-4",
_v.c_str());
for(size_t i = std::stoull(_vv.at(0)); i < std::stoull(_vv.at(1)); ++i)
for(size_t i = std::stoull(_vv.at(0)); i <= std::stoull(_vv.at(1)); ++i)
_enabled_freqs.emplace(i);
}
else
Expand Down

0 comments on commit 6dbb0b9

Please sign in to comment.