linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v3 0/5] perf inject: Fix broken data with mixed input/output
@ 2021-07-19 22:31 Namhyung Kim
  2021-07-19 22:31 ` [PATCH 1/5] perf tools: Remove repipe argument from perf_session__new() Namhyung Kim
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Namhyung Kim @ 2021-07-19 22:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, LKML, Andi Kleen, Ian Rogers, Adrian Hunter

Hello,

The perf inject processes the input data and produces an output with
injected data according to the given options.  During the work, it
assumes the input and output files have the same format - either a
regular file or a pipe.  This works for the obvious cases, but
sometimes makes a trouble when input and output have different
formats (like for debugging).

 * changes in v3
  - use task-clock:u in the pipe-test.sh

 * changes in v2
  - factor out perf_event__synthesize_for_pipe
  - add a shell test for pipe operations


For example, this patchset fixed the following cases

 1. input: pipe, output: file

  # perf record -a -o - sleep 1 | perf inject -b -o perf-pipe.data
  # perf report -i perf-pipe.data

 2. input: file, output: pipe

  # perf record -a -B sleep 1
  # perf inject -b -i perf.data | perf report -i -


Thanks,
Namhyung


Namhyung Kim (5):
  perf tools: Remove repipe argument from perf_session__new()
  perf tools: Pass a fd to perf_file_header__read_pipe()
  perf inject: Fix output from a pipe to a file
  perf inject: Fix output from a file to a pipe
  perf tools: Add pipe_test.sh to verify pipe operations

 tools/perf/bench/synthesize.c       |  4 +-
 tools/perf/builtin-annotate.c       |  2 +-
 tools/perf/builtin-buildid-cache.c  |  2 +-
 tools/perf/builtin-buildid-list.c   |  2 +-
 tools/perf/builtin-c2c.c            |  2 +-
 tools/perf/builtin-diff.c           |  4 +-
 tools/perf/builtin-evlist.c         |  2 +-
 tools/perf/builtin-inject.c         | 38 ++++++++++++++--
 tools/perf/builtin-kmem.c           |  2 +-
 tools/perf/builtin-kvm.c            |  4 +-
 tools/perf/builtin-lock.c           |  2 +-
 tools/perf/builtin-mem.c            |  3 +-
 tools/perf/builtin-record.c         | 40 +++--------------
 tools/perf/builtin-report.c         |  2 +-
 tools/perf/builtin-sched.c          |  4 +-
 tools/perf/builtin-script.c         |  4 +-
 tools/perf/builtin-stat.c           |  4 +-
 tools/perf/builtin-timechart.c      |  3 +-
 tools/perf/builtin-top.c            |  2 +-
 tools/perf/builtin-trace.c          |  2 +-
 tools/perf/tests/shell/pipe_test.sh | 69 +++++++++++++++++++++++++++++
 tools/perf/tests/topology.c         |  4 +-
 tools/perf/util/data-convert-bt.c   |  2 +-
 tools/perf/util/data-convert-json.c |  2 +-
 tools/perf/util/header.c            | 12 ++---
 tools/perf/util/header.h            |  2 +-
 tools/perf/util/session.c           | 11 ++---
 tools/perf/util/session.h           | 12 ++++-
 tools/perf/util/synthetic-events.c  | 53 +++++++++++++++++++++-
 tools/perf/util/synthetic-events.h  |  6 +++
 30 files changed, 217 insertions(+), 84 deletions(-)
 create mode 100755 tools/perf/tests/shell/pipe_test.sh

-- 
2.32.0.402.g57bb445576-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-02 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 22:31 [PATCHSET v3 0/5] perf inject: Fix broken data with mixed input/output Namhyung Kim
2021-07-19 22:31 ` [PATCH 1/5] perf tools: Remove repipe argument from perf_session__new() Namhyung Kim
2021-07-19 22:31 ` [PATCH 2/5] perf tools: Pass a fd to perf_file_header__read_pipe() Namhyung Kim
2021-07-19 22:31 ` [PATCH 3/5] perf inject: Fix output from a pipe to a file Namhyung Kim
2021-07-19 22:31 ` [PATCH 4/5] perf inject: Fix output from a file to a pipe Namhyung Kim
2021-07-19 22:31 ` [PATCH 5/5] perf tools: Add pipe_test.sh to verify pipe operations Namhyung Kim
2021-07-20  9:01 ` [PATCHSET v3 0/5] perf inject: Fix broken data with mixed input/output Jiri Olsa
2021-08-02 13:16   ` Arnaldo Carvalho de Melo
2021-08-02 16:33     ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).