diff options
author | Ian Rogers <irogers@google.com> | 2014-03-06 12:13:39 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-03-06 19:16:01 -0800 |
commit | 719d1a33f6569864f529e5a3fff59e7bca97aad0 (patch) | |
tree | fcd84efd7b9806b93ec1a44e2317e6f882e7fe0e /runtime/thread_list.cc | |
parent | 5365eea9940269b662cfbe103caa348816ff1558 (diff) | |
download | art-719d1a33f6569864f529e5a3fff59e7bca97aad0.zip art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.gz art-719d1a33f6569864f529e5a3fff59e7bca97aad0.tar.bz2 |
Enable annotalysis on clang ART builds.
Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.
Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
Diffstat (limited to 'runtime/thread_list.cc')
-rw-r--r-- | runtime/thread_list.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc index 7745a19..bddebbd 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc @@ -151,7 +151,8 @@ void ThreadList::AssertThreadsAreSuspended(Thread* self, Thread* ignore1, Thread #if HAVE_TIMED_RWLOCK // Attempt to rectify locks so that we dump thread list with required locks before exiting. -static void UnsafeLogFatalForThreadSuspendAllTimeout(Thread* self) NO_THREAD_SAFETY_ANALYSIS { +static void UnsafeLogFatalForThreadSuspendAllTimeout(Thread* self) NO_THREAD_SAFETY_ANALYSIS __attribute__((noreturn)); +static void UnsafeLogFatalForThreadSuspendAllTimeout(Thread* self) { Runtime* runtime = Runtime::Current(); std::ostringstream ss; ss << "Thread suspend timeout\n"; @@ -159,6 +160,7 @@ static void UnsafeLogFatalForThreadSuspendAllTimeout(Thread* self) NO_THREAD_SAF ss << "\n"; runtime->GetThreadList()->DumpLocked(ss); LOG(FATAL) << ss.str(); + exit(0); } #endif @@ -297,7 +299,7 @@ void ThreadList::SuspendAll() { // Block on the mutator lock until all Runnable threads release their share of access. #if HAVE_TIMED_RWLOCK // Timeout if we wait more than 30 seconds. - if (UNLIKELY(!Locks::mutator_lock_->ExclusiveLockWithTimeout(self, 30 * 1000, 0))) { + if (!Locks::mutator_lock_->ExclusiveLockWithTimeout(self, 30 * 1000, 0)) { UnsafeLogFatalForThreadSuspendAllTimeout(self); } #else |