diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-22 16:42:37 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-27 11:21:44 -0400 |
commit | fdce6a4edaada40136f0e61569b938c9a25f61d5 (patch) | |
tree | dbc7cfdb5678eb407503ab27255c9565c37d4790 /tools | |
parent | 4d4dee9a9609819309a84cd3f2d19dcc50ece195 (diff) |
perf tools: Remove redundant initialization of thread linkage members
A thread moves from a rb tree to a list, but can't be on both, because
those linkage members are in a union. This is leftover from when I was
debugging thread refcounting and had nuked that union.
It is harmless duplication, as RB_CLEAR_NODE() does again what
INIT_LIST_HEAD does.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-hmma9lmip6qlhzhgkhp9tzd1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/thread.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 16c28a37a9e4..28c4b746baa1 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c | |||
@@ -54,7 +54,6 @@ struct thread *thread__new(pid_t pid, pid_t tid) | |||
54 | 54 | ||
55 | list_add(&comm->list, &thread->comm_list); | 55 | list_add(&comm->list, &thread->comm_list); |
56 | atomic_set(&thread->refcnt, 0); | 56 | atomic_set(&thread->refcnt, 0); |
57 | INIT_LIST_HEAD(&thread->node); | ||
58 | RB_CLEAR_NODE(&thread->rb_node); | 57 | RB_CLEAR_NODE(&thread->rb_node); |
59 | } | 58 | } |
60 | 59 | ||
@@ -70,7 +69,6 @@ void thread__delete(struct thread *thread) | |||
70 | struct comm *comm, *tmp; | 69 | struct comm *comm, *tmp; |
71 | 70 | ||
72 | BUG_ON(!RB_EMPTY_NODE(&thread->rb_node)); | 71 | BUG_ON(!RB_EMPTY_NODE(&thread->rb_node)); |
73 | BUG_ON(!list_empty(&thread->node)); | ||
74 | 72 | ||
75 | thread_stack__free(thread); | 73 | thread_stack__free(thread); |
76 | 74 | ||