diff options
author | Jeff Hao <jeffhao@google.com> | 2014-10-14 13:12:01 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2014-10-14 18:12:09 -0700 |
commit | e094b87c6f6ea9ebf83aa56a3114ac59556aaf9f (patch) | |
tree | d6db16b54affbe5304a8155bee3536b982acafd7 /runtime/trace.h | |
parent | cfd8adec84701752a56ddccf556b8c40142a9e0f (diff) | |
download | art-e094b87c6f6ea9ebf83aa56a3114ac59556aaf9f.tar.gz art-e094b87c6f6ea9ebf83aa56a3114ac59556aaf9f.tar.bz2 art-e094b87c6f6ea9ebf83aa56a3114ac59556aaf9f.zip |
Store exiting thread ids and names while tracing to output later.
Bug: 17909204
(cherry picked from commit fdcbc5c4c7c67bba06e038ac96a2e8bc49b91f84)
Change-Id: Iea087560ba8b983412a6dde2ec166c9e7214f3a1
Diffstat (limited to 'runtime/trace.h')
-rw-r--r-- | runtime/trace.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/trace.h b/runtime/trace.h index 45a02dab3c..ead1c29c72 100644 --- a/runtime/trace.h +++ b/runtime/trace.h @@ -104,6 +104,8 @@ class Trace FINAL : public instrumentation::InstrumentationListener { static std::vector<mirror::ArtMethod*>* AllocStackTrace(); // Clear and store an old stack trace for later use. static void FreeStackTrace(std::vector<mirror::ArtMethod*>* stack_trace); + // Save id and name of a thread before it exits. + static void StoreExitingThreadInfo(Thread* thread); private: explicit Trace(File* trace_file, int buffer_size, int flags, bool sampling_enabled); @@ -166,6 +168,9 @@ class Trace FINAL : public instrumentation::InstrumentationListener { // Did we overflow the buffer recording traces? bool overflow_; + // Map of thread ids and names that have already exited. + SafeMap<pid_t, std::string> exited_threads_; + DISALLOW_COPY_AND_ASSIGN(Trace); }; |