diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-05-07 07:08:59 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-07 21:46:21 +0200 |
commit | 55261f46702cec96911a81aacfb3cba13434d304 (patch) | |
tree | a0f36a640a30aba2c00a6f95e0ee79263ed7f937 /tools/perf/util/util.h | |
parent | perf top: Set target.system_wide (diff) | |
download | linux-55261f46702cec96911a81aacfb3cba13434d304.tar.xz linux-55261f46702cec96911a81aacfb3cba13434d304.zip |
perf evlist: Fix creation of cpu map
Currently, 'perf record -- sleep 1' creates a cpu map for all online
cpus since it turns out calling cpu_map__new(NULL). Fix it.
Also it is guaranteed that cpu_list is NULL if PID/TID is given by
calling perf_target__validate(), so we can make the conditional bit
simpler.
This also fixes perf test 7 (Validate) failure on my 6 core machine:
$ cat /sys/devices/system/cpu/online
0-11
$ ./perf test -v 7
7: Validate PERF_RECORD_* events & perf_sample fields:
--- start ---
perf_evlist__mmap: Operation not permitted
---- end ----
Validate PERF_RECORD_* events & perf_sample fields: FAILED!
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1336367344-28071-3-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/util.h')
0 files changed, 0 insertions, 0 deletions