Linux Perf Users
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Manuel Selva <selva.manuel@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: perf tool/perf_event_open and uncore events
Date: Wed, 04 Sep 2013 12:50:38 -0700	[thread overview]
Message-ID: <87wqmwnz75.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <52273B1B.4070404@insa-lyon.fr> (Manuel Selva's message of "Wed, 04 Sep 2013 15:52:27 +0200")

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

      reply	other threads:[~2013-09-04 19:50 UTC|newest]

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

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=87wqmwnz75.fsf@tassilo.jf.intel.com \
    --to=andi@firstfloor.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=selva.manuel@gmail.com \
    /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