Home
last modified time | relevance | path

Searched refs:LockWord (Results 1 – 25 of 42) 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::kReadBarrierStateShift)
38 art::LockWord::kStateForwardingAddress)
40 art::LockWord::kStateForwardingAddressOverflow)
[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.cc234 LockWord lw(GetObject()->GetLockWord(false)); in Install()
236 case LockWord::kThinLocked: { in Install()
244 LockWord fat(this, lw.GCState()); in Install()
257 case LockWord::kHashCode: { in Install()
260 LockWord fat(this, lw.GCState()); in Install()
263 case LockWord::kFatLocked: { in Install()
267 case LockWord::kUnlocked: { in Install()
999 LockWord lw(obj->GetLockWord(false)); in Deflate()
1001 if (lw.GetState() == LockWord::kFatLocked) { in Deflate()
1016 LockWord new_lw = LockWord::FromHashCode(monitor->GetHashCode(), lw.GCState()); in Deflate()
[all …]
Dmonitor_test.cc78 LockWord lock_after = obj->GetLockWord(false); // it to thinLocked. in Run()
79 LockWord::LockState new_state = lock_after.GetState(); in Run()
82 if (LockWord::LockState::kThinLocked != new_state) { in Run()
84 ASSERT_EQ(LockWord::LockState::kThinLocked, new_state); // To fail the test. in Run()
90 LockWord lock_after2 = obj->GetLockWord(false); in Run()
91 LockWord::LockState new_state2 = lock_after2.GetState(); in Run()
94 if (LockWord::LockState::kFatLocked != new_state2) { in Run()
96 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
132 static bool IsValidLockWord(LockWord lock_word);
158 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
171 int error = posix_memalign(&result, LockWord::kMonitorIdAlignment, size); in new()
Dtransaction_test.cc75 LockWord old_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
85 LockWord new_lock_word = h_klass->GetLockWord(false); in testTransactionAbort()
86 EXPECT_TRUE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in testTransactionAbort()
125 LockWord old_lock_word = h_obj->GetLockWord(false); in TEST_F()
130 LockWord new_lock_word = h_obj->GetLockWord(false); in TEST_F()
134 LockWord aborted_lock_word = h_obj->GetLockWord(false); in TEST_F()
135 EXPECT_FALSE(LockWord::Equal<false>(old_lock_word, new_lock_word)); in TEST_F()
136 EXPECT_TRUE(LockWord::Equal<false>(aborted_lock_word, new_lock_word)); in TEST_F()
/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()
112 LockWord lw = GetLockWord(false); in GetReadBarrierState()
132 LockWord lw(GetFieldPrimitive<uint32_t, /*kIsVolatile=*/false>(MonitorOffset())); in GetReadBarrierState()
143 LockWord lw(GetFieldAcquire<uint32_t>(MonitorOffset())); in GetReadBarrierStateAcquire()
[all …]
Dobject.cc180 (expected_value & LockWord::kHashMask) == 0); in GenerateIdentityHashCode()
181 return expected_value & LockWord::kHashMask; in GenerateIdentityHashCode()
191 LockWord lw = current_this->GetLockWord(false); in IdentityHashCode()
193 case LockWord::kUnlocked: { in IdentityHashCode()
196 LockWord hash_word = LockWord::FromHashCode(GenerateIdentityHashCode(), lw.GCState()); in IdentityHashCode()
197 DCHECK_EQ(hash_word.GetState(), LockWord::kHashCode); in IdentityHashCode()
205 case LockWord::kThinLocked: { in IdentityHashCode()
216 case LockWord::kFatLocked: { in IdentityHashCode()
222 case LockWord::kHashCode: { in IdentityHashCode()
Dobject.h37 class LockWord; variable
152 LockWord GetLockWord(bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
154 void SetLockWord(LockWord new_val, bool as_volatile) REQUIRES_SHARED(Locks::mutator_lock_);
155 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.h228 LockWord lw = from_ref->GetLockWord(false); in GetFwdPtrUnchecked()
229 if (lw.GetState() == LockWord::kForwardingAddress) { in GetFwdPtrUnchecked()
Dconcurrent_copying.cc3527 sizeof(LockWord), in Copy()
3538 LockWord old_lock_word = from_ref->GetLockWord(false); in Copy()
3540 if (old_lock_word.GetState() == LockWord::kForwardingAddress) { in Copy()
3569 CHECK_NE(to_ref->GetLockWord(false).GetState(), LockWord::kForwardingAddress); in Copy()
3580 LockWord new_lock_word = LockWord::FromForwardingAddress(reinterpret_cast<size_t>(to_ref)); in Copy()
3617 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/compiler/jni/
Djni_compiler_test.cc349 static LockWord GetLockWord(jobject obj);
440 LockWord JniCompilerTest::GetLockWord(jobject obj) { in GetLockWord()
873 LockWord lock_word = GetLockWord(jobj_); in CompileAndRun_fooJJ_synchronizedImpl()
874 ASSERT_EQ(lock_word.GetState(), LockWord::kThinLocked); in CompileAndRun_fooJJ_synchronizedImpl()
880 ASSERT_EQ(lock_word.GetState(), LockWord::kThinLocked); in CompileAndRun_fooJJ_synchronizedImpl()
884 ASSERT_EQ(lock_word.GetState(), LockWord::kUnlocked); in CompileAndRun_fooJJ_synchronizedImpl()
887 constexpr uint32_t kMaxThinLockRecursiveLocks = 1u << LockWord::kThinLockCountSize; in CompileAndRun_fooJJ_synchronizedImpl()
891 ASSERT_EQ(lock_word.GetState(), LockWord::kThinLocked); in CompileAndRun_fooJJ_synchronizedImpl()
898 ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked); in CompileAndRun_fooJJ_synchronizedImpl()
905 ASSERT_EQ(lock_word.GetState(), LockWord::kFatLocked); in CompileAndRun_fooJJ_synchronizedImpl()
[all …]
/art/dex2oat/linker/
Dimage_writer.cc452 LockWord lw(object->GetLockWord(false)); in SetImageBinSlot()
454 case LockWord::kFatLocked: in SetImageBinSlot()
456 case LockWord::kThinLocked: { in SetImageBinSlot()
458 bool thin = (lw.GetState() == LockWord::kThinLocked); in SetImageBinSlot()
468 case LockWord::kUnlocked: in SetImageBinSlot()
471 case LockWord::kHashCode: in SetImageBinSlot()
479 object->SetLockWord(LockWord::FromForwardingAddress(bin_slot.Uint32Value()), in SetImageBinSlot()
630 if (object->GetLockWord(false).GetState() != LockWord::kForwardingAddress) { in IsImageBinSlotAssigned()
633 LockWord lock_word = object->GetLockWord(false); in IsImageBinSlotAssigned()
648 LockWord lock_word = object->GetLockWord(false); in GetImageBinSlot()
[all …]
/art/dex2oat/linker/arm/
Drelative_patcher_thumb2_test.cc776 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldWide()
777 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldWide()
877 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TestBakerFieldNarrow()
878 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TestBakerFieldNarrow()
1166 DCHECK_GE(LockWord::kReadBarrierStateShift, 8u); // ROR modified immediate. in TEST_F()
1167 uint32_t ror_shift = 7 + (32 - LockWord::kReadBarrierStateShift); in TEST_F()
/art/runtime/jni/
Djni_env_ext.cc196 if ((o->GetLockWord(false).GetState() == LockWord::kThinLocked) && in ComputeMonitorDescription()
Djni_internal_test.cc2528 LockWord lock_word = soa.Decode<mirror::Object>(jobj)->GetLockWord(true); in IsLocked()
2530 case LockWord::kHashCode: in IsLocked()
2531 case LockWord::kUnlocked: in IsLocked()
2533 case LockWord::kThinLocked: in IsLocked()
2535 case LockWord::kFatLocked: in IsLocked()
/art/compiler/utils/x86/
Djni_macro_assembler_x86.cc580 static_assert(LockWord::kMarkBitStateSize == 1u); in TestMarkBit()
582 Immediate(LockWord::kMarkBitStateMaskShifted)); in TestMarkBit()
/art/compiler/utils/arm64/
Djni_macro_assembler_arm64.cc848 static_assert(LockWord::kMarkBitStateSize == 1u); in TestMarkBit()
851 ___ Tbz(scratch, LockWord::kMarkBitStateShift, Arm64JNIMacroLabel::Cast(label)->AsArm64()); in TestMarkBit()
854 ___ Tbnz(scratch, LockWord::kMarkBitStateShift, Arm64JNIMacroLabel::Cast(label)->AsArm64()); in TestMarkBit()
/art/compiler/utils/x86_64/
Djni_macro_assembler_x86_64.cc649 static_assert(LockWord::kMarkBitStateSize == 1u); in TestMarkBit()
651 Immediate(LockWord::kMarkBitStateMaskShifted)); in TestMarkBit()

12