Skip to content

Commit ea49e01

Browse files
committed
perf tools: Move event synthesizing routines to separate header
Those are the only routines using the perf_event__handler_t typedef and are all related, so move to a separate header to reduce the header dependency tree, lots of places were getting event.h and even stdio.h, limits.h indirectly, so fix those as well. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-yvx9u1mf7baq6cu1abfhbqgs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent bd23ac1 commit ea49e01

38 files changed

Lines changed: 154 additions & 177 deletions

‎tools/perf/arch/x86/util/archinsn.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "../../../../arch/x86/include/asm/insn.h"
33
#include "archinsn.h"
4+
#include "event.h"
45
#include "machine.h"
56
#include "thread.h"
67
#include "symbol.h"

‎tools/perf/arch/x86/util/event.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include <linux/string.h>
44
#include <linux/zalloc.h>
55

6+
#include "../../util/event.h"
7+
#include "../../util/synthetic-events.h"
68
#include "../../util/machine.h"
79
#include "../../util/tool.h"
810
#include "../../util/map.h"

‎tools/perf/arch/x86/util/machine.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/types.h>
33
#include <linux/string.h>
4+
#include <limits.h>
45
#include <stdlib.h>
56

67
#include "../../util/util.h" // page_size

‎tools/perf/arch/x86/util/tsc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <linux/types.h>
99
#include <asm/barrier.h>
1010
#include "../../../util/debug.h"
11+
#include "../../../util/event.h"
12+
#include "../../../util/synthetic-events.h"
1113
#include "../../../util/tsc.h"
1214

1315
int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,

‎tools/perf/builtin-inject.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "util/auxtrace.h"
2222
#include "util/jit.h"
2323
#include "util/symbol.h"
24+
#include "util/synthetic-events.h"
2425
#include "util/thread.h"
2526

2627
#include <subcmd/parse-options.h>

‎tools/perf/builtin-kvm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "util/debug.h"
1818
#include "util/tool.h"
1919
#include "util/stat.h"
20+
#include "util/synthetic-events.h"
2021
#include "util/top.h"
2122
#include "util/data.h"
2223
#include "util/ordered-events.h"

‎tools/perf/builtin-record.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include "util/trigger.h"
3939
#include "util/perf-hooks.h"
4040
#include "util/cpu-set-sched.h"
41+
#include "util/synthetic-events.h"
4142
#include "util/time-utils.h"
4243
#include "util/units.h"
4344
#include "util/bpf-event.h"

‎tools/perf/builtin-stat.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
#include "util/tool.h"
6262
#include "util/string2.h"
6363
#include "util/metricgroup.h"
64+
#include "util/synthetic-events.h"
6465
#include "util/target.h"
6566
#include "util/time-utils.h"
6667
#include "util/top.h"

‎tools/perf/builtin-top.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "util/map.h"
3333
#include "util/session.h"
3434
#include "util/symbol.h"
35+
#include "util/synthetic-events.h"
3536
#include "util/top.h"
3637
#include "util/util.h"
3738
#include <linux/rbtree.h>

‎tools/perf/builtin-trace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "util/dso.h"
2929
#include "util/env.h"
3030
#include "util/event.h"
31+
#include "util/synthetic-events.h"
3132
#include "util/evlist.h"
3233
#include "util/evswitch.h"
3334
#include <subcmd/pager.h>

0 commit comments

Comments
 (0)