lkml.org 
[lkml]   [2014]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:perf/core] perf tools: Fix pipe check regression in attr event callback
Commit-ID:  a261e4a09a073451057e9dbe17783255ea94598d
Gitweb: http://git.kernel.org/tip/a261e4a09a073451057e9dbe17783255ea94598d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 5 Jun 2014 18:51:44 +0200
Committer: Jiri Olsa <jolsa@kernel.org>
CommitDate: Mon, 9 Jun 2014 12:20:34 +0200

perf tools: Fix pipe check regression in attr event callback

The file factoring in builtin-inject.c object introduced regression
in attr event callback. The commit is:
3406912 perf inject: Handle output file via perf_data_file object

Following hunk reversed the logic:
- if (!inject->pipe_output)
+ if (&inject->output.is_pipe)

putting it back, following example now works:
$ perf record -o - kill | perf inject -b | perf report -i -

Plus removing extra '&' (kudos to Arnaldo)

Reported-by: Stephane Eranian <eranian@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20140605204117.GA1771@krava.redhat.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/builtin-inject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 6a3af00..16c7c11 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -72,7 +72,7 @@ static int perf_event__repipe_attr(struct perf_tool *tool,
if (ret)
return ret;

- if (&inject->output.is_pipe)
+ if (!inject->output.is_pipe)
return 0;

return perf_event__repipe_synth(tool, event);

\
 
 \ /
  Last update: 2014-06-12 15:01    [W:0.051 / U:15.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site