[PATCH v4 0/8] perf data/pipe handling improvements

Ian Rogers posted 8 patches 2 hours ago
tools/perf/builtin-annotate.c       |  11 +--
tools/perf/builtin-report.c         |  27 +++---
tools/perf/builtin-script.c         |  11 +--
tools/perf/util/clockid.h           |   3 +-
tools/perf/util/data-convert-bt.c   |  72 ++++++++++++--
tools/perf/util/data-convert-json.c |  12 +--
tools/perf/util/evsel.c             |   7 +-
tools/perf/util/header.c            | 145 +++++++++++++++++++++-------
tools/perf/util/header.h            |   6 +-
tools/perf/util/intel-tpebs.c       |  11 +--
tools/perf/util/ordered-events.c    |   2 +-
tools/perf/util/session.c           |  28 ++++--
12 files changed, 217 insertions(+), 118 deletions(-)
[PATCH v4 0/8] perf data/pipe handling improvements
Posted by Ian Rogers 2 hours ago
I'm looking at improving the perf data converter with files generated
in pipe mode. In pipe mode I found the feature handling for the last
feature marker was problematic. If a new feature was added then the
old marker looks like the new feature. These changes do some minor
logging and build fixes, but they also change the last feature
handling in pipe mode so that the marker is treated as a marker and
not a feature that is broken.

Two additional fixes are added in v2. The first is making ordered
events handle positive process event return values in a consistent
manner with the reader that ignores positive values. Not handling this
properly breaks with tracing data events in pipe mode. The second set
of fixes are to the perf data converter --to-ctf output where
generating the CTF events is deferred until the event desc feature or
tracing data events occur in pipe mode.

v4: Address Sashiko nits, primarily extra bound checks. Add patch to
    better warn about libtraceevent/libbpf support being missing.

v3: Adjust comment for event setup that in pipe mode the initial one
    does nothing (Namhyung).
    https://lore.kernel.org/lkml/20260401055206.43187-1-irogers@google.com/

v2: Two additional fixes, bring back --header-only early exit
    (Namhyung) and some comment/whitespace nits.
    https://lore.kernel.org/linux-perf-users/20260228065953.3226283-1-irogers@google.com/

v1: https://lore.kernel.org/lkml/20260226013534.2028272-1-irogers@google.com/

Ian Rogers (8):
  perf clockid: Add missing include
  perf header: Add utility to convert feature number to a string
  perf header: Properly warn/print when libtraceevent/libbpf support is
    missing
  perf session: Extra logging for failed to process events
  perf header: Refactor pipe mode end marker handling
  perf ordered-events: Event processing consistency with the regular
    reader
  perf evsel: Make unknown event names more unique
  perf data convert ctf: Pipe mode improvements

 tools/perf/builtin-annotate.c       |  11 +--
 tools/perf/builtin-report.c         |  27 +++---
 tools/perf/builtin-script.c         |  11 +--
 tools/perf/util/clockid.h           |   3 +-
 tools/perf/util/data-convert-bt.c   |  72 ++++++++++++--
 tools/perf/util/data-convert-json.c |  12 +--
 tools/perf/util/evsel.c             |   7 +-
 tools/perf/util/header.c            | 145 +++++++++++++++++++++-------
 tools/perf/util/header.h            |   6 +-
 tools/perf/util/intel-tpebs.c       |  11 +--
 tools/perf/util/ordered-events.c    |   2 +-
 tools/perf/util/session.c           |  28 ++++--
 12 files changed, 217 insertions(+), 118 deletions(-)

-- 
2.53.0.1118.gaef5881109-goog