From: Manuel Selva <selva.manuel@gmail.com>
To: Vince Weaver <vincent.weaver@maine.edu>,
Namhyung Kim <namhyung@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Intel PEBS Load Latency Measurement
Date: Fri, 01 Nov 2013 19:08:29 +0100 [thread overview]
Message-ID: <5273EE1D.2010803@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1311011300350.31770@vincent-weaver-1.um.maine.edu>
I agree about the confusing way that Linux uses pid and tid. I guess
this comes from the (old) time where processes only had one thread.
Anyway, threads are just processes sharing some part of their memory,
and processes are just threads that don't share anything.
Your man page (the online version, I have to check why I don't have it
on my Linux workstation) was really helpful for me to build what I
needed upon the perf_event_open system call without having to start from
scratch with my own kernel module or the msr module and the Intel
documentation. I listed from my side some complementary information that
maybe useful for others, if you plan to update the man page I can
provide you these notes.
Thanks again to all here on the list for your help !
Manu
On 11/01/2013 06:02 PM, Vince Weaver wrote:
> On Fri, 1 Nov 2013, Namhyung Kim wrote:
>
>> On Tue, 29 Oct 2013 14:20:09 +0100, Manuel Selva wrote:
>>> One more thing I forgot to ask is clarification about the pid
>>> parameter. According to Vince Weaver page: "If pid is 0, measurements
>>> happen on the current thread, if pid is greater than 0, the process
>>> indicated by pid is measured, and if pid is -1, all processes are
>>> counted." and according to perf userland tool wiki page, it's possible
>>> to attache to a specific thread with a -i option. As a consequence I
>>> wonder how I can use the perf perf_event_sys_call to only count events
>>> for a specific thread ?
>>
>> In the syscall's point of view, pid is actually tid AFAIK - so I works
>> on the thread-basis not the process.
>
> It is true the manpage is a bit confusing here, though that's mostly due
> to the confusing way that Linux interchangably uses pid/tid for process
> and thread ids. I'll see if I can get the documentation made more clear.
>
> Vince
>
next prev parent reply other threads:[~2013-11-01 18:08 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
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 [this message]
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=5273EE1D.2010803@gmail.com \
--to=selva.manuel@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=vincent.weaver@maine.edu \
/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).