diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-08-15 22:08:39 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-08-22 13:12:12 -0300 |
commit | fbe2af45f6bd27ee69fd775303c936c3af4a4807 (patch) | |
tree | a3592cf08457e8f6735eec760ee2ee74c06d0866 /tools/perf/util/event.c | |
parent | 4b99375b38fa137f501cfa60b70e3f0a9da39c93 (diff) | |
download | lwn-fbe2af45f6bd27ee69fd775303c936c3af4a4807.tar.gz lwn-fbe2af45f6bd27ee69fd775303c936c3af4a4807.zip |
perf tools: Add machine__kernel_ip()
Add a function to determine if an address is in the kernel. This is
based on the kernel function kernel_ip().
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1408129739-17368-5-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 1398c83d896d..ed558191c0b3 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -784,9 +784,9 @@ try_again: * "[vdso]" dso, but for now lets use the old trick of looking * in the whole kernel symbol list. */ - if ((long long)al->addr < 0 && - cpumode == PERF_RECORD_MISC_USER && - machine && mg != &machine->kmaps) { + if (cpumode == PERF_RECORD_MISC_USER && machine && + mg != &machine->kmaps && + machine__kernel_ip(machine, al->addr)) { mg = &machine->kmaps; load_map = true; goto try_again; |