Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / tools / perf / util / tsc.h
CommitLineData
0b437860
AH
1#ifndef __PERF_TSC_H
2#define __PERF_TSC_H
3
4#include <linux/types.h>
5
46bc29b9 6#include "event.h"
2a28e230
AH
7
8struct perf_tsc_conversion {
9 u16 time_shift;
10 u32 time_mult;
11 u64 time_zero;
12};
13struct perf_event_mmap_page;
14
15int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,
16 struct perf_tsc_conversion *tc);
0b437860
AH
17
18u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc);
19u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc);
a6a69db4 20u64 rdtsc(void);
0b437860 21
46bc29b9
AH
22struct perf_event_mmap_page;
23struct perf_tool;
24struct machine;
25
26int perf_event__synth_time_conv(const struct perf_event_mmap_page *pc,
27 struct perf_tool *tool,
28 perf_event__handler_t process,
29 struct machine *machine);
30
0b437860 31#endif