lkml.org 
[lkml]   [2013]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V8 04/15] perf tools: change machine__findnew_thread() to set thread pid
On 7/28/13 4:43 AM, Adrian Hunter wrote:

>>> - thread = machine__findnew_thread(machine, event->ip.pid);
>>> + thread = machine__findnew_thread(machine, event->ip.pid,
>>> event->ip.pid);
>>
>> event->ip.tid? at a minimum current functionality is retained with
>> machine__findnew_thread(machine, 0, event->ip.pid)
>
> perf tools records mmap information against the process's main thread
> for which pid == tid. So the correct values are being passed here.

Yes. It's a case by case -- if you want syms use pid, otherwise use tid.
It would be less confusing if the API was improved - always take pid and
tid along with an arg that says 'want syms' or a separate function name.
But I digress.

Looking at your patch does maintain the tid element so it should be
fine. I ran a few tests with perf-script and the output is the same
after the patch, so..

Acked-by: David Ahern <dsahern@gmail.com>


\
 
 \ /
  Last update: 2013-07-30 00:41    [W:0.059 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site