From: Davidlohr Bueso <dave@stgolabs.net>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 6/7] perf hist: Use cached rbtrees
Date: Tue, 22 Jan 2019 07:22:38 -0800 [thread overview]
Message-ID: <20190122152238.rbm6pxg7muasa5mv@linux-r8p5> (raw)
In-Reply-To: <20190122135901.GE14973@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
next prev parent reply other threads:[~2019-01-22 15:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 19:18 [PATCH v2 -tip 0/7] tools/perf: Update rbtree implementation and optimize users Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 1/7] tools/perf: Update rbtree implementation Davidlohr Bueso
2019-01-26 10:01 ` [tip:perf/core] tools: " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 2/7] perf machine: Use cached rbtrees Davidlohr Bueso
2019-01-26 10:01 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 3/7] perf callchain: " Davidlohr Bueso
2019-01-26 10:02 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 4/7] perf util: Use cached rbtree for rblists Davidlohr Bueso
2019-01-26 10:03 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 5/7] perf symbols: Use cached rbtrees Davidlohr Bueso
2019-01-26 10:03 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 6/7] perf hist: " Davidlohr Bueso
2019-01-22 13:59 ` Arnaldo Carvalho de Melo
2019-01-22 15:22 ` Davidlohr Bueso [this message]
2019-01-26 10:04 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
2018-12-06 19:18 ` [PATCH 7/7] perf sched: " Davidlohr Bueso
2019-01-26 10:05 ` [tip:perf/core] " tip-bot for Davidlohr Bueso
-- strict thread matches above, loose matches on Subject: below --
2017-11-27 2:30 [PATCH -tip 0/7] tools/perf: Update rbtree implementation and optimize users Davidlohr Bueso
2017-11-27 2:30 ` [PATCH 6/7] perf hist: Use cached rbtrees Davidlohr Bueso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190122152238.rbm6pxg7muasa5mv@linux-r8p5 \
--to=dave@stgolabs.net \
--cc=acme@kernel.org \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).