diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index e33b4acece90aca126a50a91321bbd0cd3a533aa..620a467ee3043c5cadfedd02c87c0195bb681413 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -27,6 +27,7 @@ #include "tool.h" #include "data.h" #include "sort.h" +#include "event.h" #include "evlist.h" #include "evsel.h" #include diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 7ab42b8311a10c18f1be6241337fe15097af23a2..10b6362ca0bf7e0b6d5fce4697b15645ba816f02 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -27,13 +27,13 @@ #include "util/drv_configs.h" #include "util/evlist.h" #include "util/evsel.h" +#include "util/event.h" #include "util/machine.h" #include "util/session.h" #include "util/symbol.h" #include "util/thread.h" #include "util/thread_map.h" #include "util/top.h" -#include "util/util.h" #include #include #include "util/parse-events.h" diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index eaa66fb57347642a617026d5423e3ad57b73a979..d014350adc526722da3a12f29421cd6d3c00f4af 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -21,6 +21,7 @@ #include "builtin.h" #include "util/color.h" #include "util/debug.h" +#include "util/event.h" #include "util/evlist.h" #include #include "util/machine.h" diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 4cc6960f6226289926dcee7f60ba0a6c7796332b..628a5e412cb14b00d9ead40bdcbb13db4c82bd75 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -17,6 +17,7 @@ #include #include "util/bpf-loader.h" #include "util/debug.h" +#include "util/event.h" #include #include #include diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index 70918b9865681b5e01d9ad5e2f4512b2a6edb2fb..d549a9f2c41b30f4d35eae742dbdfcb584ee804d 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c @@ -1,5 +1,6 @@ #include "perf.h" #include "util/debug.h" +#include "util/event.h" #include "util/symbol.h" #include "util/sort.h" #include "util/evsel.h" diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index f171b2da48990510a32bb00bc17016bf04af4471..df9c91f49af19927ad48bc9c103aaf8bd43e0c40 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c @@ -3,6 +3,7 @@ #include "util/symbol.h" #include "util/sort.h" #include "util/evsel.h" +#include "util/event.h" #include "util/evlist.h" #include "util/machine.h" #include "util/thread.h" diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index cdf0dde5fe9712b803bffcf98617dcb73fcbb2d3..06e5080182d31e879b25d2cabfc43c7a9a552097 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c @@ -1,5 +1,6 @@ #include "perf.h" #include "util/debug.h" +#include "util/event.h" #include "util/symbol.h" #include "util/sort.h" #include "util/evsel.h" diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 142835c0ca0a7dd76b1e7106b32dc60d63384c83..437194fe04340e358c3a4c9c7f7c1f6ef497ee2a 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -8,6 +8,7 @@ #include #include /* To get things like MAP_HUGETLB even on older libc headers */ #include +#include #include "event.h" #include "debug.h" #include "hist.h" diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index db2de6413518adffc63e8c0c57d2b304696760df..cfbe32bd7413ef32d6ca9e6643895482592b405c 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -681,4 +681,12 @@ u64 kallsyms__get_function_start(const char *kallsyms_filename, void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max); void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map, u16 type, int max); + +void event_attr_init(struct perf_event_attr *attr); + +int perf_event_paranoid(void); + +extern int sysctl_perf_event_max_stack; +extern int sysctl_perf_event_max_contexts_per_stack; + #endif /* __PERF_RECORD_H */ diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 0e879097adfb33b455d16aa31099e698ee34db04..e4f7902d5afa62f0aecab1103bc05ca4bcb226e9 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -21,6 +21,7 @@ #include "asm/bug.h" #include "callchain.h" #include "cgroup.h" +#include "event.h" #include "evsel.h" #include "evlist.h" #include "util.h" diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index e7b6f36d89042f8634736290f195b9c22e29631d..f87b8948efdc9bdad0c7d8601b9f3d26bac743d0 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -56,17 +56,11 @@ int copyfile_offset(int fromfd, loff_t from_ofs, int tofd, loff_t to_ofs, u64 si ssize_t readn(int fd, void *buf, size_t n); ssize_t writen(int fd, void *buf, size_t n); -struct perf_event_attr; - -void event_attr_init(struct perf_event_attr *attr); - size_t hex_width(u64 v); int hex2u64(const char *ptr, u64 *val); extern unsigned int page_size; extern int cacheline_size; -extern int sysctl_perf_event_max_stack; -extern int sysctl_perf_event_max_contexts_per_stack; struct parse_tag { char tag; @@ -75,8 +69,6 @@ struct parse_tag { unsigned long parse_tag_value(const char *str, struct parse_tag *tags); -int perf_event_paranoid(void); - void mem_bswap_64(void *src, int byte_size); void mem_bswap_32(void *src, int byte_size);