Messages in this thread | | | Date | Fri, 22 Nov 2013 13:59:26 -0500 | From | Dongsheng Yang <> | Subject | Re: [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
| |