lkml.org 
[lkml]   [2014]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf tools: fix processing of pid/tid for mmap records
From
Jiri,

On Tue, Apr 22, 2014 at 3:32 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> hi,
>
> On Mon, Apr 21, 2014 at 06:06:55PM +0200, Stephane Eranian wrote:
>> perf tools: fix processing of pid/tid for mmap records
>
> extra description line ^^^
>
>>
>> Mmaps are global to a process (always). Processing them
>> per-thread was causing some serious issues in case mmaps
>> would overlap. The overlap fixups would only occur in the
>> context of the thread which generated the overlapping
>> mmap. But that was cause issues later on when a sample
>> from another thread would fall into that overlapping
>> mmap.
>>
>> The solution to the problem is to handle ALL mmaps as
>> occurring in the master thread (pid = tid) and then to
>> lookup for thread map using pid as the tid argument.
>> This is how samples are looking up for the thread map
>> already (notice pid passed twice):
>>
>> int perf_event__preprocess_sample(const union perf_event *event,
>> struct machine *machine,
>> struct addr_location *al,
>> struct perf_sample *sample)
>> {
>> struct thread *thread = machine__findnew_thread(machine, sample->pid,
>> sample->pid);
>> }
>>
>> Without this fix, some samples in overlapping regions
>> may not be symbolized.
>
> could you please take a look on following patchset:
> http://marc.info/?l=linux-kernel&m=139749074531132&w=2
>
> this makes the map groups shared within the process,
> so it should fix above issue as well
>
It could probably solve my problem. I will try it out.

I am wondering why the tid was taken into consideration in the first place
when looking for maps? why was pid not enough?


\
 
 \ /
  Last update: 2014-04-22 16:01    [W:0.196 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site