Home
last modified time | relevance | path

Searched refs:region (Results 1 – 25 of 98) sorted by relevance

1234

/arkcompiler/runtime_core/static_core/runtime/mem/
Dregion_space-inl.h25 explicit RegionAllocCheck(Region *region) : region_(region) in RegionAllocCheck() argument
42 explicit RegionIterateCheck(Region *region) : region_(region) in RegionIterateCheck() argument
114 void RegionPool::FreeRegion(Region *region) in FreeRegion() argument
117 if (block_.IsAddrInRange(region)) { in FreeRegion()
118 region->IsYoung() ? spaces_->ReduceYoungOccupiedInSharedPool(region->Size()) in FreeRegion()
119 : spaces_->ReduceTenuredOccupiedInSharedPool(region->Size()); in FreeRegion()
120 block_.FreeRegion(region, releasePages); in FreeRegion()
122 region->IsYoung() ? spaces_->FreeYoungPool(region, region->Size(), releasePages) in FreeRegion()
123 : spaces_->FreeTenuredPool(region, region->Size(), releasePages); in FreeRegion()
128 void RegionSpace::FreeRegion(Region *region) in FreeRegion() argument
[all …]
Dregion_space.cpp194 auto *region = RegionAt(i); in AllocRegion() local
195 occupied_[i] = region; in AllocRegion()
197 return region; in AllocRegion()
221 auto *region = RegionAt(left); in AllocLargeRegion() local
223 occupied_[left + i] = region; in AllocLargeRegion()
226 return region; in AllocLargeRegion()
234 void RegionBlock::FreeRegion(Region *region, bool releasePages) in FreeRegion() argument
237 size_t regionIdx = RegionIndex(region); in FreeRegion()
238 size_t regionNum = region->Size() / regionSize_; in FreeRegion()
241 ASSERT(occupied_[regionIdx + i] == region); in FreeRegion()
[all …]
Dregion_allocator-inl.h80 Region *region = AllocRegion<OS_ALLOC_POLICY>(regionSize, regionType, properties); in CreateAndSetUpNewRegion() local
81 if (LIKELY(region != nullptr)) { in CreateAndSetUpNewRegion()
83 AllocConfigT::OnInitYoungRegion({region->Begin(), region->End()}); in CreateAndSetUpNewRegion()
100 TSAN_ANNOTATE_HAPPENS_BEFORE(region); in CreateAndSetUpNewRegion()
102 return region; in CreateAndSetUpNewRegion()
110 GetSpace()->IterateRegions([&](Region *region) { vector.push_back(region); }); in GetAllRegions()
154 … Region *region = this->template CreateAndSetUpNewRegion<AllocConfigT>(REGION_SIZE, REGION_TYPE); in AllocRegular() local
155 if (LIKELY(region != nullptr)) { in AllocRegular()
158 mem = region->template Alloc<IS_ATOMIC>(alignSize); in AllocRegular()
159 SetCurrentRegion<IS_ATOMIC, REGION_TYPE>(region); in AllocRegular()
[all …]
Drem_set-inl.h110 auto *region = AddrToRegion(ToVoidPtr(bitmap_begin_addr)); in Iterate() local
111 if (regionPred(region)) { in Iterate()
113 … bitmap.Iterate(bitmapRange, [region, visitor](const MemRange &range) { visitor(region, range); }); in Iterate()
122 auto regionPred = []([[maybe_unused]] Region *region) { return true; }; in IterateOverObjects()
123 Iterate(regionPred, [visitor](Region *region, const MemRange &range) { in IterateOverObjects()
124 region->GetLiveBitmap()->IterateOverMarkedChunkInRange( in IterateOverObjects()
140 void RemSet<LockConfigT>::AddRefRegion(Region *region) in AddRefRegion() argument
143 refRegions_.insert(region); in AddRefRegion()
148 void RemSet<LockConfigT>::RemoveFromRegion(Region *region) in RemoveFromRegion() argument
151 for (auto bitmapBeginAddr = ToUintPtr(region); bitmapBeginAddr < region->End(); in RemoveFromRegion()
[all …]
Dregion_allocator.h41 auto *region = reinterpret_cast<Region *>(((ToUintPtr(object)) & ~DEFAULT_REGION_MASK)); in ObjectToRegion() local
42 …RT(ToUintPtr(PoolManager::GetMmapMemPool()->GetStartAddrPoolForAddr(object)) == ToUintPtr(region)); in ObjectToRegion()
48 TSAN_ANNOTATE_HAPPENS_AFTER(region); in ObjectToRegion()
49 return region; in ObjectToRegion()
214 … this->GetSpace()->IterateRegions([&](Region *region) { region->IterateOverObjects(visitor); }); in IterateOverObjects()
225 this->GetSpace()->IterateRegions([&](Region *region) { in IterateOverObjectsInRange()
226 if (region->Intersect(ToUintPtr(begin), ToUintPtr(end))) { in IterateOverObjectsInRange()
227 region->IterateOverObjects(objVisitor); in IterateOverObjectsInRange()
294 void PromoteYoungRegion(Region *region, const GCObjectVisitor &deathChecker,
371 void SetCurrentRegion(Region *region) in SetCurrentRegion() argument
[all …]
Dregion_space.h402 inline std::ostream &DumpRegionRange(std::ostream &out, const Region &region) in DumpRegionRange() argument
406 …out << std::hex << "[0x" << std::setw(POINTER_PRINT_WIDTH) << std::setfill('0') << region.Begin() … in DumpRegionRange()
407 << std::setw(POINTER_PRINT_WIDTH) << std::setfill('0') << region.End() << "]"; in DumpRegionRange()
412 inline std::ostream &operator<<(std::ostream &out, const Region &region)
414 if (region.HasFlag(RegionFlag::IS_LARGE_OBJECT)) {
416 } else if (region.HasFlag(RegionFlag::IS_NONMOVABLE)) {
418 } else if (region.HasFlag(RegionFlag::IS_OLD)) {
424 return DumpRegionRange(out, region);
468 void FreeRegion(Region *region, bool releasePages = true);
527 …Region *NewRegion(void *region, RegionSpace *space, size_t regionSize, RegionFlag edenOrOldOrNonmo…
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Dsparse_space.cpp37 Region *region = heapRegionAllocator_->AllocateAlignedRegion(this, DEFAULT_REGION_SIZE, in Initialize() local
39 region->InitializeFreeObjectSets(); in Initialize()
40 AddRegion(region); in Initialize()
42 allocator_->Initialize(region); in Initialize()
93 …Region *region = heapRegionAllocator_->AllocateAlignedRegion(this, DEFAULT_REGION_SIZE, heap_->Get… in Expand() local
94 region->InitializeFreeObjectSets(); in Expand()
95 AddRegion(region); in Expand()
96 allocator_->AddFree(region); in Expand()
165 Region *region = nullptr; in TryFillSweptRegion() local
166 while ((region = GetSweptRegionSafe()) != nullptr) { in TryFillSweptRegion()
[all …]
Dspace.cpp64 void Space::ClearAndFreeRegion(Region *region, size_t cachedSize) in ClearAndFreeRegion() argument
66 LOG_ECMA_MEM(DEBUG) << "Clear region from:" << region << " to " << ToSpaceTypeName(spaceType_); in ClearAndFreeRegion()
67 region->DeleteCrossRegionRSet(); in ClearAndFreeRegion()
68 region->DeleteOldToNewRSet(); in ClearAndFreeRegion()
69 region->DeleteSweepingRSet(); in ClearAndFreeRegion()
70 DecreaseCommitted(region->GetCapacity()); in ClearAndFreeRegion()
71 DecreaseObjectSize(region->GetSize()); in ClearAndFreeRegion()
75 region->DestroyFreeObjectSets(); in ClearAndFreeRegion()
77 heapRegionAllocator_->FreeRegion(region, cachedSize); in ClearAndFreeRegion()
108 Region *region = heapRegionAllocator_->AllocateAlignedRegion(this, alignedSize, thread); in Allocate() local
[all …]
Dparallel_evacuator.h78 …Workload(ParallelEvacuator *evacuator, Region *region) : evacuator_(evacuator), region_(region) {}; in Workload() argument
97 … EvacuateWorkload(ParallelEvacuator *evacuator, Region *region) : Workload(evacuator, region) {} in EvacuateWorkload() argument
104 … UpdateRSetWorkload(ParallelEvacuator *evacuator, Region *region) : Workload(evacuator, region) {} in UpdateRSetWorkload() argument
111 …ateNewRegionWorkload(ParallelEvacuator *evacuator, Region *region) : Workload(evacuator, region) {} in UpdateNewRegionWorkload() argument
118 UpdateAndSweepNewRegionWorkload(ParallelEvacuator *evacuator, Region *region) in UpdateAndSweepNewRegionWorkload() argument
119 : Workload(evacuator, region) {} in UpdateAndSweepNewRegionWorkload()
137 …void EvacuateRegion(TlabAllocator *allocator, Region *region, std::unordered_set<JSTaggedType> &tr…
139 inline void SetObjectRSet(ObjectSlot slot, Region *region);
141 inline bool IsWholeRegionEvacuate(Region *region);
149 void UpdateRSet(Region *region);
[all …]
Dspace-inl.h22 void Space::AddRegion(Region *region) in AddRegion() argument
24 LOG_ECMA_MEM(DEBUG) << "Add region:" << region << " to " << ToSpaceTypeName(spaceType_); in AddRegion()
25 regionList_.AddNode(region); in AddRegion()
26 IncreaseCommitted(region->GetCapacity()); in AddRegion()
27 IncreaseObjectSize(region->GetSize()); in AddRegion()
30 void Space::RemoveRegion(Region *region) in RemoveRegion() argument
32 LOG_ECMA_MEM(DEBUG) << "Remove region:" << region << " to " << ToSpaceTypeName(spaceType_); in RemoveRegion()
33 regionList_.RemoveNode(region); in RemoveRegion()
34 DecreaseCommitted(region->GetCapacity()); in RemoveRegion()
35 DecreaseObjectSize(region->GetSize()); in RemoveRegion()
Dlinear_space.cpp98 …Region *region = heapRegionAllocator_->AllocateAlignedRegion(this, DEFAULT_REGION_SIZE, heap_->Get… in Expand() local
99 allocator_.Reset(region->GetBegin(), region->GetEnd()); in Expand()
101 AddRegion(region); in Expand()
123 EnumerateRegions([&](Region *region) { in IterateOverObjects() argument
124 auto curPtr = region->GetBegin(); in IterateOverObjects()
126 if (region == current) { in IterateOverObjects()
128 endPtr = curPtr + region->GetAllocatedBytes(top); in IterateOverObjects()
130 endPtr = curPtr + region->GetAllocatedBytes(); in IterateOverObjects()
172 …Region *region = heapRegionAllocator_->AllocateAlignedRegion(this, DEFAULT_REGION_SIZE, heap_->Get… in Initialize() local
173 AddRegion(region); in Initialize()
[all …]
Dparallel_evacuator.cpp105 std::unique_ptr<Workload> region = GetWorkloadSafe(); in EvacuateSpace() local
107 while (region != nullptr) { in EvacuateSpace()
108 EvacuateRegion(allocator, region->GetRegion(), arrayTrackInfoSet); in EvacuateSpace()
109 region = GetWorkloadSafe(); in EvacuateSpace()
121 void ParallelEvacuator::EvacuateRegion(TlabAllocator *allocator, Region *region, in EvacuateRegion() argument
124 bool isInOldGen = region->InOldSpace(); in EvacuateRegion()
125 bool isBelowAgeMark = region->BelowAgeMark(); in EvacuateRegion()
128 if (!isBelowAgeMark && !isInOldGen && IsWholeRegionEvacuate(region)) { in EvacuateRegion()
129 if (heap_->MoveYoungRegionSync(region)) { in EvacuateRegion()
133 region->IterateAllMarkedBits([this, &region, &isInOldGen, &isBelowAgeMark, &pgoEnabled, in EvacuateRegion()
[all …]
Dheap_region_allocator.cpp67 Region *region = new (ToVoidPtr(mem)) Region(thread, mem, begin, end, flags); in AllocateAlignedRegion() local
69 return region; in AllocateAlignedRegion()
72 void HeapRegionAllocator::FreeRegion(Region *region, size_t cachedSize) in FreeRegion() argument
74 auto size = region->GetCapacity(); in FreeRegion()
75 bool isRegular = !region->InHugeObjectSpace() && !region->InHugeMachineCodeSpace(); in FreeRegion()
76 auto allocateBase = region->GetAllocateBase(); in FreeRegion()
79 region->Invalidate(); in FreeRegion()
80 region->ClearMembers(); in FreeRegion()
Dallocator-inl.h75 void FreeListAllocator::Initialize(Region *region) in Initialize() argument
77 bpAllocator_.Reset(region->GetBegin(), region->GetEnd()); in Initialize()
87 void FreeListAllocator::AddFree(Region *region) in AddFree() argument
89 auto begin = region->GetBegin(); in AddFree()
90 auto end = region->GetEnd(); in AddFree()
182 inline void FreeListAllocator::CollectFreeObjectSet(Region *region) in CollectFreeObjectSet() argument
184 region->EnumerateFreeObjectSets([&](FreeObjectSet *set) { in CollectFreeObjectSet()
190 freeList_->IncreaseWastedSize(region->GetWastedSize()); in CollectFreeObjectSet()
193 inline bool FreeListAllocator::MatchFreeObjectSet(Region *region, size_t size) in MatchFreeObjectSet() argument
196 region->REnumerateFreeObjectSets([&](FreeObjectSet *set) { in MatchFreeObjectSet()
[all …]
Dparallel_evacuator-inl.h28 bool ParallelEvacuator::IsWholeRegionEvacuate(Region *region) in IsWholeRegionEvacuate() argument
30 …return (static_cast<double>(region->AliveObject()) / region->GetSize()) > MIN_OBJECT_SURVIVAL_RATE… in IsWholeRegionEvacuate()
31 !region->HasAgeMark(); in IsWholeRegionEvacuate()
143 Region *region = Region::ObjectAddressToRange(object); in SetObjectFieldRSet() local
144 …auto callbackWithCSet = [this, region](TaggedObject *root, ObjectSlot start, ObjectSlot end, Visit… in SetObjectFieldRSet()
146 … if (VisitBodyInObj(root, start, end, [&](ObjectSlot slot) { SetObjectRSet(slot, region); })) { in SetObjectFieldRSet()
151 SetObjectRSet(slot, region); in SetObjectFieldRSet()
157 void ParallelEvacuator::SetObjectRSet(ObjectSlot slot, Region *region) in SetObjectRSet() argument
165 region->InsertOldToNewRSet(slot.SlotAddress()); in SetObjectRSet()
167 region->InsertCrossRegionRSet(slot.SlotAddress()); in SetObjectRSet()
[all …]
Dallocator.h91 inline void Initialize(Region *region);
96 inline void AddFree(Region *region);
101 inline bool MatchFreeObjectSet(Region *region, size_t size);
102 inline void CollectFreeObjectSet(Region *region);
103 inline void DetachFreeObjectSet(Region *region);
Dlinear_space.h84 bool SwapRegion(Region *region, SemiSpace *fromSpace);
119 auto cb = [](Region *region) { in SetReadOnly()
120 region->SetReadOnlyAndMarked(); in SetReadOnly()
127 auto cb = [](Region *region) { in ClearReadOnly()
128 region->ClearReadOnly(); in ClearReadOnly()
/arkcompiler/runtime_core/static_core/libpandabase/tests/
Dbit_memory_region_test.cpp98 BitMemoryRegion region(data.data(), 0U, data.size() * BITS_PER_UINT64); in TEST() local
99 ss << region; in TEST()
106 BitMemoryRegion region(data.data(), 0U, 130U); in TEST() local
107 ss << region; in TEST()
115 BitMemoryRegion region(data.data(), 1U, 65U); in TEST() local
116 ss << region; in TEST()
124 BitMemoryRegion region(data.data(), 0U, 129U); in TEST() local
125 ss << region; in TEST()
133 BitMemoryRegion region(data.data(), 40U, 40U); in TEST() local
134 ss << region; in TEST()
[all …]
/arkcompiler/runtime_core/libpandabase/tests/
Dbit_memory_region_test.cpp96 BitMemoryRegion region(data.data(), 0, data.size() * BITS_PER_UINT64); in TEST() local
97 ss << region; in TEST()
104 BitMemoryRegion region(data.data(), 0, 130); in TEST() local
105 ss << region; in TEST()
113 BitMemoryRegion region(data.data(), 1, 65); in TEST() local
114 ss << region; in TEST()
122 BitMemoryRegion region(data.data(), 0, 129); in TEST() local
123 ss << region; in TEST()
131 BitMemoryRegion region(data.data(), 40, 40); in TEST() local
132 ss << region; in TEST()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dgraph_linearizer.h286 GateInfo(GateRegion* region) : region(region) {} in GateInfo()
287 GateRegion* region {nullptr};
351 return info.region; in GateToRegion()
366 void AddFixedGateToRegion(GateRef gate, GateRegion* region) in AddFixedGateToRegion() argument
370 info.upperBound = region; in AddFixedGateToRegion()
371 ASSERT(info.region == nullptr); in AddFixedGateToRegion()
372 info.region = region; in AddFixedGateToRegion()
382 void AddRootGateToRegion(GateRef gate, GateRegion* region) in AddRootGateToRegion() argument
386 info.upperBound = region; in AddRootGateToRegion()
387 ASSERT(info.region == nullptr); in AddRootGateToRegion()
[all …]
Dgraph_linearizer.cpp62 auto region = linearizer_->FindPredRegion(state); in Run() local
63 linearizer_->AddFixedGateToRegion(fixedGate, region); in Run()
64 linearizer_->BindGate(fixedGate, region); in Run()
149 info.region = currentRegion_; in VisitStateGate()
378 for (auto region : *loopInfo.loopExits) { in PrintLoop()
379 auto current = region->state_; in PrintLoop()
394 GateRegion* curRegion = curState.region; in ComputeLoopInfo()
439 auto curRegion = curState.region; in ComputeLoopNumber()
472 auto curRegion = curState.region; in ComputeLoopTree()
540 size_t Push(GateRegion *region, size_t depth) in Push() argument
[all …]
/arkcompiler/runtime_core/static_core/runtime/mem/gc/g1/
Dcard_handler.cpp33 auto *region = AddrToRegion(startAddress); in Handle() local
34 ASSERT(region != nullptr); in Handle()
35 ASSERT(region->GetLiveBitmap() != nullptr); in Handle()
47 if (region->HasFlag(RegionFlag::IS_LARGE_OBJECT)) { in Handle()
48region->GetLiveBitmap()->CallForMarkedChunkInHumongousRegion<true>(ToVoidPtr(region->Begin()), vis… in Handle()
50region->GetLiveBitmap()->IterateOverMarkedChunkInRangeInterruptible<true>(startAddress, endAddress… in Handle()
Dg1-gc.cpp61 Region *region = ObjectToRegion(object); in CalcLiveBytesMarkPreprocess() local
63 region->AddLiveBytes<true>(objectSize); in CalcLiveBytesMarkPreprocess()
70 Region *region = ObjectToRegion(object); in CalcLiveBytesNotAtomicallyMarkPreprocess() local
72 region->AddLiveBytes<false>(objectSize); in CalcLiveBytesNotAtomicallyMarkPreprocess()
141 void G1GC<LanguageConfig>::DoRegionCompacting(Region *region, bool useGcWorkers, in DoRegionCompacting() argument
151 size_t moveSize = region->GetAllocatedBytes(); in DoRegionCompacting()
164 …internalAllocator->template New<GCRegionCompactWorkersTask::RegionDataType>(region, movedObjectSav… in DoRegionCompacting()
168 RegionCompactingImpl<true, REGION_TYPE>(region, movedObjectSaver); in DoRegionCompacting()
171 RegionCompactingImpl<false, REGION_TYPE>(region, movedObjectSaver); in DoRegionCompacting()
177 ScopedRegionCollectionInfo(const GC *gc, const char *title, const Region *region, bool isYoung, in ScopedRegionCollectionInfo() argument
[all …]
/arkcompiler/runtime_core/static_core/libpandabase/utils/
Dbit_memory_stream.h43 BitMemoryRegion region(data_->data(), offset_, length); in Write()
44 region.Write(value, 0, length); in Write()
55 BitMemoryRegion region(data_->data(), offset_, length); in Write()
59 region.Write(ptr[i], i * BITS_PER_WORD, BITS_PER_WORD); in Write()
64 region.Write(ptr[i], i * BITS_PER_WORD, payloadLength % BITS_PER_WORD); in Write()
/arkcompiler/runtime_core/libpandabase/utils/
Dbit_memory_stream.h43 BitMemoryRegion region(data_->data(), offset_, length); in Write()
44 region.Write(value, 0, length); in Write()
55 BitMemoryRegion region(data_->data(), offset_, length); in Write()
59 region.Write(ptr[i], i * bits_per_word, bits_per_word); in Write()
64 region.Write(ptr[i], i * bits_per_word, payload_length % bits_per_word); in Write()

1234