Home
last modified time | relevance | path

Searched refs:LockWord (Results 1 – 15 of 15) sorted by relevance

/art/runtime/
Dlock_word-inl.h25 inline uint32_t LockWord::ThinLockOwner() const { in ThinLockOwner()
30 inline uint32_t LockWord::ThinLockCount() const { in ThinLockCount()
35 inline Monitor* LockWord::FatLockMonitor() const { in FatLockMonitor()
41 inline size_t LockWord::ForwardingAddress() const { in ForwardingAddress()
46 inline LockWord::LockWord() : value_(0) { in LockWord() function
50 inline LockWord::LockWord(Monitor* mon) in LockWord() function
55 inline int32_t LockWord::GetHashCode() const { in GetHashCode()
Dlock_word.h53 class LockWord {
85 static LockWord FromThinLockId(uint32_t thread_id, uint32_t count) { in FromThinLockId()
87 return LockWord((thread_id << kThinLockOwnerShift) | (count << kThinLockCountShift) | in FromThinLockId()
91 static LockWord FromForwardingAddress(size_t target) { in FromForwardingAddress()
93 return LockWord((target >> kStateSize) | (kStateForwardingAddress << kStateShift)); in FromForwardingAddress()
96 static LockWord FromHashCode(uint32_t hash_code) { in FromHashCode()
98 return LockWord((hash_code << kHashShift) | (kStateHash << kStateShift)); in FromHashCode()
141 LockWord();
144 explicit LockWord(Monitor* mon);
146 bool operator==(const LockWord& rhs) const {
[all …]
Dmonitor.cc141 LockWord lw(GetObject()->GetLockWord(false)); in Install()
143 case LockWord::kThinLocked: { in Install()
148 case LockWord::kHashCode: { in Install()
152 case LockWord::kFatLocked: { in Install()
156 case LockWord::kUnlocked: { in Install()
165 LockWord fat(this); in Install()
614 LockWord lw(obj->GetLockWord(false)); in Deflate()
616 if (lw.GetState() == LockWord::kFatLocked) { in Deflate()
631 if (monitor->lock_count_ > LockWord::kThinLockMaxCount) { in Deflate()
635 obj->SetLockWord(LockWord::FromThinLockId(owner->GetThreadId(), monitor->lock_count_), false); in Deflate()
[all …]
Dmonitor_test.cc119LockWord lock_after = monitor_test_->object_.Get()->GetLockWord(false); // it to thinLocked. in Run()
120 LockWord::LockState new_state = lock_after.GetState(); in Run()
123 if (LockWord::LockState::kThinLocked != new_state) { in Run()
125 ASSERT_EQ(LockWord::LockState::kThinLocked, new_state); // To fail the test. in Run()
131 LockWord lock_after2 = monitor_test_->object_.Get()->GetLockWord(false); in Run()
132 LockWord::LockState new_state2 = lock_after2.GetState(); in Run()
135 if (LockWord::LockState::kFatLocked != new_state2) { in Run()
137 ASSERT_EQ(LockWord::LockState::kFatLocked, new_state2); // To fail the test. in Run()
Dmonitor.h37 class LockWord; variable
98 static bool IsValidLockWord(LockWord lock_word);
124 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
Dthread_list.cc47 CHECK(Monitor::IsValidLockWord(LockWord::FromThinLockId(kMaxThreadId, 1))); in ThreadList()
Dthread.cc929 if ((o->GetLockWord(false).GetState() == LockWord::kThinLocked) && in DumpLockedObject()
/art/runtime/mirror/
Dobject.cc144 } while ((expected_value & LockWord::kHashMask) == 0 || in GenerateIdentityHashCode()
146 return expected_value & LockWord::kHashMask; in GenerateIdentityHashCode()
152 LockWord lw = current_this->GetLockWord(false); in IdentityHashCode()
154 case LockWord::kUnlocked: { in IdentityHashCode()
157 LockWord hash_word(LockWord::FromHashCode(GenerateIdentityHashCode())); in IdentityHashCode()
158 DCHECK_EQ(hash_word.GetState(), LockWord::kHashCode); in IdentityHashCode()
164 case LockWord::kThinLocked: { in IdentityHashCode()
175 case LockWord::kFatLocked: { in IdentityHashCode()
181 case LockWord::kHashCode: { in IdentityHashCode()
Dobject.h27 class LockWord; variable
115 LockWord GetLockWord(bool as_volatile) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
116 void SetLockWord(LockWord new_val, bool as_volatile) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
117 bool CasLockWordWeakSequentiallyConsistent(LockWord old_val, LockWord new_val)
119 bool CasLockWordWeakRelaxed(LockWord old_val, LockWord new_val)
Dobject-inl.h61 inline LockWord Object::GetLockWord(bool as_volatile) { in GetLockWord()
63 return LockWord(GetField32Volatile(OFFSET_OF_OBJECT_MEMBER(Object, monitor_))); in GetLockWord()
65 return LockWord(GetField32(OFFSET_OF_OBJECT_MEMBER(Object, monitor_))); in GetLockWord()
68 inline void Object::SetLockWord(LockWord new_val, bool as_volatile) { in SetLockWord()
77 inline bool Object::CasLockWordWeakSequentiallyConsistent(LockWord old_val, LockWord new_val) { in CasLockWordWeakSequentiallyConsistent()
83 inline bool Object::CasLockWordWeakRelaxed(LockWord old_val, LockWord new_val) { in CasLockWordWeakRelaxed()
/art/runtime/arch/
Dstub_test.cc614 LockWord lock = obj->GetLockWord(false); in TEST_F()
615 LockWord::LockState old_state = lock.GetState(); in TEST_F()
616 EXPECT_EQ(LockWord::LockState::kUnlocked, old_state); in TEST_F()
620 LockWord lock_after = obj->GetLockWord(false); in TEST_F()
621 LockWord::LockState new_state = lock_after.GetState(); in TEST_F()
622 EXPECT_EQ(LockWord::LockState::kThinLocked, new_state); in TEST_F()
630 LockWord l_inc = obj->GetLockWord(false); in TEST_F()
631 LockWord::LockState l_inc_state = l_inc.GetState(); in TEST_F()
632 EXPECT_EQ(LockWord::LockState::kThinLocked, l_inc_state); in TEST_F()
644 LockWord lock_after2 = obj2->GetLockWord(false); in TEST_F()
[all …]
/art/runtime/gc/collector/
Dsemi_space-inl.h46 LockWord lock_word = obj->GetLockWord(false); in GetForwardingAddressInFromSpace()
47 if (lock_word.GetState() != LockWord::kForwardingAddress) { in GetForwardingAddressInFromSpace()
76 LockWord::FromForwardingAddress(reinterpret_cast<size_t>(forward_address)), false); in MarkObject()
Dmark_compact.cc92 LockWord lock_word = obj->GetLockWord(false); in ForwardObject()
94 if (lock_word.GetValue() != LockWord().GetValue()) { in ForwardObject()
99 obj->SetLockWord(LockWord::FromForwardingAddress(reinterpret_cast<size_t>(bump_pointer_)), in ForwardObject()
514 LockWord lock_word; in MoveObject()
Dmark_compact.h240 std::deque<LockWord> lock_words_to_restore_;
/art/compiler/
Dimage_writer.cc186 LockWord lw(object->GetLockWord(false)); in SetImageOffset()
188 case LockWord::kFatLocked: { in SetImageOffset()
192 case LockWord::kThinLocked: { in SetImageOffset()
196 case LockWord::kUnlocked: in SetImageOffset()
199 case LockWord::kHashCode: in SetImageOffset()
206 object->SetLockWord(LockWord::FromForwardingAddress(offset), false); in SetImageOffset()
219 return object->GetLockWord(false).GetState() == LockWord::kForwardingAddress; in IsImageOffsetAssigned()
225 LockWord lock_word = object->GetLockWord(false); in GetImageOffset()
590 hash_pair.first->SetLockWord(LockWord::FromHashCode(hash_pair.second), false); in CopyAndFixupObjects()
610 copy->SetLockWord(LockWord(), false); in CopyAndFixupObjectsCallback()