mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 18:12:48 +00:00
The pebs_drain() need to support fixed counters. The DS Save Area now include "counter reset value" fields for each fixed counters. Extend the related variables (e.g. mask, counters, error) to support fixed counters. There is no extended PEBS in PEBS v2 and earlier PEBS format. Only need to change the code for PEBS v3 and later PEBS format. Extend the pebs_event_reset[] logic to support new "counter reset value" fields. Increase the reserve space for fixed counters. Based-on-code-from: Andi Kleen <[email protected]> Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vince Weaver <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
38 lines
849 B
C
38 lines
849 B
C
#ifndef _ASM_INTEL_DS_H
|
|
#define _ASM_INTEL_DS_H
|
|
|
|
#include <linux/percpu-defs.h>
|
|
|
|
#define BTS_BUFFER_SIZE (PAGE_SIZE << 4)
|
|
#define PEBS_BUFFER_SIZE (PAGE_SIZE << 4)
|
|
|
|
/* The maximal number of PEBS events: */
|
|
#define MAX_PEBS_EVENTS 8
|
|
#define MAX_FIXED_PEBS_EVENTS 3
|
|
|
|
/*
|
|
* A debug store configuration.
|
|
*
|
|
* We only support architectures that use 64bit fields.
|
|
*/
|
|
struct debug_store {
|
|
u64 bts_buffer_base;
|
|
u64 bts_index;
|
|
u64 bts_absolute_maximum;
|
|
u64 bts_interrupt_threshold;
|
|
u64 pebs_buffer_base;
|
|
u64 pebs_index;
|
|
u64 pebs_absolute_maximum;
|
|
u64 pebs_interrupt_threshold;
|
|
u64 pebs_event_reset[MAX_PEBS_EVENTS + MAX_FIXED_PEBS_EVENTS];
|
|
} __aligned(PAGE_SIZE);
|
|
|
|
DECLARE_PER_CPU_PAGE_ALIGNED(struct debug_store, cpu_debug_store);
|
|
|
|
struct debug_store_buffers {
|
|
char bts_buffer[BTS_BUFFER_SIZE];
|
|
char pebs_buffer[PEBS_BUFFER_SIZE];
|
|
};
|
|
|
|
#endif
|