public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/3] rbtree: Introduce rb_for_each_entry
Date: Wed, 13 Jan 2010 12:13:44 -0200	[thread overview]
Message-ID: <20100113141344.GG2934@ghostprotocols.net> (raw)
In-Reply-To: <1263391133.4244.226.camel@laptop>

Em Wed, Jan 13, 2010 at 02:58:53PM +0100, Peter Zijlstra escreveu:
> On Wed, 2010-01-13 at 11:52 -0200, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jan 13, 2010 at 02:34:45PM +0100, Frederic Weisbecker escreveu:
> > > At least it matches many patterns in perf :)
> > 
> > What an insane piece of... software! 8-) Whatever, if it makes Peter
> > happy we can keep it on tools/perf/util/include/linux/rbtree.h, just
> > after the:
> > 
> > #include "../../../../include/linux/rbtree.h"
> > 
> > ;-)
> > 
> > Just like we have list_del_range() in tools/perf/util/include/linux/list.h.
> 
> That's not the point, doing a for_each on the rb-trees as we have today
> is a O(n log(n)) operation, not something you should want to do often.
> 
> Adding a helper promotes the idea that its a sane thing to do, its not.
> 
> If you really need it, open coding it isn't hard, but the lack of helper
> does make you think and hopefully realize you're doing something funny.

We need it in several places in the perf tools, to present sorted results, to
dump the maps for debugging purposes, etc.

But I'll go and look at each one of them to see if there is any where it
is used in some stupid way.

- Arnaldo

  reply	other threads:[~2010-01-13 14:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 13:01 [PATCH 1/3] rbtree: Introduce rb_for_each_entry Arnaldo Carvalho de Melo
2010-01-13 13:01 ` [PATCH 2/3] perf tools: Use rb_for_each_entry Arnaldo Carvalho de Melo
2010-01-13 13:01 ` [PATCH 3/3] perf tools: Encode kernel module mappings in perf.data Arnaldo Carvalho de Melo
2010-01-13 13:16 ` [PATCH 1/3] rbtree: Introduce rb_for_each_entry Peter Zijlstra
2010-01-13 13:34   ` Frederic Weisbecker
2010-01-13 13:36     ` Peter Zijlstra
2010-01-13 13:52     ` Arnaldo Carvalho de Melo
2010-01-13 13:58       ` Peter Zijlstra
2010-01-13 14:13         ` Arnaldo Carvalho de Melo [this message]
2010-01-13 14:18           ` Peter Zijlstra
2010-01-13 14:22             ` Arnaldo Carvalho de Melo
2010-01-13 14:28             ` Frederic Weisbecker
2010-01-13 15:26             ` Arnaldo Carvalho de Melo

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=20100113141344.GG2934@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.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