Skip to content

Commit f2a39fe

Browse files
committed
perf auxtrace: Uninline functions that touch perf_session
So that we don't carry the session.h include directive in auxtrace.h, which in turn opens a can of worms of files that were getting all sorts of things via that include, fix them all. 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-d2d83aovpgri2z75wlitquni@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent fa0d984 commit f2a39fe

41 files changed

Lines changed: 98 additions & 38 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tools/perf/arch/arm/annotate/instructions.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/zalloc.h>
44
#include <sys/types.h>
55
#include <regex.h>
6+
#include <stdlib.h>
67

78
struct arm_annotate {
89
regex_t call_insn,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "../../util/pmu.h"
2727
#include "../../util/cs-etm.h"
2828
#include "../../util/util.h"
29+
#include "../../util/session.h"
2930

3031
#include <errno.h>
3132
#include <stdlib.h>

‎tools/perf/arch/arm64/annotate/instructions.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <linux/compiler.h>
33
#include <sys/types.h>
44
#include <regex.h>
5+
#include <stdlib.h>
56

67
struct arm64_annotate {
78
regex_t call_insn,

‎tools/perf/arch/x86/tests/perf-time-to-tsc.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 <errno.h>
33
#include <inttypes.h>
4+
#include <limits.h>
45
#include <stdbool.h>
56
#include <stdio.h>
67
#include <unistd.h>

‎tools/perf/builtin-ftrace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <errno.h>
1111
#include <unistd.h>
1212
#include <signal.h>
13+
#include <stdlib.h>
1314
#include <fcntl.h>
1415
#include <poll.h>
1516
#include <linux/capability.h>

‎tools/perf/tests/backward-ring-buffer.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "record.h"
1010
#include "tests.h"
1111
#include "debug.h"
12+
#include "parse-events.h"
1213
#include <errno.h>
1314
#include <linux/string.h>
1415

‎tools/perf/tests/bpf.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "tests.h"
1919
#include "llvm.h"
2020
#include "debug.h"
21+
#include "parse-events.h"
2122
#define NR_ITERS 111
2223
#define PERF_TEST_BPF_PATH "/sys/fs/bpf/perf_test"
2324

‎tools/perf/tests/builtin-test.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <errno.h>
99
#include <unistd.h>
1010
#include <string.h>
11+
#include <stdlib.h>
1112
#include <sys/types.h>
1213
#include <dirent.h>
1314
#include <sys/wait.h>

‎tools/perf/tests/code-reading.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313

1414
#include "debug.h"
1515
#include "dso.h"
16+
#include "env.h"
1617
#include "parse-events.h"
18+
#include "trace-event.h"
1719
#include "evlist.h"
1820
#include "evsel.h"
1921
#include "thread_map.h"
@@ -496,6 +498,10 @@ static void fs_something(void)
496498
}
497499
}
498500

501+
#ifdef __s390x__
502+
#include "header.h" // for get_cpuid()
503+
#endif
504+
499505
static const char *do_determine_event(bool excl_kernel)
500506
{
501507
const char *event = excl_kernel ? "cycles:u" : "cycles";

‎tools/perf/tests/event-times.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "evsel.h"
1212
#include "util.h"
1313
#include "debug.h"
14+
#include "parse-events.h"
1415
#include "thread_map.h"
1516
#include "target.h"
1617

0 commit comments

Comments
 (0)