48#define P4_REGMAP(a, n) { .addr = a, .name = n }
118#define PMC_PEBS_MATRIX_VERT 63
119#define PMC_PEBS_ENABLE 64
149#define P4_REPLAY_REAL_MASK 0x00000003
150#define P4_REPLAY_VIRT_MASK 0x00000FFC
160 .mat_vert = 0x00000001,
163 .mat_vert = 0x00000001,
166 .mat_vert = 0x00000001,
169 .mat_vert = 0x00000002,
172 .mat_vert = 0x00000003,
175 .mat_vert = 0x00000010,
178 .mat_vert = 0x00000001,
181 .mat_vert = 0x00000001,
184 .mat_vert = 0x00000002,
200 int i, j, escr, cccr;
274 int i, j, escr, cccr;
276 memset(counters, 0,
sizeof(*counters));
323 unsigned int event, event_mask, mask;
324 unsigned int bit, tag_value, tag_enable;
326 unsigned int i, j, k, m, n;
328 int cccr, cccr_pmc, cccr_pmd;
380 if (assigned_pmcs[escr_pmc] ||
397 if (assigned_pmcs[cccr_pmc] ||
404 assigned_pmcs[escr_pmc] = 1;
405 assigned_pmcs[cccr_pmc] = 1;
418 event_mask |= (1 << bit);
474 if (mask > 1 && mask < 11) {
492 __pfm_vbprintf(
"[%s(pmc%u)=0x%lx os=%u usr=%u tag=%u tagval=0x%x mask=%u sel=0x%x] %s\n",
511 __pfm_vbprintf(
"[%s(pmc%u)=0x%lx ena=1 sel=0x%x cmp=%u cmpl=%u thres=%u edg=%u cas=%u] %s\n",
553 if (strcmp(buffer,
"GenuineIntel"))
671 unsigned int mask,
char **desc)
682 unsigned int mask,
unsigned int *code)
#define PENTIUM4_COUNTER_WIDTH
#define PENTIUM4_INST_RETIRED
#define PENTIUM4_CPU_CLK_UNHALTED
#define PENTIUM4_NUM_PMDS
#define PME_INSTR_COMPLETED
#define PENTIUM4_EVENT_COUNT
#define PENTIUM4_NUM_PMCS
pentium4_escr_reg_t pentium4_escrs[]
pentium4_cccr_reg_t pentium4_cccrs[]
pentium4_event_t pentium4_events[]
static int pfm_regmask_set(pfmlib_regmask_t *h, unsigned int b)
#define PFMLIB_ERR_EVTINCOMP
static int pfm_regmask_clr(pfmlib_regmask_t *h, unsigned int b)
#define PFMLIB_ERR_TOOMANY
static int pfm_regmask_isset(pfmlib_regmask_t *h, unsigned int b)
#define PFMLIB_ERR_NOASSIGN
#define PFMLIB_PENTIUM4_PMU
#define PFMLIB_ERR_NOTSUPP
int __pfm_getcpuinfo_attr(const char *attr, char *ret_buf, size_t maxlen)
static void pentium4_get_impl_pmcs(pfmlib_regmask_t *impl_pmcs)
static char * pentium4_get_event_name(unsigned int event)
static int pentium4_get_event_code(unsigned int event, unsigned int pmd, int *code)
static int pentium4_dispatch_events(pfmlib_input_param_t *input, void *model_input, pfmlib_output_param_t *output, void *model_output)
static void pentium4_get_impl_counters(pfmlib_regmask_t *impl_counters)
#define P4_REPLAY_REAL_MASK
static char * pentium4_get_event_mask_name(unsigned int event, unsigned int mask)
static int pentium4_pmu_detect(void)
static unsigned int pentium4_get_num_event_masks(unsigned int event)
static int pentium4_get_cycle_event(pfmlib_event_t *e)
#define PMC_PEBS_MATRIX_VERT
static p4_regmap_t p4_pmc_regmap[]
static int pentium4_get_event_desc(unsigned int event, char **desc)
static void pentium4_get_hw_counter_width(unsigned int *width)
static void pentium4_get_impl_pmds(pfmlib_regmask_t *impl_pmds)
static int pentium4_get_event_mask_code(unsigned int event, unsigned int mask, unsigned int *code)
static void pentium4_get_event_counters(unsigned int event, pfmlib_regmask_t *counters)
static int pentium4_get_event_mask_desc(unsigned int event, unsigned int mask, char **desc)
static int pentium4_get_inst_retired(pfmlib_event_t *e)
#define P4_REPLAY_VIRT_MASK
static pentium4_replay_regs_t p4_replay_regs[]
static p4_regmap_t p4_pmd_regmap[]
pfm_pmu_support_t pentium4_support
#define MAX_CCCRS_PER_ESCR
#define MAX_ESCRS_PER_EVENT
void __pfm_vbprintf(const char *fmt,...)
int allowed_cccrs[MAX_CCCRS_PER_ESCR]
int allowed_escrs[MAX_ESCRS_PER_EVENT]
pentium4_event_mask_t event_masks[EVENT_MASK_BITS]
unsigned int event_select
unsigned int unit_masks[PFMLIB_MAX_MASKS_PER_EVENT]
pfmlib_reg_t pfp_pmds[PFMLIB_MAX_PMDS]
pfmlib_reg_t pfp_pmcs[PFMLIB_MAX_PMCS]
unsigned int pfp_pmc_count
unsigned int pfp_pmd_count
unsigned long long reg_value
unsigned long long reg_addr
unsigned long escr_select
unsigned long active_thread
struct pentium4_cccr_value_t::@86 bits
unsigned long event_select
struct pentium4_escr_value_t::@85 bits