lkml.org 
[lkml]   [2010]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC] perf/perf_events: misleading number of samples due to mmap()
From
On Wed, Jun 16, 2010 at 6:41 PM, stephane eranian
<eranian@googlemail.com> wrote:
> On Wed, Jun 16, 2010 at 4:52 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> On Wed, 2010-06-16 at 16:40 +0200, Stephane Eranian wrote:
>>> This leads me to another point. For per-thread sampling, why
>>> do we need to record mmap() events happening *outside* of
>>> the process? I can understand the exception of kernel modules.
>>
>> How does that happen? The per-thread events should be on the per-task
>> context, so another task's mmap() events should never end up there.
>>
>
> I don't see the test that says the vma does not belong to the current task.
> I also don't see anything in perf_event_mmap_match().
>
> It does seem to work as you said in recent kernels, though. So I am certainly
> missing something here.
>
I think I got it now. It's all based on the current->perf_event_ctxp.
So you only
look at the events (and thus sampling buffers) attached to current which issued
the mmap().

I found out that my problem is coming from perf creating synthetic
mmap() entries
for everything it finds in /proc/PID.


\
 
 \ /
  Last update: 2010-06-16 19:17    [W:0.043 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site