diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-06-28 16:33:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-06-28 16:33:24 -0400 |
commit | f384c954c9fe3d3c6fce5ae66b67f2ddd947d098 (patch) | |
tree | a38541b8083a2304435e9a153d408bd7cd44116e /tools/perf/util/session.c | |
parent | 9a15a07fe2175dc25cd928a354b3839f562ac8cc (diff) | |
parent | 5904b3b81d25166e5e39b9727645bb47937618e3 (diff) |
Merge branch 'linus' into perf/core
Reason: Further changes conflict with upstream fixes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 0564a5cfb12e..030791870e33 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -92,6 +92,7 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc | |||
92 | 92 | ||
93 | memcpy(self->filename, filename, len); | 93 | memcpy(self->filename, filename, len); |
94 | self->threads = RB_ROOT; | 94 | self->threads = RB_ROOT; |
95 | INIT_LIST_HEAD(&self->dead_threads); | ||
95 | self->hists_tree = RB_ROOT; | 96 | self->hists_tree = RB_ROOT; |
96 | self->last_match = NULL; | 97 | self->last_match = NULL; |
97 | self->mmap_window = 32; | 98 | self->mmap_window = 32; |
@@ -133,6 +134,16 @@ void perf_session__delete(struct perf_session *self) | |||
133 | free(self); | 134 | free(self); |
134 | } | 135 | } |
135 | 136 | ||
137 | void perf_session__remove_thread(struct perf_session *self, struct thread *th) | ||
138 | { | ||
139 | rb_erase(&th->rb_node, &self->threads); | ||
140 | /* | ||
141 | * We may have references to this thread, for instance in some hist_entry | ||
142 | * instances, so just move them to a separate list. | ||
143 | */ | ||
144 | list_add_tail(&th->node, &self->dead_threads); | ||
145 | } | ||
146 | |||
136 | static bool symbol__match_parent_regex(struct symbol *sym) | 147 | static bool symbol__match_parent_regex(struct symbol *sym) |
137 | { | 148 | { |
138 | if (sym->name && !regexec(&parent_regex, sym->name, 0, NULL, 0)) | 149 | if (sym->name && !regexec(&parent_regex, sym->name, 0, NULL, 0)) |