Skip to content

Avoid parsing tracepoint format just for id

Ian Rogers linux-perf-users lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest7 patches 1 replyIn review
  2. v46 patches 8 repliesSuperseded
  3. v36 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches9 repliesSuperseded
v16 patches0 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7perf env: Ensure failure broken topology file reads are always -1 encodedtools/perf/util/env.c+6 -30 replies
2/7tool api fs: Correctly encode errno for read/write open failurestools/lib/api/fs/fs.c+3 -30 replies
3/7perf trace-event: Constify print argumentstools/perf/util/trace-event-parse.c tools/perf/util/trace-event.h+2 -20 replies
4/7perf trace-event: Always build trace-event-info.ctools/perf/builtin-record.c tools/perf/util/Build tools/perf/util/perf_event_attr_fprintf.c+1 -70 replies
5/7perf evsel: Add/use accessor for tp_formattools/perf/builtin-kmem.c tools/perf/builtin-kwork.c tools/perf/builtin-script.c +10 more+128 -600 replies
6/7perf evsel: Allow evsel__newtp without libtraceeventtools/perf/util/evsel.c tools/perf/util/evsel.h tools/perf/util/parse-events.c+82 -510 replies
7/7perf tests: Enable tests disabled due to tracepoint parsingtools/perf/tests/Build tools/perf/tests/builtin-test.c tools/perf/tests/parse-events.c+4 -290 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNamhyung Kim
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/7] Avoid parsing tracepoint format just for id

The tracepoint format isn't needed to open an event, just the id for the config value. Refactor the use of evsel->tp_format to use an accessor that will lazily construct its value. In evsel__newtp_idx read the id so the config value can be set up/used.

This allows tracepoints to be used without libtraceevent in a number of tests. Other functionality is enabled without libtracevent, such as mapping a tracepoint id back to its name. There may be some performance benefit to code using tracepoints but not using the format information.

v5. Add perf env fixed found by Namhyung.
v4. Rebase due to conflict with 9ac98662dbd3 ("perf: event: Remove deadcode") v3. Whitespace changes, Arnaldo.
v2. Add additional error checking/handling in evsel__tp_format.

Ian Rogers (7):
perf env: Ensure failure broken topology file reads are always -1
encoded
tool api fs: Correctly encode errno for read/write open failures perf trace-event: Constify print arguments
perf trace-event: Always build trace-event-info.c
perf evsel: Add/use accessor for tp_format
perf evsel: Allow evsel__newtp without libtraceevent perf tests: Enable tests disabled due to tracepoint parsing

 tools/lib/api/fs/fs.c                         |   6 +-
 tools/perf/builtin-kmem.c                     |  12 +-
 tools/perf/builtin-kwork.c                    |   3 +-
 tools/perf/builtin-record.c                   |   2 -
 tools/perf/builtin-script.c                   |   9 +-
 tools/perf/builtin-trace.c                    |  79 +++++++++----
 tools/perf/tests/Build                        |   6 +-
 tools/perf/tests/builtin-test.c               |   2 -
 tools/perf/tests/parse-events.c               |  25 +---
 tools/perf/util/Build                         |   2 +-
 tools/perf/util/data-convert-bt.c             |  10 +-
 tools/perf/util/data-convert-json.c           |   8 +-
 tools/perf/util/env.c                         |   9 +-
 tools/perf/util/evsel.c                       | 110 +++++++++++++-----
 tools/perf/util/evsel.h                       |   9 +-
 tools/perf/util/evsel_fprintf.c               |   4 +-
 tools/perf/util/parse-events.c                |  16 +--
 tools/perf/util/perf_event_attr_fprintf.c     |   4 -
 .../util/scripting-engines/trace-event-perl.c |   3 +-
 .../scripting-engines/trace-event-python.c    |   3 +-
 tools/perf/util/sort.c                        |  33 ++++--
 tools/perf/util/trace-event-parse.c           |   2 +-
 tools/perf/util/trace-event-scripting.c       |  10 +-
 tools/perf/util/trace-event.h                 |   2 +-
 24 files changed, 220 insertions(+), 149 deletions(-)
Signature · 1 line
2.47.0.338.g60cca15819-goog