Core2 Event L1D_CACHE_LD(and others) does not work

3 views
Skip to first unread message

Ryan Stone

unread,
Dec 21, 2009, 12:33:44 PM12/21/09
to PMCTools Discuss
I'm not able to use the Core 2 event L1D_CACHE_LD. Here's what
happens to me:

(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

Ryan Stone

unread,
Dec 21, 2009, 7:42:54 PM12/21/09
to PMCTools Discuss
I submitted a bug report on Google Code for this:
http://code.google.com/p/pmctools/issues/detail?id=26&colspec=ID%20Type%20Status%20Priority%20Opsys%20Component%20Summary

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.

Joseph Koshy

unread,
Dec 26, 2009, 3:29:27 PM12/26/09
to pmctools...@googlegroups.com

It is great to get a good problem report along with a working patch to
solve the problem.

Patch committed, thank you!

Koshy

Reply all
Reply to author
Forward
0 new messages