- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On selevt, its setting is
coreEventDesc[0].event_number = ARCH_LLC_REFERENCE_EVTNR;
coreEventDesc[0].umask_value = ARCH_LLC_REFERENCE_UMASK;
coreEventDesc[1].event_number = ARCH_LLC_MISS_EVTNR;
coreEventDesc[1].umask_value = ARCH_LLC_MISS_UMASK;
On pcm, its setting is
msr->read(IA32_PMC0, &cL3Miss); // for Atom mapped to ArchLLCRef field
msr->read(IA32_PMC1, &cL3UnsharedHit); // for Atom mapped to ArchLLCMiss field
I think pmc0 and pmc1 are mistake for each other.
coreEventDesc[0].event_number = ARCH_LLC_REFERENCE_EVTNR;
coreEventDesc[0].umask_value = ARCH_LLC_REFERENCE_UMASK;
coreEventDesc[1].event_number = ARCH_LLC_MISS_EVTNR;
coreEventDesc[1].umask_value = ARCH_LLC_MISS_UMASK;
On pcm, its setting is
msr->read(IA32_PMC0, &cL3Miss); // for Atom mapped to ArchLLCRef field
msr->read(IA32_PMC1, &cL3UnsharedHit); // for Atom mapped to ArchLLCMiss field
I think pmc0 and pmc1 are mistake for each other.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GHui,
that is not a mistake. The variables are mapped to other names depending on architecture (using a C++ union):
Thethe L3Miss and the ArchLLCRef are mapped to the same address and L3UnsharedHit/ArchLLCMissare both mapped to a different address. This is done to have the same class namefor objects storing event counts (*CounterState) on independently of the processor architecture and simultaneously save space by reusing the memory. The functions that compute cache metrics are using the ArchLLCRef/ArchLLCMiss names on Atom. In my opiniona different solution withseparate custom implementation classes for each architecture would add more complexity and explode the code size (many architectures have just a small differences that are easy to handle without a code bloat).
Roman
that is not a mistake. The variables are mapped to other names depending on architecture (using a C++ union):
[cpp] union { uint64 L3Miss; uint64 Event0; uint64 ArchLLCRef; }; union { uint64 L3UnsharedHit; uint64 Event1; uint64 ArchLLCMiss; };[/cpp]
Thethe L3Miss and the ArchLLCRef are mapped to the same address and L3UnsharedHit/ArchLLCMissare both mapped to a different address. This is done to have the same class namefor objects storing event counts (*CounterState) on independently of the processor architecture and simultaneously save space by reusing the memory. The functions that compute cache metrics are using the ArchLLCRef/ArchLLCMiss names on Atom. In my opiniona different solution withseparate custom implementation classes for each architecture would add more complexity and explode the code size (many architectures have just a small differences that are easy to handle without a code bloat).
Roman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your correcting.
The result that LLC_Miss/LLC_Ref is easy to understand. LLC_Miss/LLC_Ref means LLC miss ratio.
The perfevtsel0 is setting LLC_Reference event, while store value which read from pcm0 to cL3Miss, although it mapped to ArchLLCRef field. I'm really puzzled for this.
Is there any meaning that put L3Miss and ArchLLCRef to the same union, why not put L3Miss and ArchLLCMiss to the same union?
The result that LLC_Miss/LLC_Ref is easy to understand. LLC_Miss/LLC_Ref means LLC miss ratio.
The perfevtsel0 is setting LLC_Reference event, while store value which read from pcm0 to cL3Miss, although it mapped to ArchLLCRef field. I'm really puzzled for this.
Is there any meaning that put L3Miss and ArchLLCRef to the same union, why not put L3Miss and ArchLLCMiss to the same union?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GHui,
you are right. It seems it makes more senseto change the union structures as you proposed.
Thanks,
Roman

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page