linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Avoid parsing tracepoint format just for id
@ 2024-11-08 18:47 Ian Rogers
  2024-11-08 18:47 ` [PATCH v4 1/6] tool api fs: Correctly encode errno for read/write open failures Ian Rogers
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Ian Rogers @ 2024-11-08 18:47 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Athira Jajeev, James Clark,
	Dominique Martinet, Yang Li, Colin Ian King, Yang Jihong,
	Steinar H. Gunderson, Oliver Upton, Ilkka Koskinen, Ze Gao,
	Weilin Wang, Ben Gainey, zhaimingbing, Zixian Cai, Andi Kleen,
	Paran Lee, Thomas Falcon, linux-kernel, linux-perf-users,
	Steven Rostedt (Google)

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.

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 (6):
  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/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 +-
 23 files changed, 214 insertions(+), 146 deletions(-)

-- 
2.47.0.277.g8800431eea-goog


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

end of thread, other threads:[~2024-11-18 22:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-08 18:47 [PATCH v4 0/6] Avoid parsing tracepoint format just for id Ian Rogers
2024-11-08 18:47 ` [PATCH v4 1/6] tool api fs: Correctly encode errno for read/write open failures Ian Rogers
2024-11-08 18:47 ` [PATCH v4 2/6] perf trace-event: Constify print arguments Ian Rogers
2024-11-08 18:47 ` [PATCH v4 3/6] perf trace-event: Always build trace-event-info.c Ian Rogers
2024-11-08 18:47 ` [PATCH v4 4/6] perf evsel: Add/use accessor for tp_format Ian Rogers
2024-11-08 18:47 ` [PATCH v4 5/6] perf evsel: Allow evsel__newtp without libtraceevent Ian Rogers
2024-11-08 18:47 ` [PATCH v4 6/6] perf tests: Enable tests disabled due to tracepoint parsing Ian Rogers
2024-11-09  6:45 ` [PATCH v4 0/6] Avoid parsing tracepoint format just for id Namhyung Kim
2024-11-09 16:26   ` Ian Rogers
2024-11-09 17:04     ` Namhyung Kim
2024-11-13 18:06       ` Ian Rogers
2024-11-18 18:31         ` Namhyung Kim
2024-11-18 19:35           ` Ian Rogers
2024-11-18 21:57             ` Namhyung Kim
2024-11-18 22:46               ` Ian Rogers

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).