summaryrefslogtreecommitdiffstats
path: root/runtime/thread-inl.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-11-04 17:57:02 -0800
committerIan Rogers <irogers@google.com>2014-11-04 17:57:02 -0800
commit8409ec440079020bbe4ad066cf18a5fadfba67d2 (patch)
tree20a5876198e3292b309b00d88345978f1f194a0e /runtime/thread-inl.h
parentb5331ef9bb2ae68c392e5da3da13816bd43e5b1d (diff)
downloadart-8409ec440079020bbe4ad066cf18a5fadfba67d2.zip
art-8409ec440079020bbe4ad066cf18a5fadfba67d2.tar.gz
art-8409ec440079020bbe4ad066cf18a5fadfba67d2.tar.bz2
Make thread dumping more tolerant of broken invariants during abort.
Change-Id: Ie1bc20debe72f2ea2bf4c1be50cd9877c823670a
Diffstat (limited to 'runtime/thread-inl.h')
-rw-r--r--runtime/thread-inl.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h
index e1b5b91..94f7585 100644
--- a/runtime/thread-inl.h
+++ b/runtime/thread-inl.h
@@ -78,7 +78,9 @@ inline ThreadState Thread::SetState(ThreadState new_state) {
inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const {
if (kIsDebugBuild) {
- CHECK_EQ(0u, tls32_.no_thread_suspension) << tlsPtr_.last_no_thread_suspension_cause;
+ if (gAborting == 0) {
+ CHECK_EQ(0u, tls32_.no_thread_suspension) << tlsPtr_.last_no_thread_suspension_cause;
+ }
if (check_locks) {
bool bad_mutexes_held = false;
for (int i = kLockLevelCount - 1; i >= 0; --i) {
@@ -92,7 +94,9 @@ inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const {
}
}
}
- CHECK(!bad_mutexes_held);
+ if (gAborting == 0) {
+ CHECK(!bad_mutexes_held);
+ }
}
}
}