intel_ds.h 793 B

123456789101112131415161718192021222324252627282930313233343536
  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 8
  8. /*
  9. * A debug store configuration.
  10. *
  11. * We only support architectures that use 64bit fields.
  12. */
  13. struct debug_store {
  14. u64 bts_buffer_base;
  15. u64 bts_index;
  16. u64 bts_absolute_maximum;
  17. u64 bts_interrupt_threshold;
  18. u64 pebs_buffer_base;
  19. u64 pebs_index;
  20. u64 pebs_absolute_maximum;
  21. u64 pebs_interrupt_threshold;
  22. u64 pebs_event_reset[MAX_PEBS_EVENTS];
  23. } __aligned(PAGE_SIZE);
  24. DECLARE_PER_CPU_PAGE_ALIGNED(struct debug_store, cpu_debug_store);
  25. struct debug_store_buffers {
  26. char bts_buffer[BTS_BUFFER_SIZE];
  27. char pebs_buffer[PEBS_BUFFER_SIZE];
  28. };
  29. #endif