Home
last modified time | relevance | path

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

12

/art/tools/cpp-define-generator/
Dlockword.def22 art::LockWord::kGCStateMaskShifted)
24 art::LockWord::kGCStateMaskShiftedToggled)
26 art::LockWord::kGCStateShift)
28 art::LockWord::kGCStateSize)
30 art::LockWord::kMarkBitStateMaskShifted)
32 art::LockWord::kMarkBitStateShift)
34 art::LockWord::kReadBarrierStateMaskShifted)
36 art::LockWord::kReadBarrierStateMaskShiftedToggled)
38 art::LockWord::kReadBarrierStateShift)
40 art::LockWord::kStateForwardingAddress)
[all …]
Dmirror_object.def29 art::LockWord::kReadBarrierStateShift / art::kBitsPerByte)
31 art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)
33 static_cast<int8_t>(1 << (art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)))
/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.h67 class LockWord {
141 static LockWord FromThinLockId(uint32_t thread_id, uint32_t count, uint32_t gc_state) { in FromThinLockId()
145 return LockWord((thread_id << kThinLockOwnerShift) | in FromThinLockId()
151 static LockWord FromForwardingAddress(size_t target) { in FromForwardingAddress()
153 return LockWord((target >> kForwardingAddressShift) | kStateForwardingAddressShifted); in FromForwardingAddress()
156 static LockWord FromHashCode(uint32_t hash_code, uint32_t gc_state) { in FromHashCode()
159 return LockWord((hash_code << kHashShift) | in FromHashCode()
164 static LockWord FromDefault(uint32_t gc_state) { in FromDefault()
165 return LockWord(gc_state << kGCStateShift); in FromDefault()
168 static bool IsDefault(LockWord lw) { in IsDefault()
[all …]
Dmonitor.cc220 LockWord lw(GetObject()->GetLockWord(false)); in Install()
222 case LockWord::kThinLocked: { in Install()
234 LockWord fat(this, lw.GCState()); in Install()
253 case LockWord::kHashCode: { in Install()
256 LockWord fat(this, lw.GCState()); in Install()
259 case LockWord::kFatLocked: { in Install()
263 case LockWord::kUnlocked: { in Install()
992 LockWord lw(obj->GetLockWord(false)); in Deflate()
994 if (lw.GetState() == LockWord::kFatLocked) { in Deflate()
1009 LockWord new_lw = LockWord::FromHashCode(monitor->GetHashCode(), lw.GCState()); in Deflate()
[all …]
Dmonitor_test.cc72 LockWord lock_after = monitor_test_->object_.Get()->GetLockWord(false); // it to thinLocked. in Run()
73 LockWord::LockState new_state = lock_after.GetState(); in Run()
76 if (LockWord::LockState::kThinLocked != new_state) { in Run()
78 ASSERT_EQ(LockWord::LockState::kThinLocked, new_state); // To fail the test. in Run()
84 LockWord lock_after2 = monitor_test_->object_.Get()->GetLockWord(false); in Run()
85 LockWord::LockState new_state2 = lock_after2.GetState(); in Run()
88 if (LockWord::LockState::kFatLocked != new_state2) { in Run()
90 ASSERT_EQ(LockWord::LockState::kFatLocked, new_state2); // To fail the test. in Run()
Dmonitor_pool.h52 DCHECK_ALIGNED(mon, LockWord::kMonitorIdAlignment); in CreateMonitor()
79 return reinterpret_cast<Monitor*>(mon_id << LockWord::kMonitorIdAlignmentShift); in MonitorFromMonitorId()
87 return reinterpret_cast<MonitorId>(mon) >> LockWord::kMonitorIdAlignmentShift; in MonitorIdFromMonitor()
211 static_assert(kMaxListSize * kChunkSize < (1 << LockWord::kMonitorIdSize),
Dmonitor.h43 class LockWord; variable
126 static bool IsValidLockWord(LockWord lock_word);
152 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
165 int error = posix_memalign(&result, LockWord::kMonitorIdAlignment, size); in new()
Dtransaction_test.cc76 LockWord old_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
86 LockWord new_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
87 EXPECT_TRUE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in testTransactionAbort()
126 LockWord old_lock_word = h_obj->GetLockWord(false); in TEST_F()
131 LockWord new_lock_word = h_obj->GetLockWord(false); in TEST_F()
135 LockWord aborted_lock_word = h_obj->GetLockWord(false); in TEST_F()
136 EXPECT_FALSE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in TEST_F()
137 EXPECT_TRUE(LockWord::Equal<false>(aborted_lock_word, new_lock_word)); in TEST_F()
Dcommon_throws.cc457 constexpr uint32_t gray_byte_position = LockWord::kReadBarrierStateShift / kBitsPerByte; in IsValidReadBarrierImplicitCheck()
Dthread_list.cc82 CHECK(Monitor::IsValidLockWord(LockWord::FromThinLockId(kMaxThreadId, 1, 0U))); in ThreadList()
/art/runtime/mirror/
Dobject-readbarrier-inl.h33 inline LockWord Object::GetLockWord(bool as_volatile) { in GetLockWord()
35 return LockWord(GetField32Volatile<kVerifyFlags>(MonitorOffset())); in GetLockWord()
37 return LockWord(GetField32<kVerifyFlags>(MonitorOffset())); in GetLockWord()
61 inline bool Object::CasLockWord(LockWord old_val, in CasLockWord()
62 LockWord new_val, in CasLockWord()
91 LockWord lw(static_cast<uint32_t>(result)); in GetReadBarrierState()
107 LockWord lw(static_cast<uint32_t>(result)); in GetReadBarrierState()
111 LockWord lw = GetLockWord(false); in GetReadBarrierState()
131 LockWord lw(GetFieldPrimitive<uint32_t, /*kIsVolatile=*/false>(MonitorOffset())); in GetReadBarrierState()
142 LockWord lw(GetFieldAcquire<uint32_t>(MonitorOffset())); in GetReadBarrierStateAcquire()
[all …]
Dobject.cc176 (expected_value & LockWord::kHashMask) == 0); in GenerateIdentityHashCode()
177 return expected_value & LockWord::kHashMask; in GenerateIdentityHashCode()
187 LockWord lw = current_this->GetLockWord(false); in IdentityHashCode()
189 case LockWord::kUnlocked: { in IdentityHashCode()
192 LockWord hash_word = LockWord::FromHashCode(GenerateIdentityHashCode(), lw.GCState()); in IdentityHashCode()
193 DCHECK_EQ(hash_word.GetState(), LockWord::kHashCode); in IdentityHashCode()
201 case LockWord::kThinLocked: { in IdentityHashCode()
212 case LockWord::kFatLocked: { in IdentityHashCode()
218 case LockWord::kHashCode: { in IdentityHashCode()
Dobject.h37 class LockWord; variable
150 LockWord GetLockWord(bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
152 void SetLockWord(LockWord new_val, bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
153 bool CasLockWord(LockWord old_val, LockWord new_val, CASMode mode, std::memory_order memory_order)
Dobject-inl.h69 inline void Object::SetLockWord(LockWord new_val, bool as_volatile) { in SetLockWord()
114 LockWord lw = GetLockWord(false); in SetReadBarrierState()
/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.h229 LockWord lw = from_ref->GetLockWord(false); in GetFwdPtr()
230 if (lw.GetState() == LockWord::kForwardingAddress) { in GetFwdPtr()
Dconcurrent_copying.cc3410 sizeof(LockWord), in Copy()
3421 LockWord old_lock_word = from_ref->GetLockWord(false); in Copy()
3423 if (old_lock_word.GetState() == LockWord::kForwardingAddress) { in Copy()
3457 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress); in Copy()
3472 LockWord new_lock_word = LockWord::FromForwardingAddress(reinterpret_cast<size_t>(to_ref)); in Copy()
3508 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress); in Copy()
/art/runtime/arch/
Dstub_test.cc469 LockWord lock = obj->GetLockWord(false); in TEST_F()
470 LockWord::LockState old_state = lock.GetState(); in TEST_F()
471 EXPECT_EQ(LockWord::LockState::kUnlocked, old_state); in TEST_F()
475 LockWord lock_after = obj->GetLockWord(false); in TEST_F()
476 LockWord::LockState new_state = lock_after.GetState(); in TEST_F()
477 EXPECT_EQ(LockWord::LockState::kThinLocked, new_state); in TEST_F()
485 LockWord l_inc = obj->GetLockWord(false); in TEST_F()
486 LockWord::LockState l_inc_state = l_inc.GetState(); in TEST_F()
487 EXPECT_EQ(LockWord::LockState::kThinLocked, l_inc_state); in TEST_F()
499 LockWord lock_after2 = obj2->GetLockWord(false); in TEST_F()
[all …]
/art/dex2oat/linker/
Dimage_writer.cc624 LockWord lw(object->GetLockWord(false)); in SetImageBinSlot()
626 case LockWord::kFatLocked: in SetImageBinSlot()
628 case LockWord::kThinLocked: { in SetImageBinSlot()
630 bool thin = (lw.GetState() == LockWord::kThinLocked); in SetImageBinSlot()
640 case LockWord::kUnlocked: in SetImageBinSlot()
643 case LockWord::kHashCode: in SetImageBinSlot()
651 object->SetLockWord(LockWord::FromForwardingAddress(bin_slot.Uint32Value()), in SetImageBinSlot()
904 if (object->GetLockWord(false).GetState() != LockWord::kForwardingAddress) { in IsImageBinSlotAssigned()
907 LockWord lock_word = object->GetLockWord(false); in IsImageBinSlotAssigned()
922 LockWord lock_word = object->GetLockWord(false); in GetImageBinSlot()
[all …]
Dimage_writer.h252 static const size_t kBinShift = BitSizeOf<uint32_t>() - kBinBits - LockWord::kGCStateSize;
/art/dex2oat/linker/arm/
Drelative_patcher_thumb2_test.cc775 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldWide()
776 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldWide()
876 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldNarrow()
877 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldNarrow()
1161 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TEST_F()
1162 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TEST_F()
/art/runtime/jni/
Djni_env_ext.cc197 if ((o->GetLockWord(false).GetState() == LockWord::kThinLocked) && in ComputeMonitorDescription()
Djni_internal_test.cc2411 LockWord lock_word = soa.Decode<mirror::Object>(jobj)->GetLockWord(true); in IsLocked()
2413 case LockWord::kHashCode: in IsLocked()
2414 case LockWord::kUnlocked: in IsLocked()
2416 case LockWord::kThinLocked: in IsLocked()
2418 case LockWord::kFatLocked: in IsLocked()
/art/dex2oat/linker/arm64/
Drelative_patcher_arm64_test.cc1109 0x37000000u | (LockWord::kReadBarrierStateShift << 19) | /* ip0 */ 16; in TestBakerField()
1354 0x37000000u | (LockWord::kReadBarrierStateShift << 19) | /* ip0 */ 16; in TEST_F()

12