* perf tool/perf_event_open and uncore events
@ 2013-09-04 13:52 Manuel Selva
2013-09-04 19:50 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Manuel Selva @ 2013-09-04 13:52 UTC (permalink / raw)
To: linux-perf-users
Hi all,
I am planning to use the perf tool and maybe directly the
perf_event_open system call from code to get access to uncore counters .
I am working on a dual socket NUMA platform with 2 Intel Xeon X5650 cpus
(Westmer-EP familly and 06_2CH cpu number). I started my experiments
with the UNC_QMC_NORMAL_READS.ANY counter only. I want to measure memory
traffic for each one of my 2 memory controllers.
In this context I got the following questions without being able to
answer to them:
+ It seems impossible to have per thread mode with this uncore event. I
have to specify the -a or the -C option to the perf tool to get some
results. Looking at the perf_event_open system call happening behind the
scene, and calling it myself from code, I noticed that the call
succeeded only when the pid parameter is -1 and the cpu one is different
from -1. I guess that per thread counting is not available for uncore
events because it's impossible for the hardware to measure only the
uncore events generated by a given thread (because by definition uncore
is shared by all the cores associated to it) Am I right ?
+ How the cpu parameter to perf_event_open should be interpreted for
uncore events ? On my platform I have 12 cores (my two cpus are hexa
core ones and hyper threading is disabled). Does providing a cpu value
of 5 to the system call along with an uncore event means counting the
events on the uncore associated to the core 5 ?
Thanks for your inputs,
--
Manu
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: perf tool/perf_event_open and uncore events
2013-09-04 13:52 perf tool/perf_event_open and uncore events Manuel Selva
@ 2013-09-04 19:50 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2013-09-04 19:50 UTC (permalink / raw)
To: Manuel Selva; +Cc: linux-perf-users
Manuel Selva <selva.manuel@gmail.com> writes:
>
> + It seems impossible to have per thread mode with this uncore
> event. I have to specify the -a or the -C option to the perf tool to
> get some results. Looking at the perf_event_open system call happening
> behind the scene, and calling it myself from code, I noticed that the
> call succeeded only when the pid parameter is -1 and the cpu one is
> different from -1. I guess that per thread counting is not available
> for uncore events because it's impossible for the hardware to measure
> only the uncore events generated by a given thread (because by
> definition uncore is shared by all the cores associated to it) Am I
> right ?
Yes uncore counting is per socket counting.
>
> + How the cpu parameter to perf_event_open should be interpreted for
> uncore events ? On my platform I have 12 cores (my two cpus are hexa
> core ones and hyper threading is disabled). Does providing a cpu value
> of 5 to the system call along with an uncore event means counting the
> events on the uncore associated to the core 5 ?
Yes, the socket associated with the CPU is used.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-04 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 13:52 perf tool/perf_event_open and uncore events Manuel Selva
2013-09-04 19:50 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox