diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-18 10:36:13 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-20 08:19:22 -0400 |
commit | ea49e01cfabd73c94a61649cd04fa524a2beff3c (patch) | |
tree | 3f8598c62cf6d33fcabf0561a8a43d49f8acf4c7 /tools/perf/util/tsc.h | |
parent | bd23ac11fe9312bab40e129b402757fd7a23dc8e (diff) |
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>
Diffstat (limited to 'tools/perf/util/tsc.h')
-rw-r--r-- | tools/perf/util/tsc.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/perf/util/tsc.h b/tools/perf/util/tsc.h index e0c3af34ac8d..3c5a632ee57c 100644 --- a/tools/perf/util/tsc.h +++ b/tools/perf/util/tsc.h | |||
@@ -4,13 +4,12 @@ | |||
4 | 4 | ||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | 6 | ||
7 | #include "event.h" | ||
8 | |||
9 | struct perf_tsc_conversion { | 7 | struct perf_tsc_conversion { |
10 | u16 time_shift; | 8 | u16 time_shift; |
11 | u32 time_mult; | 9 | u32 time_mult; |
12 | u64 time_zero; | 10 | u64 time_zero; |
13 | }; | 11 | }; |
12 | |||
14 | struct perf_event_mmap_page; | 13 | struct perf_event_mmap_page; |
15 | 14 | ||
16 | int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, | 15 | int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc, |
@@ -20,13 +19,4 @@ u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc); | |||
20 | u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc); | 19 | u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc); |
21 | u64 rdtsc(void); | 20 | u64 rdtsc(void); |
22 | 21 | ||
23 | struct perf_event_mmap_page; | 22 | #endif // __PERF_TSC_H |
24 | struct perf_tool; | ||
25 | struct machine; | ||
26 | |||
27 | int perf_event__synth_time_conv(const struct perf_event_mmap_page *pc, | ||
28 | struct perf_tool *tool, | ||
29 | perf_event__handler_t process, | ||
30 | struct machine *machine); | ||
31 | |||
32 | #endif | ||