lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v0 14/71] perf tools: Add cpu to struct thread
On 12/11/13, 12:55 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Dec 11, 2013 at 12:30:40PM -0700, David Ahern escreveu:
>> On 12/11/13, 5:36 AM, Alexander Shishkin wrote:
>>
>>> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
>>> index 55f3608..52fbfb6 100644
>>> --- a/tools/perf/util/machine.c
>>> +++ b/tools/perf/util/machine.c
>>> @@ -1412,3 +1412,29 @@ pid_t machine__get_thread_pid(struct machine *machine, pid_t tid)
>>>
>>> return thread->pid_;
>>> }
>>> +
>>> +int machine__get_thread_cpu(struct machine *machine, pid_t tid, pid_t *pid)
>>> +{
>>> + struct thread *thread = machine__find_thread(machine, tid);
>>> +
>>> + if (!thread)
>>> + return -1;
>>> +
>>> + if (pid)
>>> + *pid = thread->pid_;
>>
>> Why is a 'get' function modifying the thread data?
>
> Where is this happening? :-)

D'oh. code review while on a call ... multitasking failed.

David


\
 
 \ /
  Last update: 2013-12-12 11:21    [W:0.411 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site