I'm looking for a tool to profile L1 caches on Intel Core2 architecture.
Since OProfile uses hardware counters and rely on perfmon, I'm
investigating this way.
It seems that Intel architectural (pre-defined) events support has just
been implemented in OProfile, so I was wondering if model-specific
events are supported.
What I try to understand is when I type
# opcontrol --list-events
it shows all events (architectural and model-specific), but when I try
to monitor a non-architectural event, there is no warning nor error
message but opreport doesn't show the results with the expected event.
Here is an example of what happens :
# opcontrol --reset // to delete old reports
# opcontrol --status
Daemon running: pid 3976
Event 0: L1D_CACHE_ST:500:15:1:1
Separate options: none
vmlinux file: /usr/src/linux-source-2.6.24/vmlinux
Image filter: none
Call-graph depth: 0
# opcontrol --start
# opcontrol --stop
CPU: Core 2, speed 1862.59 MHz (estimated)
Counted L2_LINES_IN events (number of allocated lines in L2) with a unit
mask of 0x70 (multiple flags) count 500
Counted L2_RQSTS events (number of L2 cache requests) with a unit mask
of 0x7f (multiple flags) count 500
Here opreport shows results with previously used generic counters (LLC
misses and LLC references)
If anyone can explain to me what's happening, it'd be great.
I use OProfile 0.94 on linux-2.6.24 with perfmon2.
I'm afraid I forgot that one, it should indeed do the trick.
Anyway it must come from here, since when I use opcontrol --deinit, then
change the monitored events and try to run a new test, I got the
counters I want.
I'm sorry I didn't investigate enough before posting here.
I'll take the occasion to post another question, then : I saw few mails
on this mailing list about a patch to use perfmon's multiplexing. Is
there a version of this patch for OProfile 0.94 on linux-2.6.24 ?
Saikiran Madugula wrote:
>> Here opreport shows results with previously used generic counters (LLC
>> misses and LLC references)
> Did you use opcontrol --dump ?
Sylvain Geneves <sylvain.geneves@...> writes:
> I'm looking for a tool to profile L1 caches on Intel Core2 architecture.
> Since OProfile uses hardware counters and rely on perfmon, I'm
> investigating this way.
> It seems that Intel architectural (pre-defined) events support has just
> been implemented in OProfile, so I was wondering if model-specific
> events are supported.
Yes they have been supported forever, just do opcontrol -l on
your existing oprofile installation and oprofile will list all
the events it knows about. For L1 there's a set of events
on Core2 (L1D_CACHE_LD|L1D_CACHE_ST etc.)
Of course you might sometimes need updates for new CPUs (e.g. there is
right now no own event set for Atom). Sometimes it's enough
to just update the kernel then, otherwise that is where the architectural
support comes in.