tsc.h 689 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __PERF_TSC_H
  2. #define __PERF_TSC_H
  3. #include <linux/types.h>
  4. #include "event.h"
  5. struct perf_tsc_conversion {
  6. u16 time_shift;
  7. u32 time_mult;
  8. u64 time_zero;
  9. };
  10. struct perf_event_mmap_page;
  11. int perf_read_tsc_conversion(const struct perf_event_mmap_page *pc,
  12. struct perf_tsc_conversion *tc);
  13. u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc);
  14. u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc);
  15. u64 rdtsc(void);
  16. struct perf_event_mmap_page;
  17. struct perf_tool;
  18. struct machine;
  19. int perf_event__synth_time_conv(const struct perf_event_mmap_page *pc,
  20. struct perf_tool *tool,
  21. perf_event__handler_t process,
  22. struct machine *machine);
  23. #endif