/art/runtime/gc/accounting/ |
D | bitmap-inl.h | 33 inline bool Bitmap::AtomicTestAndSetBit(uintptr_t bit_index) { in AtomicTestAndSetBit() 36 const uintptr_t word_mask = BitIndexToMask(bit_index); in AtomicTestAndSetBit() 37 auto* atomic_entry = reinterpret_cast<Atomic<uintptr_t>*>(&bitmap_begin_[word_index]); in AtomicTestAndSetBit() 38 uintptr_t old_word; in AtomicTestAndSetBit() 51 inline bool Bitmap::TestBit(uintptr_t bit_index) const { in TestBit() 57 inline void Bitmap::VisitSetBits(uintptr_t bit_start, uintptr_t bit_end, const Visitor& visitor) in VisitSetBits() 61 const uintptr_t index_start = BitIndexToWordIndex(bit_start); in VisitSetBits() 62 const uintptr_t index_end = BitIndexToWordIndex(bit_end); in VisitSetBits() 75 uintptr_t left_edge = bitmap_begin_[index_start]; in VisitSetBits() 77 left_edge &= ~((static_cast<uintptr_t>(1) << (bit_start % kBitsPerBitmapWord)) - 1); in VisitSetBits() [all …]
|
D | space_bitmap-inl.h | 35 uintptr_t addr = reinterpret_cast<uintptr_t>(obj); in AtomicTestAndSet() 37 const uintptr_t offset = addr - heap_begin_; in AtomicTestAndSet() 39 const uintptr_t mask = OffsetToMask(offset); in AtomicTestAndSet() 40 Atomic<uintptr_t>* atomic_entry = &bitmap_begin_[index]; in AtomicTestAndSet() 42 uintptr_t old_word; in AtomicTestAndSet() 57 uintptr_t addr = reinterpret_cast<uintptr_t>(obj); in Test() 61 const uintptr_t offset = addr - heap_begin_; in Test() 68 inline void SpaceBitmap<kAlignment>::VisitMarkedRange(uintptr_t visit_begin, in VisitMarkedRange() 69 uintptr_t visit_end, in VisitMarkedRange() 73 for (uintptr_t i = visit_begin; i < visit_end; i += kAlignment) { in VisitMarkedRange() [all …]
|
D | bitmap.h | 47 static ALWAYS_INLINE constexpr size_t BitIndexToWordIndex(uintptr_t offset) { in BitIndexToWordIndex() 56 static ALWAYS_INLINE constexpr uintptr_t BitIndexToMask(uintptr_t bit_index) { in BitIndexToMask() 57 return static_cast<uintptr_t>(1) << (bit_index % kBitsPerBitmapWord); in BitIndexToMask() 79 void VisitSetBits(uintptr_t visit_begin, size_t visit_end, const Visitor& visitor) const; 84 uintptr_t* Begin() { in Begin() 101 static constexpr size_t kBitsPerBitmapWord = sizeof(uintptr_t) * kBitsPerByte; 110 ALWAYS_INLINE bool ModifyBit(uintptr_t bit_index); 116 uintptr_t* const bitmap_begin_; 130 const std::string& name, uintptr_t cover_begin, uintptr_t cover_end); 132 MemMap&& mem_map, uintptr_t cover_begin, size_t num_bits); [all …]
|
D | card_table-inl.h | 39 const size_t shift_in_bytes = reinterpret_cast<uintptr_t>(address) % sizeof(uintptr_t); in byte_cas() 43 Atomic<uintptr_t>* word_atomic = reinterpret_cast<Atomic<uintptr_t>*>(address); in byte_cas() 46 const uintptr_t cur_word = word_atomic->load(std::memory_order_relaxed) & in byte_cas() 47 ~(static_cast<uintptr_t>(0xFF) << shift_in_bits); in byte_cas() 48 const uintptr_t old_word = cur_word | (static_cast<uintptr_t>(old_value) << shift_in_bits); in byte_cas() 49 const uintptr_t new_word = cur_word | (static_cast<uintptr_t>(new_value) << shift_in_bits); in byte_cas() 73 uintptr_t start = reinterpret_cast<uintptr_t>(AddrFromCard(card_cur)); in Scan() 81 (reinterpret_cast<uintptr_t>(card_end) & (sizeof(uintptr_t) - 1)); in Scan() 83 uintptr_t* word_end = reinterpret_cast<uintptr_t*>(aligned_end); in Scan() 84 for (uintptr_t* word_cur = reinterpret_cast<uintptr_t*>(card_cur); word_cur < word_end; in Scan() [all …]
|
D | space_bitmap.h | 81 ALWAYS_INLINE static constexpr uintptr_t OffsetBitIndex(uintptr_t offset) { in OffsetBitIndex() 87 static constexpr uintptr_t OffsetToMask(uintptr_t offset) { in OffsetToMask() 122 const uintptr_t offset = reinterpret_cast<uintptr_t>(obj) - heap_begin_; in HasAddress() 128 void VisitRange(uintptr_t visit_begin, uintptr_t visit_end, const Visitor& visitor) const { in VisitRange() 138 void VisitMarkedRange(uintptr_t visit_begin, uintptr_t visit_end, Visitor&& visitor) const 156 static void SweepWalk(const SpaceBitmap& live, const SpaceBitmap& mark, uintptr_t base, 157 uintptr_t max, SweepCallback* thunk, void* arg); 162 Atomic<uintptr_t>* Begin() { in Begin() 183 uintptr_t HeapBegin() const { in HeapBegin() 193 void SetHeapLimit(uintptr_t new_end); [all …]
|
D | space_bitmap.cc | 54 uintptr_t* bitmap_begin = reinterpret_cast<uintptr_t*>(mem_map.Begin()); in CreateFromMemMap() 62 uintptr_t* bitmap_begin, in SpaceBitmap() 67 bitmap_begin_(reinterpret_cast<Atomic<uintptr_t>*>(bitmap_begin)), in SpaceBitmap() 69 heap_begin_(reinterpret_cast<uintptr_t>(heap_begin)), in SpaceBitmap() 70 heap_limit_(reinterpret_cast<uintptr_t>(heap_begin) + heap_capacity), in SpaceBitmap() 99 void SpaceBitmap<kAlignment>::SetHeapLimit(uintptr_t new_end) { in SetHeapLimit() 125 uintptr_t begin_offset = reinterpret_cast<uintptr_t>(begin) - heap_begin_; in ClearRange() 126 uintptr_t end_offset = reinterpret_cast<uintptr_t>(end) - heap_begin_; in ClearRange() 137 const uintptr_t start_index = OffsetToIndex(begin_offset); in ClearRange() 138 const uintptr_t end_index = OffsetToIndex(end_offset); in ClearRange() [all …]
|
D | card_table.cc | 83 uint8_t* biased_begin = reinterpret_cast<uint8_t*>(reinterpret_cast<uintptr_t>(cardtable_begin) - in Create() 84 (reinterpret_cast<uintptr_t>(heap_begin) >> kCardShift)); in Create() 85 uintptr_t biased_byte = reinterpret_cast<uintptr_t>(biased_begin) & 0xff; in Create() 91 CHECK_EQ(reinterpret_cast<uintptr_t>(biased_begin) & 0xff, kCardDirty); in Create() 109 CHECK_ALIGNED(reinterpret_cast<uintptr_t>(start), kCardSize); in ClearCardRange() 110 CHECK_ALIGNED(reinterpret_cast<uintptr_t>(end), kCardSize); in ClearCardRange() 118 return IsValidCard(biased_begin_ + ((uintptr_t)addr >> kCardShift)); in AddrIsInCardTable() 122 uint8_t* card_addr = biased_begin_ + ((uintptr_t)addr >> kCardShift); in CheckAddrIsInCardTable()
|
D | space_bitmap_test.cc | 52 EXPECT_EQ(bitmap_->Test(obj), ((reinterpret_cast<uintptr_t>(obj) & 0xF) != 0)); in operator ()() 72 if (reinterpret_cast<uintptr_t>(obj) & 0xF) { in TEST_F() 105 std::vector<std::pair<uintptr_t, uintptr_t>> ranges = { in TEST_F() 113 for (const std::pair<uintptr_t, uintptr_t>& range : ranges) { in TEST_F() 118 for (uintptr_t i = 0; i < range.first; i += kObjectAlignment) { in TEST_F() 121 for (uintptr_t i = range.second; i < range.second + kPageSize; i += kObjectAlignment) { in TEST_F() 125 for (uintptr_t i = range.first; i < range.second; i += kObjectAlignment) { in TEST_F() 185 for (uintptr_t k = offset; k < end; k += kAlignment) { in RunTest() 191 uintptr_t range_begin = reinterpret_cast<uintptr_t>(heap_begin) + offset; in RunTest() 192 uintptr_t range_end = reinterpret_cast<uintptr_t>(heap_begin) + end; in RunTest() [all …]
|
/art/libartbase/base/ |
D | bit_field.h | 26 static constexpr uintptr_t kUintPtrTOne = 1U; 37 static_assert(position < sizeof(uintptr_t) * kBitsPerByte, "Invalid position."); 39 static_assert(size <= sizeof(uintptr_t) * kBitsPerByte, "Invalid size."); 40 static_assert(size + position <= sizeof(uintptr_t) * kBitsPerByte, "Invalid position + size."); 44 return (static_cast<uintptr_t>(value) & ~((kUintPtrTOne << size) - 1)) == 0; in IsValid() 48 static uintptr_t Mask() { in Mask() 54 static uintptr_t MaskInPlace() { in MaskInPlace() 70 static uintptr_t Encode(T value) { in Encode() 72 return static_cast<uintptr_t>(value) << position; in Encode() 76 static T Decode(uintptr_t value) { in Decode() [all …]
|
D | memory_region.h | 46 MemoryRegion(void* pointer_in, uintptr_t size_in) : pointer_(pointer_in), size_(size_in) {} in MemoryRegion() 62 ALWAYS_INLINE T Load(uintptr_t offset) const { in Load() 72 ALWAYS_INLINE void Store(uintptr_t offset, T value) const { in Store() 81 ALWAYS_INLINE T LoadUnaligned(uintptr_t offset) const { in LoadUnaligned() 96 ALWAYS_INLINE void StoreUnaligned(uintptr_t offset, T value) const { in StoreUnaligned() 108 ALWAYS_INLINE T* PointerTo(uintptr_t offset) const { in PointerTo() 122 ALWAYS_INLINE MemoryRegion Subregion(uintptr_t offset, uintptr_t size_in) const { in Subregion() 129 ALWAYS_INLINE void Extend(const MemoryRegion& region, uintptr_t extra) { in Extend() 144 ALWAYS_INLINE uint8_t* ComputeBitPointer(uintptr_t bit_offset, uint8_t* bit_mask) const { in ComputeBitPointer() 145 uintptr_t bit_remainder = (bit_offset & (kBitsPerByte - 1)); in ComputeBitPointer() [all …]
|
/art/runtime/gc/collector/ |
D | immune_spaces.cc | 37 uintptr_t best_begin = 0u; in CreateLargestImmuneRegion() 38 uintptr_t best_end = 0u; in CreateLargestImmuneRegion() 39 uintptr_t best_heap_size = 0u; in CreateLargestImmuneRegion() 40 uintptr_t cur_begin = 0u; in CreateLargestImmuneRegion() 41 uintptr_t cur_end = 0u; in CreateLargestImmuneRegion() 42 uintptr_t cur_heap_size = 0u; in CreateLargestImmuneRegion() 43 using Interval = std::tuple</*start*/uintptr_t, /*end*/uintptr_t, /*is_heap*/bool>; in CreateLargestImmuneRegion() 46 uintptr_t space_begin = reinterpret_cast<uintptr_t>(space->Begin()); in CreateLargestImmuneRegion() 47 uintptr_t space_end = reinterpret_cast<uintptr_t>(space->Limit()); in CreateLargestImmuneRegion() 53 space_end = RoundUp(reinterpret_cast<uintptr_t>(image_space->GetImageEnd()), kPageSize); in CreateLargestImmuneRegion() [all …]
|
D | immune_region.h | 47 return reinterpret_cast<uintptr_t>(obj) - reinterpret_cast<uintptr_t>(begin_) < size_; in ContainsObject() 74 size_ = reinterpret_cast<uintptr_t>(end_) - reinterpret_cast<uintptr_t>(begin_); in UpdateSize() 79 uintptr_t size_;
|
/art/runtime/arch/ |
D | context.h | 41 static uintptr_t* CalleeSaveAddress(uint8_t* frame, int num, size_t frame_size) { in CalleeSaveAddress() 47 return reinterpret_cast<uintptr_t*>(save_addr); in CalleeSaveAddress() 55 virtual void SetSP(uintptr_t new_sp) = 0; 58 virtual void SetPC(uintptr_t new_pc) = 0; 61 virtual void SetArg0(uintptr_t new_arg0_value) = 0; 67 virtual uintptr_t* GetGPRAddress(uint32_t reg) = 0; 71 virtual uintptr_t GetGPR(uint32_t reg) = 0; 75 virtual void SetGPR(uint32_t reg, uintptr_t value) = 0; 82 virtual uintptr_t GetFPR(uint32_t reg) = 0; 86 virtual void SetFPR(uint32_t reg, uintptr_t value) = 0; [all …]
|
/art/runtime/arch/x86/ |
D | fault_handler_x86.cc | 282 uintptr_t* out_return_pc, in GetMethodAndReturnPcAndSp() 283 uintptr_t* out_sp, in GetMethodAndReturnPcAndSp() 286 *out_sp = static_cast<uintptr_t>(uc->CTX_ESP); in GetMethodAndReturnPcAndSp() 294 uintptr_t* fault_addr = reinterpret_cast<uintptr_t*>(siginfo->si_addr); in GetMethodAndReturnPcAndSp() 295 uintptr_t* overflow_addr = reinterpret_cast<uintptr_t*>( in GetMethodAndReturnPcAndSp() 325 *out_return_pc = reinterpret_cast<uintptr_t>(pc + instr_size); in GetMethodAndReturnPcAndSp() 348 uintptr_t retaddr = reinterpret_cast<uintptr_t>(pc + instr_size); in Action() 349 uintptr_t* next_sp = reinterpret_cast<uintptr_t*>(sp - 2 * sizeof(uintptr_t)); in Action() 351 next_sp[0] = reinterpret_cast<uintptr_t>(sig->si_addr); in Action() 352 uc->CTX_ESP = reinterpret_cast<uintptr_t>(next_sp); in Action() [all …]
|
D | context_x86.h | 40 void SetSP(uintptr_t new_sp) override { in SetSP() 44 void SetPC(uintptr_t new_pc) override { in SetPC() 48 void SetArg0(uintptr_t new_arg0_value) override { in SetArg0() 57 uintptr_t* GetGPRAddress(uint32_t reg) override { in GetGPRAddress() 62 uintptr_t GetGPR(uint32_t reg) override { in GetGPR() 68 void SetGPR(uint32_t reg, uintptr_t value) override; 75 uintptr_t GetFPR(uint32_t reg) override { in GetFPR() 81 void SetFPR(uint32_t reg, uintptr_t value) override; 101 uintptr_t* gprs_[kNumberOfCpuRegisters]; 106 uintptr_t esp_, eip_, arg0_;
|
/art/runtime/arch/arm64/ |
D | fault_handler_arm64.cc | 44 uintptr_t* out_return_pc, in GetMethodAndReturnPcAndSp() 45 uintptr_t* out_sp, in GetMethodAndReturnPcAndSp() 49 *out_sp = static_cast<uintptr_t>(sc->sp); in GetMethodAndReturnPcAndSp() 57 uintptr_t* fault_addr = reinterpret_cast<uintptr_t*>(sc->fault_address); in GetMethodAndReturnPcAndSp() 58 uintptr_t* overflow_addr = reinterpret_cast<uintptr_t*>( in GetMethodAndReturnPcAndSp() 89 sc->sp -= sizeof(uintptr_t); in Action() 90 *reinterpret_cast<uintptr_t*>(sc->sp) = sc->pc + 4; in Action() 91 sc->regs[30] = reinterpret_cast<uintptr_t>(info->si_addr); in Action() 93 sc->pc = reinterpret_cast<uintptr_t>(art_quick_throw_null_pointer_exception_from_signal); in Action() 148 sc->pc = reinterpret_cast<uintptr_t>(art_quick_implicit_suspend); in Action() [all …]
|
D | context_arm64.h | 41 void SetSP(uintptr_t new_sp) override { in SetSP() 45 void SetPC(uintptr_t new_lr) override { in SetPC() 49 void SetArg0(uintptr_t new_arg0_value) override { in SetArg0() 58 uintptr_t* GetGPRAddress(uint32_t reg) override { in GetGPRAddress() 63 uintptr_t GetGPR(uint32_t reg) override { in GetGPR() 70 void SetGPR(uint32_t reg, uintptr_t value) override; 77 uintptr_t GetFPR(uint32_t reg) override { in GetFPR() 83 void SetFPR(uint32_t reg, uintptr_t value) override; 93 uintptr_t* gprs_[kNumberOfXRegisters + 1]; 96 uintptr_t sp_, pc_, arg0_;
|
/art/runtime/arch/x86_64/ |
D | context_x86_64.h | 40 void SetSP(uintptr_t new_sp) override { in SetSP() 44 void SetPC(uintptr_t new_pc) override { in SetPC() 48 void SetNterpDexPC(uintptr_t dex_pc_ptr) override { in SetNterpDexPC() 52 void SetArg0(uintptr_t new_arg0_value) override { in SetArg0() 61 uintptr_t* GetGPRAddress(uint32_t reg) override { in GetGPRAddress() 66 uintptr_t GetGPR(uint32_t reg) override { in GetGPR() 72 void SetGPR(uint32_t reg, uintptr_t value) override; 79 uintptr_t GetFPR(uint32_t reg) override { in GetFPR() 85 void SetFPR(uint32_t reg, uintptr_t value) override; 92 uintptr_t* gprs_[kNumberOfCpuRegisters]; [all …]
|
D | context_x86_64.cc | 26 static constexpr uintptr_t gZero = 0; 66 gprs_[RAX] = const_cast<uintptr_t*>(&gZero); in SmashCallerSaves() 67 gprs_[RDX] = const_cast<uintptr_t*>(&gZero); in SmashCallerSaves() 89 void X86_64Context::SetGPR(uint32_t reg, uintptr_t value) { in SetGPR() 96 void X86_64Context::SetFPR(uint32_t reg, uintptr_t value) { in SetFPR() 103 extern "C" NO_RETURN void art_quick_do_long_jump(uintptr_t*, uintptr_t*); 107 uintptr_t gprs[kNumberOfCpuRegisters + 1]; in DoLongJump() 108 uintptr_t fprs[kNumberOfFloatRegisters]; in DoLongJump() 118 uintptr_t rsp = gprs[kNumberOfCpuRegisters - RSP - 1] - sizeof(intptr_t); in DoLongJump() 120 *(reinterpret_cast<uintptr_t*>(rsp)) = rip_; in DoLongJump()
|
/art/runtime/arch/arm/ |
D | fault_handler_arm.cc | 51 uintptr_t* out_return_pc, in GetMethodAndReturnPcAndSp() 52 uintptr_t* out_sp, in GetMethodAndReturnPcAndSp() 56 *out_sp = static_cast<uintptr_t>(sc->arm_sp); in GetMethodAndReturnPcAndSp() 64 uintptr_t* fault_addr = reinterpret_cast<uintptr_t*>(sc->fault_address); in GetMethodAndReturnPcAndSp() 65 uintptr_t* overflow_addr = reinterpret_cast<uintptr_t*>( in GetMethodAndReturnPcAndSp() 72 *out_method = reinterpret_cast<ArtMethod*>(reinterpret_cast<uintptr_t*>(*out_sp)[0]); in GetMethodAndReturnPcAndSp() 111 uintptr_t gc_map_location = (sc->arm_pc + instr_size) | 1; in Action() 114 sc->arm_sp -= sizeof(uintptr_t); in Action() 115 *reinterpret_cast<uintptr_t*>(sc->arm_sp) = gc_map_location; in Action() 116 sc->arm_lr = reinterpret_cast<uintptr_t>(info->si_addr); in Action() [all …]
|
D | context_arm.h | 41 void SetSP(uintptr_t new_sp) override { in SetSP() 45 void SetPC(uintptr_t new_pc) override { in SetPC() 49 void SetArg0(uintptr_t new_arg0_value) override { in SetArg0() 58 uintptr_t* GetGPRAddress(uint32_t reg) override { in GetGPRAddress() 63 uintptr_t GetGPR(uint32_t reg) override { in GetGPR() 69 void SetGPR(uint32_t reg, uintptr_t value) override; 76 uintptr_t GetFPR(uint32_t reg) override { in GetFPR() 82 void SetFPR(uint32_t reg, uintptr_t value) override; 89 uintptr_t* gprs_[kNumberOfCoreRegisters]; 92 uintptr_t sp_, pc_, arg0_;
|
/art/runtime/ |
D | oat_quick_method_header.h | 46 uintptr_t code = reinterpret_cast<uintptr_t>(code_ptr); in FromCodePointer() 47 uintptr_t header = code - OFFSETOF_MEMBER(OatQuickMethodHeader, code_); in FromCodePointer() 65 uintptr_t NativeQuickPcOffset(const uintptr_t pc) const { in NativeQuickPcOffset() 66 return pc - reinterpret_cast<uintptr_t>(GetEntryPoint()); in NativeQuickPcOffset() 116 bool Contains(uintptr_t pc) const { in Contains() 118 uintptr_t code_start = reinterpret_cast<uintptr_t>(HWASanUntag(code_)); in Contains() 134 ? reinterpret_cast<uint8_t*>(reinterpret_cast<uintptr_t>(code_) | 1) in GetEntryPoint() 152 uintptr_t ToNativeQuickPc(ArtMethod* method, 158 const uintptr_t pc,
|
D | monitor-inl.h | 43 uintptr_t Monitor::LockOwnerInfoChecksum(ArtMethod* m, uint32_t dex_pc, Thread* t) { in LockOwnerInfoChecksum() 44 uintptr_t dpc_and_thread = static_cast<uintptr_t>(dex_pc << 8) ^ reinterpret_cast<uintptr_t>(t); in LockOwnerInfoChecksum() 45 return reinterpret_cast<uintptr_t>(m) ^ dpc_and_thread in LockOwnerInfoChecksum() 53 uintptr_t sum = LockOwnerInfoChecksum(method, dex_pc, t); in SetLockOwnerInfo() 62 uintptr_t owners_sum; in GetLockOwnerInfo()
|
D | nterp_helpers.cc | 118 uintptr_t NterpGetRegistersArray(ArtMethod** frame) { in NterpGetRegistersArray() 125 uintptr_t NterpGetReferenceArray(ArtMethod** frame) { in NterpGetReferenceArray() 129 return reinterpret_cast<uintptr_t>(frame) + in NterpGetReferenceArray() 139 uintptr_t dex_pc_ptr = reinterpret_cast<uintptr_t>(frame) + in NterpGetDexPC() 154 uintptr_t NterpGetCatchHandler() { in NterpGetCatchHandler() 157 return reinterpret_cast<uintptr_t>(artNterpAsmInstructionEnd); in NterpGetCatchHandler()
|
/art/dex2oat/linker/ |
D | elf_writer.cc | 25 uintptr_t ElfWriter::GetOatDataAddress(ElfFile* elf_file) { in GetOatDataAddress() 26 uintptr_t oatdata_address = elf_file->FindSymbolAddress(SHT_DYNSYM, in GetOatDataAddress() 51 bool ElfWriter::Fixup(File* file, uintptr_t oat_data_begin) { in Fixup() 57 uintptr_t oatdata_address = ElfWriter::GetOatDataAddress(elf_file.get()); in Fixup() 58 uintptr_t base_address = oat_data_begin - oatdata_address; in Fixup()
|