diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-03-13 17:21:25 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-03-13 17:32:48 -0700 |
commit | bf9fc581e8870faddbd320a935f9a627da724c48 (patch) | |
tree | 0a4a6c21fbd4c771b06fac186d32efa6722605b2 /runtime/thread_list.cc | |
parent | 3d96846b6adedf57be64eb3873de0ca58ec4b827 (diff) | |
download | art-bf9fc581e8870faddbd320a935f9a627da724c48.zip art-bf9fc581e8870faddbd320a935f9a627da724c48.tar.gz art-bf9fc581e8870faddbd320a935f9a627da724c48.tar.bz2 |
Add more info to who called SuspendAll
Helps diagnose related jank.
Change-Id: I38191cdda723c6f0355d0197c494a3dff2b6653c
Diffstat (limited to 'runtime/thread_list.cc')
-rw-r--r-- | runtime/thread_list.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc index ddfbebd..1ab0093 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc @@ -448,13 +448,13 @@ size_t ThreadList::FlipThreadRoots(Closure* thread_flip_visitor, Closure* flip_c return runnable_threads.size() + other_threads.size() + 1; // +1 for self. } -void ThreadList::SuspendAll() { +void ThreadList::SuspendAll(const char* cause) { Thread* self = Thread::Current(); if (self != nullptr) { - VLOG(threads) << *self << " SuspendAll starting..."; + VLOG(threads) << *self << " SuspendAll for " << cause << " starting..."; } else { - VLOG(threads) << "Thread[null] SuspendAll starting..."; + VLOG(threads) << "Thread[null] SuspendAll for " << cause << " starting..."; } ATRACE_BEGIN("Suspending mutator threads"); const uint64_t start_time = NanoTime(); @@ -503,7 +503,7 @@ void ThreadList::SuspendAll() { } ATRACE_END(); - ATRACE_BEGIN("Mutator threads suspended"); + ATRACE_BEGIN((std::string("Mutator threads suspended for ") + cause).c_str()); if (self != nullptr) { VLOG(threads) << *self << " SuspendAll complete"; |