Arnaldo Carvalho de Melo
caa470475d
perf header: Fixup reading of HEADER_NRCPUS feature
...
The original patch introducing this header wrote the number of CPUs available
and online in one order and then swapped those values when reading, fix it.
Before:
# perf record usleep 1
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 4
# nrcpus avail : 4
# echo 0 > /sys/devices/system/cpu/cpu2/online
# perf record usleep 1
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 4
# nrcpus avail : 3
# echo 0 > /sys/devices/system/cpu/cpu1/online
# perf record usleep 1
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 4
# nrcpus avail : 2
After the fix, bringing back the CPUs online:
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 2
# nrcpus avail : 4
# echo 1 > /sys/devices/system/cpu/cpu2/online
# perf record usleep 1
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 3
# nrcpus avail : 4
# echo 1 > /sys/devices/system/cpu/cpu1/online
# perf record usleep 1
# perf report --header-only | grep 'nrcpus \(online\|avail\)'
# nrcpus online : 4
# nrcpus avail : 4
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: fbe96f29ce4b ("perf tools: Make perf.data more self-descriptive (v8)")
Link: http://lkml.kernel.org/r/20150911153323.GP23511@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-13 11:41:34 -03:00
..
2015-05-08 16:11:05 -03:00
2015-08-26 10:34:58 -03:00
2015-08-05 11:44:29 -07:00
2015-08-12 19:26:22 +01:00
2015-08-25 09:44:22 +02:00
2015-06-08 16:42:07 -06:00
2015-02-13 17:15:55 +10:30
2015-09-01 10:25:57 +02:00
2015-05-27 00:24:10 -04:00
2015-09-13 11:41:34 -03:00
2015-07-02 17:11:28 -07:00
2015-08-31 18:12:07 -07:00
2015-05-09 13:36:58 +08:00
2014-07-23 10:16:38 -07:00
2015-01-15 09:41:49 -06:00
2014-12-15 23:49:22 +02:00
2015-05-12 18:11:06 -03:00
2015-06-26 15:46:08 -07:00