From: Manuel Selva <manuel.selva@insa-lyon.fr>
To: Manuel Selva <selva.manuel@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Re: Intel PEBS Load Latency Measurement
Date: Mon, 28 Oct 2013 12:28:06 +0100 [thread overview]
Message-ID: <526E4A46.2060003@insa-lyon.fr> (raw)
In-Reply-To: <52380863.4090606@insa-lyon.fr>
Hi,
I am coming back on this subject after working on other stuff for
several weeks. Andi pointed me to the userland tool 'perf mem'
introduced in "recent" kernels (can't find the version) that is using
the kernel perf_event_open system call to profile memory accesses.
I guess the answer to my question is in the code of this tool, but
before stepping deeper inside it, I wanted to ask you (Linux perf
experts) few questions, to be sure I am on the right track.
For now, I just configured a perf_event_attr to perform sampling of
PERF_COUNT_HW_INSTRUCTIONS at a given period. Can you confirm than the
sample_period means "the kernel will generate a sample (with fields
asked through sample_type) every sample_period instructions ?
Then after calling the perf_event_open system call I mmap the file
descriptor returned with an arbitrary size of X pages (with X = 1 + 2^n).
I then start recording events with ioctl on the file descriptor returned
by perf_event_open. I am now wondering how to access the samples. My
main concern is about the meaning of the data_head and data_tail fields
of the metadata page located at the beginning of the memory mmaped. In
understand that my samples are located just after this metadata page,
and that these head and tail pointers are used to indicate where we are
in the reading of the samples, is it correct ? While reading samples,
should I use/modify these head and tail pointers, if yes what is the
purpose of that ?
I am going now to look for the perf mem code, to try to understand that
from my side, but I am interested in any hint on the subject that may
help me.
Many thanks in advance for your help,
Manu
On 09/17/2013 09:44 AM, Manuel Selva wrote:
> Hi all,
>
> I am trying to use PMU on a 2 sockets workstation (2x Intel Xeon X5650
> currently running Linux 3.6.11) processor to identify memory controller
> unbalance.
>
> For this purpose I successfully used some uncore events to count the
> load on each memory controller through the perf_event_open system call.
> I am now planning to use Intel PEBS Load Latency Measurement to identify
> if these loads result in "unusual" long memory latencies.
>
> Looking at Vince Weaver web page discussing about kernel support for PMU
> here:
> http://web.eece.maine.edu/~vweaver/projects/perf_events/features.html I
> saw that the kernel 3.10 supports Load Latency Measurement.
> Unfortunately I can't find a man page describing how this works. Before
> looking at kernel sources, I wanted to ask here for confirmation about
> Load Latency Measurement in recent Linux kernels.
>
> Can anyone confirm that this functionality is available and usable ? Is
> the perf userland tool using it to provide the functionality to end users ?
>
> Thanks in advance for your help,
>
next prev parent reply other threads:[~2013-10-28 11:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 7:44 Intel PEBS Load Latency Measurement Manuel Selva
2013-09-19 8:22 ` Andi Kleen
2013-10-28 11:28 ` Manuel Selva [this message]
2013-10-29 2:36 ` Namhyung Kim
[not found] ` <CALbiyZy_JE+wai7d_=r-XzE+FdHRitTiAuPmANtRt7Qpet8fTg@mail.gmail.com>
2013-10-29 9:12 ` Fwd: " Manuel Selva
2013-10-29 13:20 ` Manuel Selva
2013-11-01 8:41 ` Namhyung Kim
2013-11-01 9:02 ` Manuel Selva
2013-11-01 17:02 ` Vince Weaver
2013-11-01 18:08 ` Manuel Selva
2013-11-01 8:38 ` Fwd: " Namhyung Kim
2013-11-06 13:06 ` Manuel Selva
2013-11-06 13:41 ` Stephane Eranian
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=526E4A46.2060003@insa-lyon.fr \
--to=manuel.selva@insa-lyon.fr \
--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;
as well as URLs for NNTP newsgroup(s).