summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-inject.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 13:44:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 13:44:54 -0400
commit75acebf2423ab13ff6198daa6e17ef7a2543bfe4 (patch)
treee08119290aaf68ce1b5d2b4a4cbaba29c3b2f64d /tools/perf/builtin-inject.c
parentb55ee2816ed6d8f8a00d4badab0e3642ffbac19f (diff)
parentdbc33f7016747bfce64f3d1e3af63f1251fcbf85 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Various fixes. The -g perf report lockup you reported is only partially addressed, patches that fix the excessive runtime are still being worked on" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix uncore PCI fixed counter handling uprobes: Fix utask->depth accounting in handle_trampoline() perf/x86: Add constraint for IVB CYCLE_ACTIVITY:CYCLES_LDM_PENDING perf: Fix up MMAP2 buffer space reservation perf tools: Add attr->mmap2 support perf kvm: Fix sample_type manipulation perf evlist: Fix id pos in perf_evlist__open() perf trace: Handle perf.data files with no tracepoints perf session: Separate progress bar update when processing events perf trace: Check if MAP_32BIT is defined perf hists: Fix formatting of long symbol names perf evlist: Fix parsing with no sample_id_all bit set perf tools: Add test for parsing with no sample_id_all bit perf trace: Check control+C more often
Diffstat (limited to 'tools/perf/builtin-inject.c')
-rw-r--r--tools/perf/builtin-inject.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 9b336fdb6f71..423875c999b2 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -123,6 +123,19 @@ static int perf_event__repipe_mmap(struct perf_tool *tool,
123 return err; 123 return err;
124} 124}
125 125
126static int perf_event__repipe_mmap2(struct perf_tool *tool,
127 union perf_event *event,
128 struct perf_sample *sample,
129 struct machine *machine)
130{
131 int err;
132
133 err = perf_event__process_mmap2(tool, event, sample, machine);
134 perf_event__repipe(tool, event, sample, machine);
135
136 return err;
137}
138
126static int perf_event__repipe_fork(struct perf_tool *tool, 139static int perf_event__repipe_fork(struct perf_tool *tool,
127 union perf_event *event, 140 union perf_event *event,
128 struct perf_sample *sample, 141 struct perf_sample *sample,
@@ -339,6 +352,7 @@ static int __cmd_inject(struct perf_inject *inject)
339 352
340 if (inject->build_ids || inject->sched_stat) { 353 if (inject->build_ids || inject->sched_stat) {
341 inject->tool.mmap = perf_event__repipe_mmap; 354 inject->tool.mmap = perf_event__repipe_mmap;
355 inject->tool.mmap2 = perf_event__repipe_mmap2;
342 inject->tool.fork = perf_event__repipe_fork; 356 inject->tool.fork = perf_event__repipe_fork;
343 inject->tool.tracing_data = perf_event__repipe_tracing_data; 357 inject->tool.tracing_data = perf_event__repipe_tracing_data;
344 } 358 }
@@ -390,6 +404,7 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
390 .tool = { 404 .tool = {
391 .sample = perf_event__repipe_sample, 405 .sample = perf_event__repipe_sample,
392 .mmap = perf_event__repipe, 406 .mmap = perf_event__repipe,
407 .mmap2 = perf_event__repipe,
393 .comm = perf_event__repipe, 408 .comm = perf_event__repipe,
394 .fork = perf_event__repipe, 409 .fork = perf_event__repipe,
395 .exit = perf_event__repipe, 410 .exit = perf_event__repipe,