From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbdHBTLG (ORCPT ); Wed, 2 Aug 2017 15:11:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752285AbdHBTLF (ORCPT ); Wed, 2 Aug 2017 15:11:05 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCA3922BD4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Wed, 2 Aug 2017 16:11:02 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Andi Kleen , jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v1 03/15] perf, tools, stat: Fix saved values rbtree lookup Message-ID: <20170802191102.GN12201@kernel.org> References: <20170724234015.5165-1-andi@firstfloor.org> <20170724234015.5165-4-andi@firstfloor.org> <20170802073513.GB13890@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170802073513.GB13890@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Aug 02, 2017 at 09:35:13AM +0200, Jiri Olsa escreveu: > On Mon, Jul 24, 2017 at 04:40:03PM -0700, Andi Kleen wrote: > > From: Andi Kleen > > > > 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 > > Acked-by: Jiri Olsa Applied. - Arnaldo