summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-12-02 19:25:48 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-02 19:25:50 +0000
commitb67f965a2c0af98867dcc75ce07ec94d943421ae (patch)
tree9d2a6c8d8b023e43a5d20a900574391d2ef6e4f1
parent5055c8e008fef62b23e485504472cd215b1b5bfd (diff)
parentef048f6f968abd59fa7fa89413a6eb85c959beaf (diff)
downloadart-b67f965a2c0af98867dcc75ce07ec94d943421ae.zip
art-b67f965a2c0af98867dcc75ce07ec94d943421ae.tar.gz
art-b67f965a2c0af98867dcc75ce07ec94d943421ae.tar.bz2
Merge "ART: Add some thread abort logging"
-rw-r--r--runtime/thread-inl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h
index e30e745..7aed8b0 100644
--- a/runtime/thread-inl.h
+++ b/runtime/thread-inl.h
@@ -69,7 +69,12 @@ inline ThreadState Thread::SetState(ThreadState new_state) {
// Cannot use this code to change into Runnable as changing to Runnable should fail if
// old_state_and_flags.suspend_request is true.
DCHECK_NE(new_state, kRunnable);
- DCHECK_EQ(this, Thread::Current());
+ if (kIsDebugBuild && this != Thread::Current()) {
+ std::string name;
+ GetThreadName(name);
+ LOG(FATAL) << "Thread \"" << name << "\"(" << this << " != Thread::Current()="
+ << Thread::Current() << ") changing state to " << new_state;
+ }
union StateAndFlags old_state_and_flags;
old_state_and_flags.as_int = tls32_.state_and_flags.as_int;
tls32_.state_and_flags.as_struct.state = new_state;