Re: [PATCH V9 04/14] perf tools: change machine__findnew_thread() to set thread pid

From: Namhyung Kim
Date: Wed Aug 07 2013 - 04:40:26 EST


On Wed, 07 Aug 2013 11:34:23 +0300, Adrian Hunter wrote:
> On 07/08/13 10:51, Namhyung Kim wrote:
>> On Mon, 5 Aug 2013 19:26:24 +0300, Adrian Hunter wrote:
>>> Add a new parameter for 'pid' to machine__findnew_thread().
>>> Change callers to pass 'pid' when it is known.
>>>
>> [SNIP]
>>
>>> @@ -198,7 +198,7 @@ static int perf_event__inject_buildid(struct perf_tool *tool,
>>>
>>> cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
>>>
>>> - thread = machine__findnew_thread(machine, event->ip.pid);
>>> + thread = machine__findnew_thread(machine, event->ip.pid, event->ip.pid);
>>
>> Maybe I'm missing something. Why not use event->ip.tid here?
>
> That is covered here:
>
> http://marc.info/?l=linux-kernel&m=137513636309689&w=2

Oh, I missed the thread..

Btw, it'd be better if you keep David's (and possbily other's too)
Acked- or Reviewed-by tags in the changelog unless things changed
wildly.

[SNIP]
>>
>> Hmm.. now I'm thinking that it's related to sharing map_groups between
>> threads within a process. To do that, IMHO we need more sophisticated
>> handling rather than passing either pid or tid depending on contexts?
>
> Yes there is always more that could be done.

:)

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/