Linux Perf Users
 help / color / mirror / Atom feed
From: Manuel Selva <selva.manuel@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: perf tool/perf_event_open and uncore events
Date: Wed, 04 Sep 2013 15:52:27 +0200	[thread overview]
Message-ID: <52273B1B.4070404@insa-lyon.fr> (raw)

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

             reply	other threads:[~2013-09-04 13:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 13:52 Manuel Selva [this message]
2013-09-04 19:50 ` perf tool/perf_event_open and uncore events Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52273B1B.4070404@insa-lyon.fr \
    --to=selva.manuel@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox