Home
last modified time | relevance | path

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

12

/art/runtime/
Dlock_word-inl.h25 inline uint32_t LockWord::ThinLockOwner() const { in ThinLockOwner()
31 inline uint32_t LockWord::ThinLockCount() const { in ThinLockCount()
37 inline Monitor* LockWord::FatLockMonitor() const { in FatLockMonitor()
44 inline size_t LockWord::ForwardingAddress() const { in ForwardingAddress()
49 inline LockWord::LockWord() : value_(0) { in LockWord() function
53 inline LockWord::LockWord(Monitor* mon, uint32_t gc_state) in LockWord() function
63 inline int32_t LockWord::GetHashCode() const { in GetHashCode()
Dlock_word.h66 class LockWord {
137 static LockWord FromThinLockId(uint32_t thread_id, uint32_t count, uint32_t gc_state) { in FromThinLockId()
141 return LockWord((thread_id << kThinLockOwnerShift) | in FromThinLockId()
147 static LockWord FromForwardingAddress(size_t target) { in FromForwardingAddress()
149 return LockWord((target >> kForwardingAddressShift) | kStateForwardingAddressShifted); in FromForwardingAddress()
152 static LockWord FromHashCode(uint32_t hash_code, uint32_t gc_state) { in FromHashCode()
155 return LockWord((hash_code << kHashShift) | in FromHashCode()
160 static LockWord FromDefault(uint32_t gc_state) { in FromDefault()
161 return LockWord(gc_state << kGCStateShift); in FromDefault()
164 static bool IsDefault(LockWord lw) { in IsDefault()
[all …]
Dmonitor.cc150 LockWord lw(GetObject()->GetLockWord(false)); in Install()
152 case LockWord::kThinLocked: { in Install()
157 case LockWord::kHashCode: { in Install()
161 case LockWord::kFatLocked: { in Install()
165 case LockWord::kUnlocked: { in Install()
174 LockWord fat(this, lw.GCState()); in Install()
910 LockWord lw(obj->GetLockWord(false)); in Deflate()
912 if (lw.GetState() == LockWord::kFatLocked) { in Deflate()
927 if (static_cast<uint32_t>(monitor->lock_count_) > LockWord::kThinLockMaxCount) { in Deflate()
931 LockWord new_lw = LockWord::FromThinLockId(owner->GetThreadId(), in Deflate()
[all …]
Dmonitor_test.cc71 LockWord lock_after = monitor_test_->object_.Get()->GetLockWord(false); // it to thinLocked. in Run()
72 LockWord::LockState new_state = lock_after.GetState(); in Run()
75 if (LockWord::LockState::kThinLocked != new_state) { in Run()
77 ASSERT_EQ(LockWord::LockState::kThinLocked, new_state); // To fail the test. in Run()
83 LockWord lock_after2 = monitor_test_->object_.Get()->GetLockWord(false); in Run()
84 LockWord::LockState new_state2 = lock_after2.GetState(); in Run()
87 if (LockWord::LockState::kFatLocked != new_state2) { in Run()
89 ASSERT_EQ(LockWord::LockState::kFatLocked, new_state2); // To fail the test. in Run()
Dmonitor_pool.h49 DCHECK_ALIGNED(mon, LockWord::kMonitorIdAlignment); in CreateMonitor()
76 return reinterpret_cast<Monitor*>(mon_id << LockWord::kMonitorIdAlignmentShift); in MonitorFromMonitorId()
84 return reinterpret_cast<MonitorId>(mon) >> LockWord::kMonitorIdAlignmentShift; in MonitorIdFromMonitor()
205 static_assert(kMaxListSize * kChunkSize < (1 << LockWord::kMonitorIdSize),
Dmonitor.h41 class LockWord; variable
115 static bool IsValidLockWord(LockWord lock_word);
141 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
154 int error = posix_memalign(&result, LockWord::kMonitorIdAlignment, size); in new()
Dtransaction_test.cc70 LockWord old_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
80 LockWord new_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
81 EXPECT_TRUE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in testTransactionAbort()
120 LockWord old_lock_word = h_obj->GetLockWord(false); in TEST_F()
125 LockWord new_lock_word = h_obj->GetLockWord(false); in TEST_F()
129 LockWord aborted_lock_word = h_obj->GetLockWord(false); in TEST_F()
130 EXPECT_FALSE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in TEST_F()
131 EXPECT_TRUE(LockWord::Equal<false>(aborted_lock_word, new_lock_word)); in TEST_F()
Djni_env_ext.cc196 if ((o->GetLockWord(false).GetState() == LockWord::kThinLocked) && in ComputeMonitorDescription()
Djni_internal_test.cc2393 LockWord lock_word = soa.Decode<mirror::Object>(jobj)->GetLockWord(true); in IsLocked()
2395 case LockWord::kHashCode: in IsLocked()
2396 case LockWord::kUnlocked: in IsLocked()
2398 case LockWord::kThinLocked: in IsLocked()
2400 case LockWord::kFatLocked: in IsLocked()
/art/runtime/mirror/
Dobject-readbarrier-inl.h33 inline LockWord Object::GetLockWord(bool as_volatile) { in GetLockWord()
35 return LockWord(GetField32Volatile<kVerifyFlags>(OFFSET_OF_OBJECT_MEMBER(Object, monitor_))); in GetLockWord()
37 return LockWord(GetField32<kVerifyFlags>(OFFSET_OF_OBJECT_MEMBER(Object, monitor_))); in GetLockWord()
58 inline bool Object::CasLockWordWeakRelaxed(LockWord old_val, LockWord new_val) { in CasLockWordWeakRelaxed()
64 inline bool Object::CasLockWordWeakRelease(LockWord old_val, LockWord new_val) { in CasLockWordWeakRelease()
88 LockWord lw(static_cast<uint32_t>(result)); in GetReadBarrierState()
104 LockWord lw(static_cast<uint32_t>(result)); in GetReadBarrierState()
108 LockWord lw = GetLockWord(false); in GetReadBarrierState()
117 LockWord lw = GetLockWord(false); in GetReadBarrierState()
131 LockWord lw(GetField<uint32_t, /*kIsVolatile*/false>(OFFSET_OF_OBJECT_MEMBER(Object, monitor_))); in GetReadBarrierState()
[all …]
Dobject.cc179 (expected_value & LockWord::kHashMask) == 0); in GenerateIdentityHashCode()
180 return expected_value & LockWord::kHashMask; in GenerateIdentityHashCode()
190 LockWord lw = current_this->GetLockWord(false); in IdentityHashCode()
192 case LockWord::kUnlocked: { in IdentityHashCode()
195 LockWord hash_word = LockWord::FromHashCode(GenerateIdentityHashCode(), lw.GCState()); in IdentityHashCode()
196 DCHECK_EQ(hash_word.GetState(), LockWord::kHashCode); in IdentityHashCode()
202 case LockWord::kThinLocked: { in IdentityHashCode()
213 case LockWord::kFatLocked: { in IdentityHashCode()
219 case LockWord::kHashCode: { in IdentityHashCode()
Dobject.h36 class LockWord; variable
151 LockWord GetLockWord(bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
153 void SetLockWord(LockWord new_val, bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
154 bool CasLockWordWeakSequentiallyConsistent(LockWord old_val, LockWord new_val)
156 bool CasLockWordWeakRelaxed(LockWord old_val, LockWord new_val)
158 bool CasLockWordWeakAcquire(LockWord old_val, LockWord new_val)
160 bool CasLockWordWeakRelease(LockWord old_val, LockWord new_val)
Dobject-inl.h70 inline void Object::SetLockWord(LockWord new_val, bool as_volatile) { in SetLockWord()
81 inline bool Object::CasLockWordWeakSequentiallyConsistent(LockWord old_val, LockWord new_val) { in CasLockWordWeakSequentiallyConsistent()
87 inline bool Object::CasLockWordWeakAcquire(LockWord old_val, LockWord new_val) { in CasLockWordWeakAcquire()
140 LockWord lw = GetLockWord(false); in SetReadBarrierState()
/art/runtime/generated/
Dasm_support_gen.h92 DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_STATE_SHIFT), (static_cast<int32_t>(art::LockWord::k…
94 DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_STATE_MASK), (static_cast<uint32_t>(art::LockWord::…
96 …nt32_t>(LOCK_WORD_READ_BARRIER_STATE_SHIFT), (static_cast<int32_t>(art::LockWord::kReadBarrierStat…
98 …nt32_t>(LOCK_WORD_READ_BARRIER_STATE_MASK), (static_cast<uint32_t>(art::LockWord::kReadBarrierStat…
100 …LOCK_WORD_READ_BARRIER_STATE_MASK_TOGGLED), (static_cast<uint32_t>(art::LockWord::kReadBarrierStat…
102 …ast<int32_t>(LOCK_WORD_THIN_LOCK_COUNT_ONE), (static_cast<int32_t>(art::LockWord::kThinLockCountOn…
104 …t32_t>(LOCK_WORD_STATE_FORWARDING_ADDRESS), (static_cast<uint32_t>(art::LockWord::kStateForwarding…
106 …CK_WORD_STATE_FORWARDING_ADDRESS_OVERFLOW), (static_cast<uint32_t>(art::LockWord::kStateForwarding…
108 …(LOCK_WORD_STATE_FORWARDING_ADDRESS_SHIFT), (static_cast<uint32_t>(art::LockWord::kForwardingAddre…
110 …uint32_t>(LOCK_WORD_GC_STATE_MASK_SHIFTED), (static_cast<uint32_t>(art::LockWord::kGCStateMaskShif…
[all …]
/art/runtime/gc/collector/
Dsemi_space-inl.h31 LockWord lock_word = obj->GetLockWord(false); in GetForwardingAddressInFromSpace()
32 if (lock_word.GetState() != LockWord::kForwardingAddress) { in GetForwardingAddressInFromSpace()
56 LockWord::FromForwardingAddress(reinterpret_cast<size_t>(forward_address)), false); in MarkObject()
Dconcurrent_copying-inl.h191 LockWord lw = from_ref->GetLockWord(false); in GetFwdPtr()
192 if (lw.GetState() == LockWord::kForwardingAddress) { in GetFwdPtr()
Dmark_compact.cc83 LockWord lock_word = obj->GetLockWord(false); in ForwardObject()
85 if (!LockWord::IsDefault(lock_word)) { in ForwardObject()
90 obj->SetLockWord(LockWord::FromForwardingAddress(reinterpret_cast<size_t>(bump_pointer_)), in ForwardObject()
512 LockWord lock_word = LockWord::Default(); in MoveObject()
Dmark_compact.h220 std::deque<LockWord> lock_words_to_restore_;
Dconcurrent_copying.cc2409 sizeof(LockWord), in Copy()
2420 LockWord old_lock_word = from_ref->GetLockWord(false); in Copy()
2422 if (old_lock_word.GetState() == LockWord::kForwardingAddress) { in Copy()
2460 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress); in Copy()
2475 LockWord new_lock_word = LockWord::FromForwardingAddress(reinterpret_cast<size_t>(to_ref)); in Copy()
2493 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress); in Copy()
/art/runtime/arch/
Dstub_test.cc598 LockWord lock = obj->GetLockWord(false); in TEST_F()
599 LockWord::LockState old_state = lock.GetState(); in TEST_F()
600 EXPECT_EQ(LockWord::LockState::kUnlocked, old_state); in TEST_F()
604 LockWord lock_after = obj->GetLockWord(false); in TEST_F()
605 LockWord::LockState new_state = lock_after.GetState(); in TEST_F()
606 EXPECT_EQ(LockWord::LockState::kThinLocked, new_state); in TEST_F()
614 LockWord l_inc = obj->GetLockWord(false); in TEST_F()
615 LockWord::LockState l_inc_state = l_inc.GetState(); in TEST_F()
616 EXPECT_EQ(LockWord::LockState::kThinLocked, l_inc_state); in TEST_F()
628 LockWord lock_after2 = obj2->GetLockWord(false); in TEST_F()
[all …]
/art/tools/cpp-define-generator/
Dconstant_lockword.def20 #include "lock_word.h" // art::LockWord
24 DEFINE_EXPR(LOCK_WORD_ ## macro_name, type, art::LockWord::constant_field_name)
/art/compiler/linker/arm/
Drelative_patcher_thumb2.cc194 __ Tst(ip, Operand(LockWord::kReadBarrierStateMaskShifted)); in EmitGrayCheckAndFastPath()
326 __ Tst(ip, LockWord::kMarkBitStateMaskShifted); in CompileBakerReadBarrierThunk()
331 static_assert(LockWord::kStateShift == 30 && LockWord::kStateForwardingAddress == 3, in CompileBakerReadBarrierThunk()
347 __ Lsl(root_reg, ip, LockWord::kForwardingAddressShift); in CompileBakerReadBarrierThunk()
Drelative_patcher_thumb2_test.cc656 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldWide()
657 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldWide()
761 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldNarrow()
762 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldNarrow()
1038 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TEST_F()
1039 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TEST_F()
/art/dex2oat/linker/
Dimage_writer.cc351 object->SetLockWord(LockWord::FromForwardingAddress(offset), false); in SetImageOffset()
358 obj->SetLockWord(LockWord::FromForwardingAddress(offset), false); in UpdateImageOffset()
379 return object->GetLockWord(false).GetState() == LockWord::kForwardingAddress; in IsImageOffsetAssigned()
385 LockWord lock_word = object->GetLockWord(false); in GetImageOffset()
399 LockWord lw(object->GetLockWord(false)); in SetImageBinSlot()
401 case LockWord::kFatLocked: in SetImageBinSlot()
403 case LockWord::kThinLocked: { in SetImageBinSlot()
405 bool thin = (lw.GetState() == LockWord::kThinLocked); in SetImageBinSlot()
415 case LockWord::kUnlocked: in SetImageBinSlot()
418 case LockWord::kHashCode: in SetImageBinSlot()
[all …]
/art/compiler/linker/arm64/
Drelative_patcher_arm64.cc376 __ Tbnz(ip0.W(), LockWord::kReadBarrierStateShift, slow_path); in EmitGrayCheckAndFastPath()
492 __ Tbz(ip0.W(), LockWord::kMarkBitStateShift, &not_marked); in CompileBakerReadBarrierThunk()
505 __ Lsl(root_reg, ip0.W(), LockWord::kForwardingAddressShift); in CompileBakerReadBarrierThunk()

12