aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-03-07 14:44:38 -0500
committerIngo Molnar <mingo@kernel.org>2016-03-08 04:11:16 -0500
commit640dad47988ec4b734d71934be103bb6e931279f (patch)
treea8b34fcfc5e587d346e3b906fb8e9051639adb40 /tools/perf/builtin-inject.c
parent07ef7574458369cb0345facc748e964af68a75f4 (diff)
perf inject: Hit all DSOs for AUX data in JIT and other cases
Currently, when injecting build ids, if there is AUX data then 'perf inject' hits all DSOs because it is not known which DSOs the trace data would hit. That needs to be done for JIT injection also, and in fact there is no reason to distinguish what kind of injection is being done. That is, any time there is AUX data and the HEADER_BUID_ID feature flag is set, and the AUX data is not being processed, then hit all DSOs. This patch does that. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1457005856-6143-2-git-send-email-adrian.hunter@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index b38445f08c2f..c6a4f2f94ab1 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -679,12 +679,16 @@ static int __cmd_inject(struct perf_inject *inject)
679 ret = perf_session__process_events(session); 679 ret = perf_session__process_events(session);
680 680
681 if (!file_out->is_pipe) { 681 if (!file_out->is_pipe) {
682 if (inject->build_ids) { 682 if (inject->build_ids)
683 perf_header__set_feat(&session->header, 683 perf_header__set_feat(&session->header,
684 HEADER_BUILD_ID); 684 HEADER_BUILD_ID);
685 if (inject->have_auxtrace) 685 /*
686 dsos__hit_all(session); 686 * Keep all buildids when there is unprocessed AUX data because
687 } 687 * it is not known which ones the AUX trace hits.
688 */
689 if (perf_header__has_feat(&session->header, HEADER_BUILD_ID) &&
690 inject->have_auxtrace && !inject->itrace_synth_opts.set)
691 dsos__hit_all(session);
688 /* 692 /*
689 * The AUX areas have been removed and replaced with 693 * The AUX areas have been removed and replaced with
690 * synthesized hardware events, so clear the feature flag and 694 * synthesized hardware events, so clear the feature flag and