Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-28 Thread Namhyung Kim
Hi David, On Sun, Dec 28, 2014 at 12:31 AM, David Ahern wrote: > On 12/24/14 12:15 AM, Namhyung Kim wrote: >> >> @@ -106,8 +117,8 @@ void machine__delete_threads(struct machine *machine) >> while (nd) { >> struct thread *t = rb_entry(nd, struct thread, rb_node); >> >> -

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-28 Thread Namhyung Kim
Hi David, On Sun, Dec 28, 2014 at 12:31 AM, David Ahern dsah...@gmail.com wrote: On 12/24/14 12:15 AM, Namhyung Kim wrote: @@ -106,8 +117,8 @@ void machine__delete_threads(struct machine *machine) while (nd) { struct thread *t = rb_entry(nd, struct thread, rb_node);

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-27 Thread David Ahern
On 12/24/14 12:15 AM, Namhyung Kim wrote: @@ -106,8 +117,8 @@ void machine__delete_threads(struct machine *machine) while (nd) { struct thread *t = rb_entry(nd, struct thread, rb_node); - rb_erase(>rb_node, >threads); nd = rb_next(nd); +

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-27 Thread David Ahern
On 12/24/14 12:15 AM, Namhyung Kim wrote: @@ -106,8 +117,8 @@ void machine__delete_threads(struct machine *machine) while (nd) { struct thread *t = rb_entry(nd, struct thread, rb_node); - rb_erase(t-rb_node, machine-threads); nd =

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-26 Thread Namhyung Kim
On Sat, Dec 27, 2014 at 2:14 AM, David Ahern wrote: > On 12/25/14 7:26 PM, Namhyung Kim wrote: diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 0b6dcd70bc8b..413f28cf689b 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-26 Thread David Ahern
On 12/25/14 7:26 PM, Namhyung Kim wrote: diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 0b6dcd70bc8b..413f28cf689b 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@ -11,10 +11,8 @@ struct thread_stack; struct thread { - union { -

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-26 Thread David Ahern
On 12/25/14 7:26 PM, Namhyung Kim wrote: diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 0b6dcd70bc8b..413f28cf689b 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@ -11,10 +11,8 @@ struct thread_stack; struct thread { - union { -

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-26 Thread Namhyung Kim
On Sat, Dec 27, 2014 at 2:14 AM, David Ahern dsah...@gmail.com wrote: On 12/25/14 7:26 PM, Namhyung Kim wrote: diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 0b6dcd70bc8b..413f28cf689b 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@ -11,10

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-25 Thread Namhyung Kim
On Fri, Dec 26, 2014 at 8:05 AM, Jiri Olsa wrote: > On Wed, Dec 24, 2014 at 04:15:10PM +0900, Namhyung Kim wrote: > > SNIP > >> >> static void machine__remove_thread(struct machine *machine, struct thread >> *th) >> { >> + struct rb_node **p = >dead_threads.rb_node; >> + struct rb_node

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-25 Thread Jiri Olsa
On Wed, Dec 24, 2014 at 04:15:10PM +0900, Namhyung Kim wrote: SNIP > > static void machine__remove_thread(struct machine *machine, struct thread > *th) > { > + struct rb_node **p = >dead_threads.rb_node; > + struct rb_node *parent = NULL; > + struct thread *pos; > + >

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-25 Thread Jiri Olsa
On Wed, Dec 24, 2014 at 04:15:10PM +0900, Namhyung Kim wrote: SNIP static void machine__remove_thread(struct machine *machine, struct thread *th) { + struct rb_node **p = machine-dead_threads.rb_node; + struct rb_node *parent = NULL; + struct thread *pos; +

Re: [PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-25 Thread Namhyung Kim
On Fri, Dec 26, 2014 at 8:05 AM, Jiri Olsa jo...@redhat.com wrote: On Wed, Dec 24, 2014 at 04:15:10PM +0900, Namhyung Kim wrote: SNIP static void machine__remove_thread(struct machine *machine, struct thread *th) { + struct rb_node **p = machine-dead_threads.rb_node; + struct

[PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-23 Thread Namhyung Kim
Currently perf maintains dead threads in a linked list but this can be a problem if someone needs to search from it. Convert it to a rbtree like normal threads and it'll be used later with multi-file changes. Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/machine.c |

[PATCH 14/37] perf tools: Convert dead thread list into rbtree

2014-12-23 Thread Namhyung Kim
Currently perf maintains dead threads in a linked list but this can be a problem if someone needs to search from it. Convert it to a rbtree like normal threads and it'll be used later with multi-file changes. Cc: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Namhyung Kim