Commit-ID:  89c97d936e76b064a52ee056602b2a62b3f1ef70
Gitweb:     http://git.kernel.org/tip/89c97d936e76b064a52ee056602b2a62b3f1ef70
Author:     Adrian Hunter <adrian.hun...@intel.com>
AuthorDate: Tue, 22 Oct 2013 10:34:09 +0300
Committer:  Arnaldo Carvalho de Melo <a...@redhat.com>
CommitDate: Wed, 23 Oct 2013 10:58:03 -0300

perf inject: Do not repipe attributes to a perf.data file

perf.data files contain the attributes separately, do not put them in
the event stream as well.

Signed-off-by: Adrian Hunter <adrian.hun...@intel.com>
Cc: David Ahern <dsah...@gmail.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Jiri Olsa <jo...@redhat.com>
Cc: Mike Galbraith <efa...@gmx.de>
Cc: Namhyung Kim <namhy...@gmail.com>
Cc: Paul Mackerras <pau...@samba.org>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: Stephane Eranian <eran...@google.com>
Link: 
http://lkml.kernel.org/r/1382427258-17495-6-git-send-email-adrian.hun...@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com>
---
 tools/perf/builtin-inject.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index eb1a594..409ceaf 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -72,12 +72,17 @@ static int perf_event__repipe_attr(struct perf_tool *tool,
                                   union perf_event *event,
                                   struct perf_evlist **pevlist)
 {
+       struct perf_inject *inject = container_of(tool, struct perf_inject,
+                                                 tool);
        int ret;
 
        ret = perf_event__process_attr(tool, event, pevlist);
        if (ret)
                return ret;
 
+       if (!inject->pipe_output)
+               return 0;
+
        return perf_event__repipe_synth(tool, event);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to