(module-1:wheel)# pmcstat -s L1D_CACHE_LD,cachestate=s -w1
pmcstat: ERROR: Cannot allocate system-mode pmc with specification
"L1D_CACHE_LD,cachestate=s": Invalid argument
I believe that the problem for this specific event is on line 1422 of
hwpmc_core.c(I'm looking at r198432):
if (ie->iap_flags & IAP_M_CORE) {
It should be
if (ie->iap_umask& IAP_M_CORE) {
There are a bunch of other usages of iap_flags in that area that also
look like they should be iap_umask
Note that there's a second problem affecting only the L1D_CACHE_LD
event: it's not listed as being available on the Core 2, but the Intel
documentation says that it is(and it is documented in man pmc.core2).
I assume that it was an oversight that hwpmc does not allow it on Core
2.
The bug report has a patch attached that resolves the problems for me.
It is great to get a good problem report along with a working patch to
solve the problem.
Patch committed, thank you!
Koshy