lkml.org 
[lkml]   [2013]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf util: optimize util/machine.c:machines__find().


On 11/21/2013 07:06 PM, Arnaldo Carvalho de Melo wrote:
>
>> This changes machines__find to always return the machine for the
>> host (pid == 0). This function is also used for VM lookups.
> Nope:
>
> /* Native host kernel uses -1 as pid index in machine */
> #define HOST_KERNEL_ID (-1)
> #define DEFAULT_GUEST_KERNEL_ID (0)
>
> But I fail to see the point of the "optimization", we're looking for a
> pid, not always for '0'.
>
> And the changelog is horrible, why is it "unnecessary"? Please don't be
> so terse :-)
>
> - Arnaldo
>

Hi David and Arnaldo,

It is my mistake about it!! The original code does the right thing.
Sorry to bother you, I am a newbie for perf.
I will send a patch after second and third thought next time.

Thanx for your reply.

- Yang




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