39#define is_ear(i) event_is_ear(montecito_pe+(i))
40#define is_ear_tlb(i) event_is_ear_tlb(montecito_pe+(i))
41#define is_ear_alat(i) event_is_ear_alat(montecito_pe+(i))
42#define is_ear_cache(i) event_is_ear_cache(montecito_pe+(i))
43#define is_iear(i) event_is_iear(montecito_pe+(i))
44#define is_dear(i) event_is_dear(montecito_pe+(i))
45#define is_etb(i) event_is_etb(montecito_pe+(i))
46#define has_opcm(i) event_opcm_ok(montecito_pe+(i))
47#define has_iarr(i) event_iarr_ok(montecito_pe+(i))
48#define has_darr(i) event_darr_ok(montecito_pe+(i))
49#define has_all(i) event_all_ok(montecito_pe+(i))
50#define has_mesi(i) event_mesi_ok(montecito_pe+(i))
52#define evt_use_opcm(e) ((e)->pfp_mont_opcm1.opcm_used != 0 || (e)->pfp_mont_opcm2.opcm_used !=0)
53#define evt_use_irange(e) ((e)->pfp_mont_irange.rr_used)
54#define evt_use_drange(e) ((e)->pfp_mont_drange.rr_used)
56#define evt_grp(e) (int)montecito_pe[e].pme_qualifiers.pme_qual.pme_group
57#define evt_set(e) (int)montecito_pe[e].pme_qualifiers.pme_qual.pme_set
58#define evt_umask(e) montecito_pe[e].pme_umask
59#define evt_type(e) (int)montecito_pe[e].pme_type
60#define evt_caf(e) (int)montecito_pe[e].pme_caf
62#define FINE_MODE_BOUNDARY_BITS 16
63#define FINE_MODE_MASK ~((1U<<FINE_MODE_BOUNDARY_BITS)-1)
66#define pmc_plm pmc_mont_counter_reg.pmc_plm
67#define pmc_ev pmc_mont_counter_reg.pmc_ev
68#define pmc_oi pmc_mont_counter_reg.pmc_oi
69#define pmc_pm pmc_mont_counter_reg.pmc_pm
70#define pmc_es pmc_mont_counter_reg.pmc_es
71#define pmc_umask pmc_mont_counter_reg.pmc_umask
72#define pmc_thres pmc_mont_counter_reg.pmc_thres
73#define pmc_all pmc_mont_counter_reg.pmc_all
74#define pmc_ism pmc_mont_counter_reg.pmc_ism
75#define pmc_m pmc_mont_counter_reg.pmc_m
76#define pmc_e pmc_mont_counter_reg.pmc_e
77#define pmc_s pmc_mont_counter_reg.pmc_s
78#define pmc_i pmc_mont_counter_reg.pmc_i
80#define UNEXISTING_SET 0xff
138 unsigned long *l2d_set1_mask,
unsigned long *l2d_set2_mask)
144 unsigned long l2d_mask1 = 0, l2d_mask2 = 0;
152 for (
i=0;
i < cnt;
i++) {
157 DPRINT(
"i=%u g=%d s=%d\n",
i, g,
s);
159 for (j=
i+1; j < cnt; j++) {
160 if (
evt_grp(e[j].event) != g)
continue;
174 for (
i=0;
i < cnt;
i++) {
185 l2d_mask1 |= 1UL <<
i;
189 l2d_mask2 |= 1UL <<
i;
197 l2d_mask1 |= 1UL <<
i;
198 }
else if (
s2 == -1) {
200 l2d_mask2 |= 1UL <<
i;
208 *l1d_event = l1d_event_idx;
209 *l2d_set1_mask = l2d_mask1;
210 *l2d_set2_mask = l2d_mask2;
233#define NPREFETCH_EVENTS sizeof(prefetch_events)/sizeof(int)
242#define NPREFETCH_DUAL_EVENTS sizeof(prefetch_dual_events)/sizeof(int)
256 int found = 0, found_ibrp0 = 0, found_ibrp1 = 0;
262 prefetch_codes[
i] = code;
267 prefetch_dual_codes[
i] = code;
274 if (
c == prefetch_codes[j]) {
284 if (
c == prefetch_dual_codes[j]) {
303 *base_idx = found_ibrp0 ? 0 : 2;
304 if (found_ibrp1 && found_ibrp0)
346 unsigned int i,
count, found = 0;
347 unsigned long umask, mask;
370 if (retired_mask) *retired_mask = mask;
380 for(
i=0;
i < n;
i++) {
397 for(
i=0;
i < 4;
i++) {
399 if (lim[
i].rr_start == 0 && lim[
i].rr_end == 0)
break;
404 if (mode == 0 && (lim[
i].rr_start & 0xf || lim[
i].rr_end & 0xf))
421#define NCANCEL_EVENTS sizeof(cancel_events)/sizeof(int)
433 cancel_codes[
i] = code;
439 if (code == cancel_codes[j]) {
464 unsigned int i,j, k, max_cnt;
467 unsigned int l1d_set;
468 unsigned long l2d_set1_mask, l2d_set2_mask, evt_mask, mesi;
469 unsigned long not_assigned_events, cnt_mask;
470 int l2d_set1_p, l2d_set2_p;
479 for (m=0; m < cnt; m++) {
500 DPRINT(
"l1d_set=%u l2d_set1_mask=0x%lx l2d_set2_mask=0x%lx\n", l1d_set, l2d_set1_mask, l2d_set2_mask);
509 not_assigned_events = 0;
511 DPRINT(
"avail_cntrs=0x%lx\n", avail_cntrs.
bits[0]);
527 l2d_set1_p = l2d_set2_p = 0;
532 for (
i=0;
i < cnt ;
i++) {
539 if (l2d_set1_p < 3 && (l2d_set1_mask & evt_mask)) {
552 if (l2d_set2_p < 3 && (l2d_set2_mask & evt_mask)) {
566 not_assigned_events |= evt_mask;
568 DPRINT(
"phase 1: i=%u avail_cntrs=0x%lx l2d_set1_p=%d l2d_set2_p=%d not_assigned=0x%lx\n",
573 not_assigned_events);
578 evt_mask = not_assigned_events;
579 for (
i=0; evt_mask ;
i++, evt_mask >>=1) {
581 if ((evt_mask & 0x1) == 0)
588 if (cnt_mask == 0xfff0)
591 for(j=0; cnt_mask; j++, cnt_mask >>=1) {
592 if ((cnt_mask & 0x1) == 0)
595 DPRINT(
"phase 2: i=%d j=%d cnt_mask=0x%lx avail_cntrs=0x%lx not_assigned_evnts=0x%lx\n",
596 i, j, cnt_mask, avail_cntrs.
bits[0], not_assigned_events);
602 not_assigned_events &= ~(1UL <<
i);
612 evt_mask = not_assigned_events;
614 for (
i=0, j=0; evt_mask ;
i++, evt_mask >>=1) {
616 DPRINT(
"phase 3a: i=%d j=%d evt_mask=0x%lx avail_cntrs=0x%lx not_assigned_evnts=0x%lx\n",
617 i, j, evt_mask, avail_cntrs.
bits[0], not_assigned_events);
618 if ((evt_mask & 0x1) == 0)
622 DPRINT(
"phase 3: i=%d j=%d evt_mask=0x%lx avail_cntrs=0x%lx not_assigned_evnts=0x%lx\n",
623 i, j, evt_mask, avail_cntrs.
bits[0], not_assigned_events);
634 for (j=0; j < cnt ; j++ ) {
641 DPRINT(
".all mode is not yet supported by libpfm\n");
663 reg.
pmc_m = (mesi>>3) & 0x1;
664 reg.
pmc_e = (mesi>>2) & 0x1;
665 reg.
pmc_s = (mesi>>1) & 0x1;
666 reg.
pmc_i = mesi & 0x1;
678 __pfm_vbprintf(
"[PMC%u(pmc%u)=0x%06lx m=%d e=%d s=%d i=%d thres=%d all=%d es=0x%02x plm=%d umask=0x%x pm=%d ism=0x%x oi=%d] %s\n",
709 unsigned int pos1, pos2;
729 memset(&fake_param, 0,
sizeof(fake_param));
739 DPRINT(
"I-EAR event with no info\n");
761 DPRINT(
"ALAT mode not supported in I-EAR mode\n");
780 __pfm_vbprintf(
"[PMC37(pmc37)=0x%lx ctb=tlb plm=%d pm=%d umask=0x%x]\n",
786 __pfm_vbprintf(
"[PMC37(pmc37)=0x%lx ctb=cache plm=%d pm=%d umask=0x%x]\n",
808 unsigned int pos1, pos2;
828 memset(&fake_param, 0,
sizeof(fake_param));
838 DPRINT(
"D-EAR event with no info\n");
878 __pfm_vbprintf(
"[PMC40(pmc40)=0x%lx mode=%s plm=%d pm=%d ism=0x%x umask=0x%x]\n",
901 unsigned int i, has_1st_pair, has_2nd_pair,
count;
903 int used_pmc32, used_pmc34;
907#define PMC36_DFL_VAL 0xfffffff0
917 reg1.
pmc_val = 0x030f01ffffffffff;
978 has_1st_pair = has_2nd_pair = 0;
989 __pfm_vbprintf(
"[PMC32(pmc32)=0x%lx m=%d i=%d f=%d b=%d mask=0x%lx inv=%d ig_ad=%d]\n",
1008 reg1.
pmc_val = 0x01ffffffffff;
1034 has_1st_pair = has_2nd_pair = 0;
1043 __pfm_vbprintf(
"[PMC34(pmc34)=0x%lx m=%d i=%d f=%d b=%d mask=0x%lx]\n",
1066 __pfm_vbprintf(
"[PMC36(pmc36)=0x%lx ch0_ig_op=%d ch1_ig_op=%d ch2_ig_op=%d ch3_ig_op=%d]\n",
1087 int found_etb = 0, found_bad_dear = 0;
1089 unsigned int i, pos1, pos2;
1110 if (
is_etb(e[
i].event)) found_etb = 1;
1122 DPRINT(
"found_etb=%d found_bar_dear=%d\n", found_etb, found_bad_dear);
1136 if (found_etb == 0 && has_etb_param == 0 && found_bad_dear == 0)
return PFMLIB_SUCCESS;
1138 if (has_etb_param == 0) {
1143 if (found_etb == 0)
goto assign_zero;
1149 memset(&fake_param, 0,
sizeof(fake_param));
1150 param = &fake_param;
1157 DPRINT(
"ETB event with no info\n");
1192 __pfm_vbprintf(
"[PMC39(pmc39)=0x%lx plm=%d pm=%d ds=%d tm=%d ptm=%d ppm=%d brt=%d]\n",
1207 if (found_etb || has_etb_param) {
1217 for(
i=48;
i < 64;
i++, pos2++) {
1220 __pfm_vbprintf(
"[PMD%u(pmd%u)]\n", pd[pos2].reg_num, pd[pos2].reg_num);
1233 pfmlib_reg_t *br,
int nbr,
int dir,
int *idx,
int *reg_idx,
int plm)
1235 unsigned long size, l_addr,
c;
1236 unsigned long l_offs = 0, r_offs = 0;
1237 unsigned long l_size, r_size;
1241 if (nbr < 1 || end <=
start)
return;
1245 DPRINT(
"start=0x%016lx end=0x%016lx size=0x%lx bytes (%lu bundles) nbr=%d dir=%d\n",
1246 start, end, size, size >> 4, nbr, dir);
1252 DPRINT(
"largest power of two possible: 2^%d=0x%lx, crossing=0x%016lx\n",
1256 if ((
c - (1UL<<p2)) >=
start) {
1257 l_addr =
c - (1UL << p2);
1261 if ((
c + (1UL<<p2)) <= end) {
1264 l_addr =
c - (1UL << p2);
1267 l_size = l_addr -
start;
1268 r_size = end - l_addr-(1UL<<p2);
1271 printf(
"largest chunk: 2^%d=0x%lx @0x%016lx-0x%016lx\n", p2, 1UL<<p2, l_addr, l_addr+(1UL<<p2));
1272 if (l_size) printf(
"before: 0x%016lx-0x%016lx\n",
start, l_addr);
1273 if (r_size) printf(
"after : 0x%016lx-0x%016lx\n", l_addr+(1UL<<p2), end);
1276 if (dir == 0 && l_size != 0 && nbr == 1) {
1278 l_addr = end - (1UL << p2);
1280 l_offs =
start - l_addr;
1281 printf(
">>l_offs: 0x%lx\n", l_offs);
1283 }
else if (dir == 1 && r_size != 0 && nbr == 1) {
1287 r_offs = l_addr+(1UL<<p2) - end;
1288 printf(
">>r_offs: 0x%lx\n", r_offs);
1291 l_size = l_addr -
start;
1292 r_size = end - l_addr-(1UL<<p2);
1295 printf(
">>largest chunk: 2^%d @0x%016lx-0x%016lx\n", p2, l_addr, l_addr+(1UL<<p2));
1296 if (l_size && !l_offs) printf(
">>before: 0x%016lx-0x%016lx\n",
start, l_addr);
1297 if (r_size && !r_offs) printf(
">>after : 0x%016lx-0x%016lx\n", l_addr+(1UL<<p2), end);
1321 br[*idx+1].
reg_num = *reg_idx+1;
1332 r_nbr = l_nbr = nbr >>1;
1340 if (l_size > r_size) {
1348 do_normal_rr(l_addr+(1UL<<p2), end, br, r_nbr, 1, idx, reg_idx, plm);
1357 unsigned long r_end;
1362 fine_mode ?
", fine_mode" :
"",
1367 for (j=0; j < n_pairs; j++, base_idx+=2) {
1373 __pfm_vbprintf(
"brp%u: db%u: 0x%016lx db%u: plm=0x%x mask=0x%016lx\n",
1374 dbr[base_idx].reg_num>>1,
1375 dbr[base_idx].reg_num,
1376 dbr[base_idx].reg_value,
1377 dbr[base_idx+1].reg_num,
1380 __pfm_vbprintf(
"brp%u: db%u: 0x%016lx db%u: plm=0x%x mask=0x%016lx end=0x%016lx\n",
1381 dbr[base_idx].reg_num>>1,
1382 dbr[base_idx].reg_num,
1383 dbr[base_idx].reg_value,
1384 dbr[base_idx+1].reg_num,
1407 reg_idx = *base_idx;
1414 for (
i=0;
i < n;
i++, reg_idx += 2, in_rr++, br+= 4) {
1450 addr = in_rr->
rr_end - 0x10;
1452 if ((addr & 0x1f) == 0) addr += 0x10;
1468 *base_idx = reg_idx;
1479 unsigned long size, end,
start;
1480 unsigned long p_start, p_end;
1494 reg_idx = *base_idx;
1499 if (size & ((1UL << l)-1)) {
1501 printf(
"range: [0x%lx-0x%lx] too big\n",
start, end);
1507 DPRINT(
"size=%ld, l=%d m=%d, internal: 0x%lx full: 0x%lx\n",
1513 for (; m < 64; m++) {
1515 p_end = p_start+(1UL<<m);
1516 if (p_end >= end)
goto found;
1520 DPRINT(
"m=%d p_start=0x%lx p_end=0x%lx\n", m, p_start,p_end);
1537 out_rr->
rr_eoff = p_end - end;
1544 *base_idx = reg_idx;
1554 unsigned long r_end;
1558 int br_index, reg_idx, prev_index;
1563 reg_idx = *base_idx;
1566 for (
i=0;
i < n;
i++, in_rr++, out_rr++) {
1570 if (br_index == 8)
break;
1572 prev_index = br_index;
1582 DPRINT(
"br_index=%d reg_idx=%d\n", br_index, reg_idx);
1589 for(j=prev_index; j < br_index; j+=2) {
1594 if (br[j].reg_value <= in_rr->rr_start)
1597 if (r_end >= in_rr->
rr_end)
1610 *base_idx = reg_idx;
1624 unsigned long retired_mask;
1626 unsigned int retired_only, retired_count, fine_mode, prefetch_count;
1627 unsigned int n_intervals;
1628 int base_idx = 0, dup = 0;
1652 DPRINT(
"n_intervals=%d retired_only=%d retired_count=%d fine_mode=%d\n",
1653 n_intervals, retired_only, retired_count, fine_mode);
1688 DPRINT(
"prefetch_count=%u base_idx=%d dup=%d\n", prefetch_count, base_idx, dup);
1697 if (fine_mode == 0) {
1748 }
else if (retired_only) {
1767 __pfm_vbprintf(
"[PMC38(pmc38)=0x%lx ig_ibrp0=%d ig_ibrp1=%d ig_ibrp2=%d ig_ibrp3=%d fine=%d]\n",
1805 int iod_codes[4], dfl_val_pmc32, dfl_val_pmc34;
1806 unsigned int n_intervals;
1831 iod_codes[0] = iod_codes[1] = iod_codes[2] = iod_codes[3] = 0;
1887 for(
i=0;
i <= pos;
i++) {
1888 if (pc[
i].reg_num == 38) {
1907 iod_codes[0] = iod_codes[2] = dfl_val_pmc32;
1908 iod_codes[1] = iod_codes[3] = dfl_val_pmc34;
1935 __pfm_vbprintf(
"[PMC41(pmc41)=0x%lx cfg_dtag0=%d cfg_dtag1=%d cfg_dtag2=%d cfg_dtag3=%d ena_dbrp0=%d ena_dbrp1=%d ena_dbrp2=%d ena_dbrp3=%d]\n",
2004 unsigned int pos1, pos2;
2044 __pfm_vbprintf(
"[PMC42(pmc42)=0x%lx plm=%d pm=%d mode=%d delay=%d]\n",
2059 for(
i=48;
i < 64;
i++, pos2++) {
2062 __pfm_vbprintf(
"[PMD%u(pmd%u)]\n", pd[pos2].reg_num, pd[pos2].reg_num);
2289 if (outp == NULL || param == NULL)
return 0;
2319 memset(counters, 0,
sizeof(*counters));
2322 for(
i=0; m ;
i++, m>>=1) {
2333 for(
i=0;
i < 16;
i++)
2336 for(
i=32;
i < 43;
i++)
2345 for(
i=4;
i < 16;
i++)
2347 for(
i=32;
i < 40;
i++)
2349 for(
i=48;
i < 64;
i++)
2359 for(
i=4;
i < 16;
i++)
2419 case 0: *desc = strdup(
"invalid");
2421 case 1: *desc = strdup(
"shared");
2423 case 2: *desc = strdup(
"exclusive");
2425 case 3: *desc = strdup(
"modified");
2435 unsigned int mask,
unsigned int *code)
static struct timeval start
static double c[MATRIX_SIZE][MATRIX_SIZE]
#define PME_MONT_CPU_OP_CYCLES_QUAL
#define PME_MONT_IA64_INST_RETIRED
static pme_mont_entry_t montecito_pe[]
#define PME_MONT_IA64_TAGGED_INST_RETIRED_IBRP1_PMC34_35
#define PME_MONT_L2D_OZQ_CANCELS0_ACQ
#define PME_MONT_IA64_TAGGED_INST_RETIRED_IBRP3_PMC34_35
#define PME_MONT_EVENT_COUNT
#define PME_MONT_CPU_OP_CYCLES_ALL
#define PME_MONT_L1I_PREFETCHES
#define PME_MONT_L2D_OZQ_CANCELS1_ANY
#define PME_MONT_IA64_TAGGED_INST_RETIRED_IBRP2_PMC32_33
#define PME_MONT_L1I_FILLS
#define PME_MONT_IA64_TAGGED_INST_RETIRED_IBRP0_PMC32_33
#define PME_MONT_L2I_PREFETCHES
#define PME_MONT_ISB_BUNPAIRS_IN
#define PME_MONT_L1I_STRM_PREFETCHES
#define PME_MONT_L1I_FETCH_ISB_HIT
#define PME_MONT_L1I_FETCH_RAB_HIT
#define PFMLIB_ERR_FEATCOMB
#define PFMLIB_ERR_IRRALIGN
#define PFMLIB_ERR_EVTSET
static int pfm_regmask_set(pfmlib_regmask_t *h, unsigned int b)
#define PFMLIB_ERR_EVTINCOMP
#define PFMLIB_ERR_DRRTOOMANY
#define PFMLIB_ERR_DRRINVAL
static int pfm_regmask_clr(pfmlib_regmask_t *h, unsigned int b)
static int pfm_regmask_andnot(pfmlib_regmask_t *dst, pfmlib_regmask_t *h1, pfmlib_regmask_t *h2)
#define PFMLIB_ERR_TOOMANY
#define PFMLIB_ERR_IRRTOOBIG
pfm_err_t pfm_get_impl_counters(pfmlib_regmask_t *impl_counters)
static int pfm_regmask_isset(pfmlib_regmask_t *h, unsigned int b)
#define PFMLIB_MONTECITO_PMU
#define PFMLIB_ERR_IRRTOOMANY
#define PFMLIB_ERR_NOASSIGN
#define PFMLIB_PFP_SYSTEMWIDE
#define PFMLIB_ERR_IRRINVAL
pfm_err_t pfm_get_event_code(unsigned int idx, int *code)
#define PFMLIB_ERR_IRRFLAGS
#define PFMLIB_ERR_NOTSUPP
static int cancel_events[]
static int pfm_dispatch_iear(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp)
static int pfm_dispatch_etb(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp)
static int compute_normal_rr(pfmlib_mont_input_rr_t *irr, int dfl_plm, int n, int *base_idx, pfmlib_mont_output_rr_t *orr)
static int pfm_mont_dispatch_counters(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp)
int pfm_mont_irange_is_fine(pfmlib_output_param_t *outp, pfmlib_mont_output_param_t *mod_out)
int pfm_mont_is_iear_tlb(unsigned int i)
int pfm_mont_support_opcm(unsigned int i)
int pfm_mont_is_ear(unsigned int i)
static int pfm_dispatch_ipear(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp)
int pfm_mont_is_dear_cache(unsigned int i)
pfm_pmu_support_t montecito_support
static int check_range_plm(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in)
int pfm_mont_get_event_umask(unsigned int i, unsigned long *umask)
static unsigned int pfm_mont_get_num_event_masks(unsigned int event)
static const unsigned long iod_tab[8]
static int check_cross_groups(pfmlib_input_param_t *inp, unsigned int *l1d_event, unsigned long *l2d_set1_mask, unsigned long *l2d_set2_mask)
int pfm_mont_get_event_set(unsigned int i, int *set)
static unsigned int l2d_set2_cnts[]
static int pfm_mont_dispatch_events(pfmlib_input_param_t *inp, void *model_in, pfmlib_output_param_t *outp, void *model_out)
int pfm_mont_is_dear_alat(unsigned int i)
static int pfm_mont_get_cycle_event(pfmlib_event_t *e)
int pfm_mont_support_darr(unsigned int i)
static int has_cpu_cycles_qual(pfmlib_input_param_t *inp)
#define NPREFETCH_DUAL_EVENTS
int pfm_mont_get_event_maxincr(unsigned int i, unsigned int *maxincr)
static char * pfm_mont_get_event_name(unsigned int i)
static int pfm_dispatch_irange(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp, pfmlib_mont_output_param_t *mod_out)
static void pfm_mont_get_impl_pmds(pfmlib_regmask_t *impl_pmds)
static int compute_fine_rr(pfmlib_mont_input_rr_t *irr, int dfl_plm, int n, int *base_idx, pfmlib_mont_output_rr_t *orr)
static int compute_single_rr(pfmlib_mont_input_rr_t *irr, int dfl_plm, int *base_idx, pfmlib_mont_output_rr_t *orr)
static unsigned int check_inst_retired_events(pfmlib_input_param_t *inp, unsigned long *retired_mask)
static char * pfm_mont_get_event_mask_name(unsigned int event, unsigned int mask)
static int check_fine_mode_possible(pfmlib_mont_input_rr_t *rr, int n)
int pfm_mont_get_ear_mode(unsigned int i, pfmlib_mont_ear_mode_t *m)
static int pfm_mont_get_event_code(unsigned int i, unsigned int cnt, int *code)
static void pfm_mont_get_impl_counters(pfmlib_regmask_t *impl_counters)
static int pfm_mont_get_event_mask_code(unsigned int event, unsigned int mask, unsigned int *code)
static int prefetch_dual_events[]
static int pfm_dispatch_opcm(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp, pfmlib_mont_output_param_t *mod_out)
int pfm_mont_is_iear_cache(unsigned int i)
static int pfm_mont_get_event_description(unsigned int ev, char **str)
static int pfm_mont_detect(void)
static int prefetch_events[]
static int pfm_mont_get_inst_retired(pfmlib_event_t *e)
int pfm_mont_support_all(unsigned int i)
int pfm_mont_get_event_group(unsigned int i, int *grp)
static int pfm_mont_get_event_mask_desc(unsigned int event, unsigned int mask, char **desc)
int pfm_mont_support_iarr(unsigned int i)
static void print_one_range(pfmlib_mont_input_rr_desc_t *in_rr, pfmlib_mont_output_rr_desc_t *out_rr, pfmlib_reg_t *dbr, int base_idx, int n_pairs, int fine_mode, unsigned int rr_flags)
int pfm_mont_is_etb(unsigned int i)
static void do_normal_rr(unsigned long start, unsigned long end, pfmlib_reg_t *br, int nbr, int dir, int *idx, int *reg_idx, int plm)
static int pfm_dispatch_drange(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp, pfmlib_mont_output_param_t *mod_out)
#define evt_use_irange(e)
static void pfm_mont_get_event_counters(unsigned int j, pfmlib_regmask_t *counters)
static unsigned int l2d_set1_cnts[]
int pfm_mont_is_dear(unsigned int i)
int pfm_mont_is_iear(unsigned int i)
#define evt_use_drange(e)
static int check_cancel_events(pfmlib_input_param_t *inp)
int pfm_mont_get_event_type(unsigned int i, int *type)
static int pfm_dispatch_dear(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in, pfmlib_output_param_t *outp)
static void pfm_mont_get_hw_counter_width(unsigned int *width)
static void pfm_mont_get_impl_pmcs(pfmlib_regmask_t *impl_pmcs)
int pfm_mont_is_dear_tlb(unsigned int i)
static int check_qualifier_constraints(pfmlib_input_param_t *inp, pfmlib_mont_input_param_t *mod_in)
static int check_intervals(pfmlib_mont_input_rr_t *irr, int mode, unsigned int *n_intervals)
static int check_prefetch_events(pfmlib_input_param_t *inp, pfmlib_mont_input_rr_t *irr, unsigned int *count, int *base_idx, int *dup)
#define PFMLIB_MONT_FL_EVT_ALL_THRD
#define PMU_MONT_COUNTER_WIDTH
#define PMU_MONT_FIRST_COUNTER
#define PFMLIB_MONT_FL_EVT_NO_QUALCHECK
#define PFMLIB_MONT_EVT_L1D_CACHE_GRP
#define PMU_MONT_NUM_COUNTERS
#define PMU_MONT_NUM_PMCS
#define PFMLIB_MONT_IRR_DEMAND_FETCH
#define PFMLIB_MONT_IRR_PREFETCH_MATCH
#define PFMLIB_MONT_RR_NO_FINE_MODE
@ PFMLIB_MONT_EAR_TLB_MODE
@ PFMLIB_MONT_EAR_CACHE_MODE
@ PFMLIB_MONT_EAR_ALAT_MODE
#define PMU_MONT_NUM_PMDS
#define PFMLIB_MONT_RR_INV
#define PFMLIB_MONT_EVT_NO_SET
#define PFMLIB_MONT_EVT_L2D_CACHE_GRP
void __pfm_vbprintf(const char *fmt,...)
#define DPRINT(fmt, a...)
static int pfm_ia64_fls(unsigned long x)
static int pfm_ia64_get_cpu_family(void)
unsigned int unit_masks[PFMLIB_MAX_MASKS_PER_EVENT]
pfmlib_mont_ear_mode_t ear_mode
unsigned short ipear_delay
pfmlib_mont_output_rr_t pfp_mont_irange
pfmlib_mont_output_rr_t pfp_mont_drange
pfmlib_mont_output_rr_desc_t rr_infos[4]
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 reg_alt_addr
unsigned long long reg_addr
pfmlib_regmask_bits_t bits[PFMLIB_REG_BV]
unsigned long pme_counters
unsigned long iarc_ig_ibrp1
unsigned long darc_ena_dbrp0
struct pfm_mont_pmc_reg_t::@66 pmc37_mont_cache_reg
unsigned long iarc_ig_ibrp0
struct pfm_mont_pmc_reg_t::@65 pmc36_mont_reg
unsigned long opcm_ch3_ig_opcm
struct pfm_mont_pmc_reg_t::@71 pmc41_mont_reg
unsigned long ipear_delay
struct pfm_mont_pmc_reg_t::@64 pmc33_35_mont_reg
unsigned long opcm_ch1_ig_opcm
unsigned long darc_cfg_dtag1
unsigned long darc_ena_dbrp2
struct pfm_mont_pmc_reg_t::@70 pmc39_mont_reg
unsigned long iarc_ig_ibrp3
unsigned long darc_ena_dbrp3
struct pfm_mont_pmc_reg_t::@67 pmc37_mont_tlb_reg
unsigned long darc_ena_dbrp1
struct pfm_mont_pmc_reg_t::@69 pmc42_mont_reg
unsigned long opcm_ch2_ig_opcm
struct pfm_mont_pmc_reg_t::@63 pmc32_34_mont_reg
unsigned long darc_cfg_dtag3
struct pfm_mont_pmc_reg_t::@68 pmc40_mont_reg
unsigned long iarc_ig_ibrp2
unsigned long opcm_ch0_ig_opcm
unsigned long darc_cfg_dtag0
unsigned long darc_cfg_dtag2
struct pfm_mont_pmc_reg_t::@72 pmc38_mont_reg