diff options
author | Adrian Hunter <[email protected]> | 2021-04-01 13:36:05 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-04-05 10:15:51 -0300 |
commit | 026334a3bb6a3919b42aba9fc11843db2b77fd41 (patch) | |
tree | c2740a6a89fce109465624540807f514805445c1 /net/lapb/lapb_timer.c | |
parent | e49d033bddf5b565044e2abe4241353959bc9120 (diff) |
perf inject: Fix repipe usage
Since commit 14d3d54052539a1e ("perf session: Try to read pipe data from
file") 'perf inject' has started printing "PERFILE2h" when not processing
pipes.
The commit exposed perf to the possiblity that the input is not a pipe
but the 'repipe' parameter gets used. That causes the printing because
perf inject sets 'repipe' to true always.
The 'repipe' parameter of perf_session__new() is used by 2 functions:
- perf_file_header__read_pipe()
- trace_report()
In both cases, the functions copy data to STDOUT_FILENO when 'repipe' is
true.
Fix by setting 'repipe' to true only if the output is a pipe.
Fixes: e558a5bd8b74aff4 ("perf inject: Work with files")
Signed-off-by: Adrian Hunter <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Andrew Vagin <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions