perf parse-events: Break out tracepoint and printing
authorIan Rogers <irogers@google.com>
Fri, 29 Jul 2022 20:42:17 +0000 (13:42 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Aug 2022 19:32:26 +0000 (16:32 -0300)
commit9b7c7728f4e4ba8dd75269fb111fa187faa018c6
tree937d5d945ec605cff09528aa07aff6e2709affc3
parent32f457abb84676f54a8d3144fd7504207d348f87
perf parse-events: Break out tracepoint and printing

Move print_*_events functions out of parse-events.c into a new
print-events.c. Move tracepoint code into tracepoint.c or
trace-event-info.c (sole user). This reduces the dependencies of
parse-events.c and makes it more amenable to being a library in the
future.

Remove some unnecessary definitions from parse-events.h. Fix a
checkpatch.pl warning on using unsigned rather than unsigned int.  Fix
some line length warnings too.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20220729204217.250166-3-irogers@google.com
[ Add include linux/stddef.h before perf_events.h for systems where __always_inline isn't pulled in before used, such as older Alpine Linux ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 files changed:
tools/perf/builtin-list.c
tools/perf/builtin-lock.c
tools/perf/builtin-timechart.c
tools/perf/builtin-trace.c
tools/perf/util/Build
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h
tools/perf/util/print-events.c [new file with mode: 0644]
tools/perf/util/print-events.h [new file with mode: 0644]
tools/perf/util/trace-event-info.c
tools/perf/util/tracepoint.c [new file with mode: 0644]
tools/perf/util/tracepoint.h [new file with mode: 0644]