lkml.org 
[lkml]   [2017]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 03/15] perf, tools, stat: Fix saved values rbtree lookup
On Mon, Jul 24, 2017 at 04:40:03PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> The stat shadow saved values rbtree is indexed by a pointer.
> Fix the comparison function:
>
> - We cannot return a pointer delta as an int because
> that loses bits on 64bit.
> - Doing pointer arithmetic on the struct pointer
> only works if the objects are spaced by the multiple
> of the object size, which is not guaranteed for individual
> malloc'ed object
>
> Replace it with a proper comparison.
>
> This fixes various problems with values not being found.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

\
 
 \ /
  Last update: 2017-08-02 09:36    [W:0.588 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site