diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 07:44:09 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-11 13:56:39 -0500 |
commit | 62605dc50c27bf0e4ff69b7b3166f226586aff02 (patch) | |
tree | e858c9a71749a3d280b25a7ab7928dcbeba51a73 /tools/perf/builtin-top.c | |
parent | ef503831d8d64e12c6dad5547875cfcd4c5d043c (diff) |
perf record: Synthesize non-exec MMAP records when --data used
When perf_event_attr.mmap_data is set the kernel will generate
PERF_RECORD_MMAP events when non-exec (data, SysV mem) mmaps are
created, so we need to synthesize from /proc/pid/maps for existing
threads, as we do for exec mmaps.
Right now just 'perf record' does it, but any other tool that uses
perf_event__synthesize_thread(s|map) can request it.
Reported-by: Don Zickus <dzickus@redhat.com>
Tested-by: Don Zickus <dzickus@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Bill Gray <bgray@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Fowles <rfowles@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ihwzraikx23ian9txinogvv2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 9acca8856ccb..cc96d753db96 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -953,10 +953,10 @@ static int __cmd_top(struct perf_top *top) | |||
953 | if (perf_target__has_task(&opts->target)) | 953 | if (perf_target__has_task(&opts->target)) |
954 | perf_event__synthesize_thread_map(&top->tool, top->evlist->threads, | 954 | perf_event__synthesize_thread_map(&top->tool, top->evlist->threads, |
955 | perf_event__process, | 955 | perf_event__process, |
956 | &top->session->machines.host); | 956 | &top->session->machines.host, false); |
957 | else | 957 | else |
958 | perf_event__synthesize_threads(&top->tool, perf_event__process, | 958 | perf_event__synthesize_threads(&top->tool, perf_event__process, |
959 | &top->session->machines.host); | 959 | &top->session->machines.host, false); |
960 | 960 | ||
961 | ret = perf_top__start_counters(top); | 961 | ret = perf_top__start_counters(top); |
962 | if (ret) | 962 | if (ret) |