Cleaned up Opteron events per Brian Wylie's suggestions:
Cleaned up Opteron events per Brian Wylie's suggestions:

I've been using PAPI on Opteron and have encountered a few oddities with
the preset definitions: in particular, I'm looking at p3_events.c v1.42
in the CVS repository:

PAPI_L1_ICH = IC_MISS - IC_SYS_REFILL - IC_L2_REFILL
This definition seems to always yield zero and is presumably incorrect.
A comment in the CVS log (from AMD) suggests replacing IC_MISS (81h)
with IC_FETCH (80h), which seems much more reasonable.

Similar comments in the CVS log, which sound like recommendations from
AMD, are not to include INValid refills from L2 and system, and indeed
v1.39 modified the definitions of DC_L2_REFILL_TOT and DC_SYS_REFILL_TOT
accordingly. Subsequently, however, these definitions were replaced
with DC_L2_REFILL_MOESI and DC_SYS_REFILL_MOESI which reinstated the
INValid refills. (This effects a number of the presets.)

I also see other definitions which include INValid refills:
PAPI_L2_DCW = DC_L2_REFILL_MI
PAPI_L1_LDM = DC_L2_REFILL_OESI and
PAPI_L2_LDM = DC_SYS_REFILL_OESI
and I'm wondering whether the INValid refills should be removed from
these too.

Can you, or some of the folks at AMD, check these?

arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi