Skip to content

Commit 9b7c772

Browse files
captain5050acmel
authored andcommitted
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 <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ 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 <[email protected]>
1 parent 32f457a commit 9b7c772

File tree

12 files changed

+791
-738
lines changed

12 files changed

+791
-738
lines changed

tools/perf/builtin-list.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
#include "builtin.h"
1212

13-
#include "util/parse-events.h"
13+
#include "util/print-events.h"
1414
#include "util/pmu.h"
1515
#include "util/pmu-hybrid.h"
1616
#include "util/debug.h"

tools/perf/builtin-lock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <subcmd/pager.h>
1717
#include <subcmd/parse-options.h>
1818
#include "util/trace-event.h"
19+
#include "util/tracepoint.h"
1920

2021
#include "util/debug.h"
2122
#include "util/session.h"

tools/perf/builtin-timechart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "util/data.h"
3737
#include "util/debug.h"
3838
#include "util/string2.h"
39+
#include "util/tracepoint.h"
3940
#include <linux/err.h>
4041

4142
#ifdef LACKS_OPEN_MEMSTREAM_PROTOTYPE

tools/perf/builtin-trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
#include "trace-event.h"
5454
#include "util/parse-events.h"
5555
#include "util/bpf-loader.h"
56+
#include "util/tracepoint.h"
5657
#include "callchain.h"
5758
#include "print_binary.h"
5859
#include "string2.h"

tools/perf/util/Build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ perf-y += mmap.o
2626
perf-y += memswap.o
2727
perf-y += parse-events.o
2828
perf-y += parse-events-hybrid.o
29+
perf-y += print-events.o
30+
perf-y += tracepoint.o
2931
perf-y += perf_regs.o
3032
perf-y += path.o
3133
perf-y += print_binary.o

0 commit comments

Comments
 (0)