summaryrefslogtreecommitdiff
path: root/runtime/trace.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/trace.cc')
-rw-r--r--runtime/trace.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 2cc50b3732..b5108443b0 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -735,7 +735,9 @@ void Trace::StoreExitingThreadInfo(Thread* thread) {
if (the_trace_ != nullptr) {
std::string name;
thread->GetThreadName(name);
- the_trace_->exited_threads_.Put(thread->GetTid(), name);
+ // The same thread/tid may be used multiple times. As SafeMap::Put does not allow to override
+ // a previous mapping, use SafeMap::Overwrite.
+ the_trace_->exited_threads_.Overwrite(thread->GetTid(), name);
}
}