From: Jiri Olsa Date: Thu, 5 Jun 2014 16:51:44 +0000 (+0200) Subject: perf tools: Fix pipe check regression in attr event callback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a261e4a09a073451057e9dbe17783255ea94598d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20140605204117.GA1771@krava.redhat.com Signed-off-by: Jiri Olsa --- diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 6a3af0013d68..16c7c11ad06e 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);