OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
877bbed
)
Fix spin waiting for weak ref access in the intern table for CC.
author
Hiroshi Yamauchi
<yamauchi@google.com>
Thu, 3 Nov 2016 20:03:20 +0000
(13:03 -0700)
committer
Hiroshi Yamauchi
<yamauchi@google.com>
Thu, 3 Nov 2016 20:03:20 +0000
(13:03 -0700)
Bug:
32637633
Test: test-art-host with CC
Change-Id: I8f0f9f5ca24687f688318ea5cafcbb7f6597448c
runtime/intern_table.cc
patch
|
blob
|
history
diff --git
a/runtime/intern_table.cc
b/runtime/intern_table.cc
index
7b75109
..
d885226
100644
(file)
--- a/
runtime/intern_table.cc
+++ b/
runtime/intern_table.cc
@@
-199,7
+199,8
@@
void InternTable::WaitUntilAccessible(Thread* self) {
{
ScopedThreadSuspension sts(self, kWaitingWeakGcRootRead);
MutexLock mu(self, *Locks::intern_table_lock_);
- while (weak_root_state_ == gc::kWeakRootStateNoReadsOrWrites) {
+ while ((!kUseReadBarrier && weak_root_state_ == gc::kWeakRootStateNoReadsOrWrites) ||
+ (kUseReadBarrier && !self->GetWeakRefAccessEnabled())) {
weak_intern_condition_.Wait(self);
}
}