intel_ds.h 882 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _ASM_INTEL_DS_H
  2. #define _ASM_INTEL_DS_H
  3. #include <linux/percpu-defs.h>
  4. #define BTS_BUFFER_SIZE (PAGE_SIZE << 4)
  5. #define PEBS_BUFFER_SIZE (PAGE_SIZE << 4)
  6. /* The maximal number of PEBS events: */
  7. #define MAX_PEBS_EVENTS_FMT4 8
  8. #define MAX_PEBS_EVENTS 32
  9. #define MAX_FIXED_PEBS_EVENTS 16
  10. /*
  11. * A debug store configuration.
  12. *
  13. * We only support architectures that use 64bit fields.
  14. */
  15. struct debug_store {
  16. u64 bts_buffer_base;
  17. u64 bts_index;
  18. u64 bts_absolute_maximum;
  19. u64 bts_interrupt_threshold;
  20. u64 pebs_buffer_base;
  21. u64 pebs_index;
  22. u64 pebs_absolute_maximum;
  23. u64 pebs_interrupt_threshold;
  24. u64 pebs_event_reset[MAX_PEBS_EVENTS + MAX_FIXED_PEBS_EVENTS];
  25. } __aligned(PAGE_SIZE);
  26. DECLARE_PER_CPU_PAGE_ALIGNED(struct debug_store, cpu_debug_store);
  27. struct debug_store_buffers {
  28. char bts_buffer[BTS_BUFFER_SIZE];
  29. char pebs_buffer[PEBS_BUFFER_SIZE];
  30. };
  31. #endif