Skip to content

Commit aeb00b1

Browse files
committed
perf record: Move record_opts and other record decls out of perf.h
And into a separate util/record.h, to better isolate things and make sure that those who use record_opts and the other moved declarations are explicitly including the necessary header. 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-31q8mei1qkh74qvkl9nwidfq@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 38b7b67 commit aeb00b1

30 files changed

Lines changed: 107 additions & 73 deletions

‎tools/perf/arch/arm/util/cs-etm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/zalloc.h>
1616

1717
#include "cs-etm.h"
18-
#include "../../perf.h"
18+
#include "../../util/record.h"
1919
#include "../../util/auxtrace.h"
2020
#include "../../util/cpumap.h"
2121
#include "../../util/evlist.h"

‎tools/perf/arch/arm64/util/arm-spe.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "../../util/pmu.h"
2020
#include "../../util/debug.h"
2121
#include "../../util/auxtrace.h"
22+
#include "../../util/record.h"
2223
#include "../../util/arm-spe.h"
2324

2425
#define KiB(x) ((x) * 1024)

‎tools/perf/arch/s390/util/auxtrace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "../../util/evlist.h"
99
#include "../../util/auxtrace.h"
1010
#include "../../util/evsel.h"
11+
#include "../../util/record.h"
1112

1213
#define PERF_EVENT_CPUM_SF 0xB0000 /* Event: Basic-sampling */
1314
#define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */

‎tools/perf/arch/x86/tests/perf-time-to-tsc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <errno.h>
33
#include <inttypes.h>
4+
#include <stdbool.h>
45
#include <stdio.h>
56
#include <unistd.h>
67
#include <linux/types.h>
@@ -13,6 +14,7 @@
1314
#include "evsel.h"
1415
#include "thread_map.h"
1516
#include "cpumap.h"
17+
#include "record.h"
1618
#include "tsc.h"
1719
#include "tests/tests.h"
1820

‎tools/perf/arch/x86/util/intel-bts.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "../../util/session.h"
1818
#include "../../util/pmu.h"
1919
#include "../../util/debug.h"
20+
#include "../../util/record.h"
2021
#include "../../util/tsc.h"
2122
#include "../../util/auxtrace.h"
2223
#include "../../util/intel-bts.h"

‎tools/perf/arch/x86/util/intel-pt.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/zalloc.h>
1414
#include <cpuid.h>
1515

16-
#include "../../perf.h"
1716
#include "../../util/session.h"
1817
#include "../../util/event.h"
1918
#include "../../util/evlist.h"
@@ -24,6 +23,8 @@
2423
#include "../../util/pmu.h"
2524
#include "../../util/debug.h"
2625
#include "../../util/auxtrace.h"
26+
#include "../../util/record.h"
27+
#include "../../util/target.h"
2728
#include "../../util/tsc.h"
2829
#include "../../util/intel-pt.h"
2930

‎tools/perf/builtin-record.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
*/
99
#include "builtin.h"
1010

11-
#include "perf.h"
12-
1311
#include "util/build-id.h"
1412
#include <subcmd/parse-options.h>
1513
#include "util/parse-events.h"
@@ -22,9 +20,11 @@
2220
#include "util/evlist.h"
2321
#include "util/evsel.h"
2422
#include "util/debug.h"
23+
#include "util/target.h"
2524
#include "util/session.h"
2625
#include "util/tool.h"
2726
#include "util/symbol.h"
27+
#include "util/record.h"
2828
#include "util/cpumap.h"
2929
#include "util/thread_map.h"
3030
#include "util/data.h"

‎tools/perf/builtin-script.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "builtin.h"
33

4-
#include "perf.h"
54
#include "util/cache.h"
65
#include "util/counts.h"
76
#include "util/debug.h"
@@ -51,6 +50,7 @@
5150
#include <unistd.h>
5251
#include <subcmd/pager.h>
5352
#include <perf/evlist.h>
53+
#include "util/record.h"
5454

5555
#include <linux/ctype.h>
5656

‎tools/perf/builtin-stat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
* Jaswinder Singh Rajput <jaswinder@kernel.org>
4141
*/
4242

43-
#include "perf.h"
4443
#include "builtin.h"
4544
#include "util/cgroup.h"
4645
#include <subcmd/parse-options.h>
@@ -62,6 +61,7 @@
6261
#include "util/tool.h"
6362
#include "util/string2.h"
6463
#include "util/metricgroup.h"
64+
#include "util/target.h"
6565
#include "util/top.h"
6666
#include "asm/bug.h"
6767

‎tools/perf/builtin-trace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* http://lwn.net/Articles/415728/ ("Announcing a new utility: 'trace'")
1515
*/
1616

17+
#include "util/record.h"
1718
#include <traceevent/event-parse.h>
1819
#include <api/fs/tracing_path.h>
1920
#include <bpf/bpf.h>

0 commit comments

Comments
 (0)