#include <linux/perf_event.h>
#include <asm/perf_event_p4.h>
#include <asm/hardirq.h>
#include <asm/apic.h>
#include "../perf_event.h"
#define P4_CNTR_LIMIT …
struct p4_event_bind { … };
struct p4_pebs_bind { … };
#define P4_GEN_PEBS_BIND(name, pebs, vert) …
static struct p4_pebs_bind p4_pebs_bind_map[] = …;
static struct p4_event_bind p4_event_bind_map[] = …;
#define P4_GEN_CACHE_EVENT(event, bit, metric) …
static __initconst const u64 p4_hw_cache_event_ids
[PERF_COUNT_HW_CACHE_MAX]
[PERF_COUNT_HW_CACHE_OP_MAX]
[PERF_COUNT_HW_CACHE_RESULT_MAX] = …;
static struct p4_event_alias { … } p4_event_aliases[] = …;
static u64 p4_get_alias_event(u64 config)
{ … }
static u64 p4_general_events[PERF_COUNT_HW_MAX] = …;
static struct p4_event_bind *p4_config_get_bind(u64 config)
{ … }
static u64 p4_pmu_event_map(int hw_event)
{ … }
static bool p4_event_match_cpu_model(unsigned int event_idx)
{ … }
static int p4_validate_raw_event(struct perf_event *event)
{ … }
static int p4_hw_config(struct perf_event *event)
{ … }
static inline int p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc)
{ … }
static void p4_pmu_disable_pebs(void)
{ … }
static inline void p4_pmu_disable_event(struct perf_event *event)
{ … }
static void p4_pmu_disable_all(void)
{ … }
static void p4_pmu_enable_pebs(u64 config)
{ … }
static void __p4_pmu_enable_event(struct perf_event *event)
{ … }
static DEFINE_PER_CPU(unsigned long [BITS_TO_LONGS(X86_PMC_IDX_MAX)], p4_running);
static void p4_pmu_enable_event(struct perf_event *event)
{ … }
static void p4_pmu_enable_all(int added)
{ … }
static int p4_pmu_set_period(struct perf_event *event)
{ … }
static int p4_pmu_handle_irq(struct pt_regs *regs)
{ … }
static void p4_pmu_swap_config_ts(struct hw_perf_event *hwc, int cpu)
{ … }
#define P4_ESCR_MSR_BASE …
#define P4_ESCR_MSR_MAX …
#define P4_ESCR_MSR_TABLE_SIZE …
#define P4_ESCR_MSR_IDX(msr) …
#define P4_ESCR_MSR_TABLE_ENTRY(msr) …
static const unsigned int p4_escr_table[P4_ESCR_MSR_TABLE_SIZE] = …;
static int p4_get_escr_idx(unsigned int addr)
{ … }
static int p4_next_cntr(int thread, unsigned long *used_mask,
struct p4_event_bind *bind)
{ … }
static int p4_pmu_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
{ … }
PMU_FORMAT_ATTR(…);
PMU_FORMAT_ATTR(…);
PMU_FORMAT_ATTR(…);
static struct attribute *intel_p4_formats_attr[] = …;
static __initconst const struct x86_pmu p4_pmu = …;
__init int p4_pmu_init(void)
{ … }