diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-03-18 08:41:00 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-18 08:41:00 -0400 |
commit | a2e45373cdb660ef77cfb71f7b11b9323f108d8a (patch) | |
tree | 0ceb8f31b00d41a6ef9ce9e52bc870d7a16d2168 | |
parent | 7a2594c88f2ab65427bd7d2a4b4c0d91d5fd6e57 (diff) |
trace-cmd: Enable recording of all CPUs instead of just online ones
Count all possible CPUs for recording instead of online ones.
If we do just online ones, we may not record the ones that are online.
We currently just count the CPUs that are on line. If we take CPU 1
offline leaving 3 CPUs online, we record incorrectly CPUs 0-2 instead
of CPUs 0,2,3.
There may also be a case that we want to record taking a CPU offline
or bringing one back on.
Reported-by: Steve Clark <Steve.Clark@ffei.co.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace-record.c b/trace-record.c index 9d1218a..c029257 100644 --- a/trace-record.c +++ b/trace-record.c | |||
@@ -1160,7 +1160,7 @@ static int count_cpus(void) | |||
1160 | size_t n; | 1160 | size_t n; |
1161 | int r; | 1161 | int r; |
1162 | 1162 | ||
1163 | cpus = sysconf(_SC_NPROCESSORS_ONLN); | 1163 | cpus = sysconf(_SC_NPROCESSORS_CONF); |
1164 | if (cpus > 0) | 1164 | if (cpus > 0) |
1165 | return cpus; | 1165 | return cpus; |
1166 | 1166 | ||