Revert "perf augmented_syscalls: Drop 'write', 'poll' for testing without self pid...
[linux/fpc-iii.git] / tools / perf / util / tsc.h
blobe0c3af34ac8dfc78ff21a7e594e5c30797ab6274
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_TSC_H
3 #define __PERF_TSC_H
5 #include <linux/types.h>
7 #include "event.h"
9 struct perf_tsc_conversion {
10 u16 time_shift;
11 u32 time_mult;
12 u64 time_zero;
14 struct perf_event_mmap_page;
16 int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,
17 struct perf_tsc_conversion *tc);
19 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);
21 u64 rdtsc(void);
23 struct perf_event_mmap_page;
24 struct perf_tool;
25 struct machine;
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);
32 #endif