Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7532865imu; Tue, 22 Jan 2019 07:30:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN5j4fazs/eDFZ6h9mt/qQ2l7EkBCBnBbqbXeYmIbA1x5aVzhj7Af90fqXkoDzs+iUSph7x8 X-Received: by 2002:a63:6506:: with SMTP id z6mr32387987pgb.334.1548171054675; Tue, 22 Jan 2019 07:30:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548171054; cv=none; d=google.com; s=arc-20160816; b=GBO8jAZqXTPmKyDDTD9EJZ1ua0HFHvDejiE+VcqByQP7TCwZIn7a1g4VvAry7gvPDW CTwkZsIWIrccNkHVjnB5CORruhpc4hg9f5eNpe7DL3ER/UX3i7HF881G51iTzLe4kynM Ngb6Qg9uCwi7g5qFX/LT8wXh3YyZgIOzUH32Kf2BwVZ7SsJQuuIU7Y4m5Unt5hnRFhrI P3XLu7c9FD1nxGK9pEYZ5XA/oC4lxGZs4OkjYgLuLQ2xVAhwfY1HWD3h/ugTZf6EHDfV v3TQjOLrg6avbXvzhYhnClv89Igw4Ag+MtniztysHPntcCPUzcbKLnPWV5F/HReWhOEt DgPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TllduypmP73QavOl2MaTHkWrkCNt4ibcj+oWUhoUhqw=; b=jnHplnCJmzJ9Vn5Lv+4csPr91XPBHRWgoFk5AnuyZ3xpiW8JXJofAx+QE38B7+nkgL nND3MEtUTLP4trhHejJpUh2YZCc0CyJaxS8wkSSJPwut6NCYCijA3AuCI2gUicVgbDs5 MfWJNdw2s1t7isBYA6lENp3xAFyntP8pSsvQ5J6SixPt7GWkeWXfZch7Ch1jir6R4rFa q8SExWJYsGJrs5L47BbOhC2Izk3ebfZ97YFgHVkBcUKy9NZRHaI7xKz2gYd8MFn78+1K ObkCkPjNmjjPQ+KAo4b6NwNtbL3UNEJLaE4SeWIlk98kIdZ21yrGR6VEABvktPMvpSjZ I2CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si15773355pls.348.2019.01.22.07.30.38; Tue, 22 Jan 2019 07:30:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729678AbfAVPWr (ORCPT + 99 others); Tue, 22 Jan 2019 10:22:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:60304 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729648AbfAVPWq (ORCPT ); Tue, 22 Jan 2019 10:22:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 32428B04E; Tue, 22 Jan 2019 15:22:45 +0000 (UTC) Date: Tue, 22 Jan 2019 07:22:38 -0800 From: Davidlohr Bueso To: Arnaldo Carvalho de Melo Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 6/7] perf hist: Use cached rbtrees Message-ID: <20190122152238.rbm6pxg7muasa5mv@linux-r8p5> References: <20181206191819.30182-1-dave@stgolabs.net> <20181206191819.30182-7-dave@stgolabs.net> <20190122135901.GE14973@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190122135901.GE14973@kernel.org> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Jan 2019, Arnaldo Carvalho de Melo wrote: >Em Thu, Dec 06, 2018 at 11:18:18AM -0800, Davidlohr Bueso escreveu: >> At the cost of an extra pointer, we can avoid the O(logN) cost >> of finding the first element in the tree (smallest node), which >> is something heavily required for histograms. Specifically, the >> following are converted to rb_root_cached, and users accordingly: >> >> hist::entries_in_array >> hist::entries_in >> hist::entries >> hist::entries_collapsed >> hist_entry::hroot_in >> hist_entry::hroot_out > > CC /tmp/build/perf/util/hist.o >ui/browsers/hists.c: In function ???hierarchy_set_folding???: >ui/browsers/hists.c:511:21: error: passing argument 1 of ???rb_first??? from incompatible pointer type [-Werror=incompatible-pointer-types] > for (nd = rb_first(&he->hroot_out); nd; nd = rb_next(nd)) { > ^~~~~~~~~~~~~~ >In file included from ui/browsers/hists.c:8: >/home/acme/git/perf/tools/include/linux/rbtree.h:83:24: note: expected ???const struct rb_root *??? but argument is of type ???struct rb_root_cached *??? > extern struct rb_node *rb_first(const struct rb_root *); > ^~~~~~~~ >ui/browsers/hists.c: In function ???__hist_browser__set_folding???: >ui/browsers/hists.c:569:16: error: passing argument 1 of ???rb_first??? from incompatible pointer type [-Werror=incompatible-pointer-types] > nd = rb_first(&browser->hists->entries); > ^~~~~~~~~~~~~~~~~~~~~~~~ > >So I added this on top, please check: Looks good thanks (sorry I thought I had tested all this -- even ran perf several times :/) Thanks, Davidlohr