/arkcompiler/ets_runtime/ecmascript/mem/ |
H A D | space.cpp | 129 Region *HugeMachineCodeSpace::AllocateFort(size_t objectSize, JSThread *thread, void *pDesc) in AllocateFort() argument 150 objectSize + sizeof(Region) + HUGE_OBJECT_BITSET_SIZE - desc->instructionsSize, PageSize()); in AllocateFort() 169 uintptr_t HugeMachineCodeSpace::Allocate(size_t objectSize, JSThread *thread, void *pDesc, in Allocate() argument 189 region = AllocateFort(objectSize, thread, pDesc); in Allocate() 197 ASAN_UNPOISON_MEMORY_REGION(reinterpret_cast<void *>(region->GetBegin()), objectSize); in Allocate() 199 InvokeAllocationInspector(region->GetBegin(), objectSize); in Allocate() 204 uintptr_t HugeMachineCodeSpace::Allocate(size_t objectSize, JSThread *thread) in Allocate() argument 207 return HugeObjectSpace::Allocate(objectSize, thread); in Allocate() 210 uintptr_t HugeObjectSpace::Allocate(size_t objectSize, JSThread *thread, AllocateEventType allocType) in Allocate() argument 221 // In HugeObject allocation, we have a revervation of 8 bytes for markBitSet in objectSize in Allocate() 277 InvokeAllocationInspector(Address object, size_t objectSize) InvokeAllocationInspector() argument [all...] |
H A D | space.h | 300 uintptr_t Allocate(size_t objectSize, JSThread *thread, AllocateEventType allocType = AllocateEventType::NORMAL); 307 void InvokeAllocationInspector(Address object, size_t objectSize); 320 uintptr_t Allocate(size_t objectSize, JSThread *thread, void *desc, 322 uintptr_t Allocate(size_t objectSize, JSThread *thread); 323 Region *PUBLIC_API AllocateFort(size_t objectSize, JSThread *thread, void *desc);
|
H A D | allocation_inspector.cpp | 74 void AllocationCounter::InvokeAllocationInspector(Address object, size_t objectSize, size_t alignedObjectSize) 84 inspector_->Step(object, objectSize);
|
H A D | allocation_inspector.h | 56 void InvokeAllocationInspector(Address object, size_t objectSize, size_t alignedObjectSize);
|
H A D | heap.cpp | 2460 size_t objectSize = 0; in GetLiveObjectSize() local 2462 this->IterateOverObjects([&objectSize]([[maybe_unused]] TaggedObject *obj) { in GetLiveObjectSize() 2463 objectSize += obj->GetClass()->SizeFromJSHClass(obj); in GetLiveObjectSize() 2465 return objectSize; in GetLiveObjectSize()
|
/arkcompiler/runtime_core/static_core/runtime/mem/ |
H A D | tlab.cpp | 80 size_t objectSize = GetObjectSize(curPtr); in IterateOverObjects() local 82 curPtr = ToVoidPtr(AlignUp(ToUintPtr(curPtr) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IterateOverObjects() 98 size_t objectSize = GetObjectSize(static_cast<ObjectHeader *>(currentPtr)); in IterateOverObjectsInRange() local 99 currentPtr = ToVoidPtr(AlignUp(ToUintPtr(currentPtr) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IterateOverObjectsInRange() 103 size_t objectSize = GetObjectSize(currentPtr); in IterateOverObjectsInRange() local 105 currentPtr = ToVoidPtr(AlignUp(ToUintPtr(currentPtr) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IterateOverObjectsInRange()
|
H A D | region_space-inl.h | 108 size_t objectSize = GetObjectSize(objectHeader); in IterateOverObjects() local 110 curPtr = AlignUp(curPtr + objectSize, DEFAULT_ALIGNMENT_IN_BYTES); in IterateOverObjects() 121 size_t objectSize = GetObjectSize(objectHeader); in IterateOverObjects() local 123 curPtr = AlignUp(curPtr + objectSize, DEFAULT_ALIGNMENT_IN_BYTES); in IterateOverObjects()
|
H A D | bump-allocator-inl.h | 167 size_t objectSize = GetObjectSize(curPtr); in IterateOverObjects() local 169 curPtr = ToVoidPtr(AlignUp(ToUintPtr(curPtr) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IterateOverObjects() 219 size_t objectSize = GetObjectSize(currentPtr); in IterateOverObjectsInRange() local 221 currentPtr = ToVoidPtr(AlignUp(ToUintPtr(currentPtr) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IterateOverObjectsInRange() 293 size_t objectSize = GetObjectSize(currentObj); in IsLive() local 294 currentObj = ToVoidPtr(AlignUp(ToUintPtr(currentObj) + objectSize, DEFAULT_ALIGNMENT_IN_BYTES)); in IsLive()
|
H A D | mem_stats.cpp | 79 void MemStats<T>::RecordFreeObject(size_t objectSize, SpaceType typeMem) in RecordFreeObject() argument 81 RecordFreeObjects(1, objectSize, typeMem); in RecordFreeObject()
|
H A D | mem_stats.h | 58 void RecordFreeObject(size_t objectSize, SpaceType typeMem);
|
H A D | region_allocator-inl.h | 453 size_t objectSize = GetObjectSize(object); in CompactSpecificRegion() 454 size_t alignedSize = AlignUp(objectSize, DEFAULT_ALIGNMENT_IN_BYTES); in CompactSpecificRegion() 464 memcpy_s(dst, objectSize, object, objectSize); in CompactSpecificRegion() 655 void *RegionNonmovableAllocator<AllocConfigT, LockConfigT, ObjectAllocator>::NewRegionAndRetryAlloc(size_t objectSize, in NewRegionAndRetryAlloc() argument 660 ASSERT(AlignUp(poolHeadSize + objectSize, REGION_SIZE) == REGION_SIZE); in NewRegionAndRetryAlloc() 673 void *mem = objectAllocator_.Alloc(objectSize, align); in NewRegionAndRetryAlloc()
|
H A D | region_space.h | 293 constexpr static size_t RegionSize(size_t objectSize, size_t regionSize) in RegionSize() argument 295 return AlignUp(HeadSize() + objectSize, regionSize); in RegionSize()
|
/arkcompiler/runtime_core/static_core/runtime/tests/ |
H A D | mem_stats_gc_test.cpp | 47 void MemStatsTest(uint64_t tries, size_t objectSize); 83 void MemStatsGCTest::MemStatsTest(uint64_t tries, size_t objectSize) in MemStatsTest() argument 85 ASSERT(objectSize >= sizeof(coretypes::String)); in MemStatsTest() 94 for (size_t j = 0; j < objectSize - sizeof(coretypes::String); j++) { in MemStatsTest() 160 for (size_t objectSize : OBJECTS_SIZE) { in TEST_F() 161 MemStatsTest<OBJECTS_COUNT>(TRIES, objectSize); in TEST_F() 171 for (size_t objectSize : OBJECTS_SIZE) { in TEST_F() 172 MemStatsTest<OBJECTS_COUNT>(TRIES, objectSize); in TEST_F()
|
H A D | g1gc_test.cpp | 1645 static void PinUnpinTest(SpaceType requestedSpaceType, size_t objectSize = 1_KB) in PinUnpinTest() 1658 ObjectAllocator::AllocArray(objectSize / OBJ_ELEMENT_SIZE, ClassRoot::ARRAY_I64, in PinUnpinTest() 1782 size_t objectSize = 1_KB; in TEST_F() local 1783 auto *arrayObj = ObjectAllocator::AllocArray(objectSize / OBJ_ELEMENT_SIZE, ClassRoot::ARRAY_I64, false, true); in TEST_F() 1795 size_t objectSize = 128_KB; in TEST_F() local 1796 auto *arrayObj = ObjectAllocator::AllocString(objectSize, true); in TEST_F() 1813 size_t objectSize = 128_KB; in TEST_F() local 1814 auto *strObj1 = ObjectAllocator::AllocString(objectSize, true); in TEST_F() 1835 size_t objectSize = 32_KB; in TEST_F() local 1836 auto *strObj1 = ObjectAllocator::AllocString(objectSize, tru in TEST_F() 1895 size_t objectSize = 1_KB; TEST_F() local [all...] |
H A D | region_allocator_test.cpp | 894 size_t objectSize = DEFAULT_REGION_SIZE + 1; in TEST_F() local 895 testClass->SetObjectSize(objectSize); in TEST_F() 896 void *mem = allocator.Alloc(objectSize); in TEST_F() 916 size_t objectSize = DEFAULT_REGION_SIZE + 1; in TEST_F() local 917 testClass->SetObjectSize(objectSize); in TEST_F() 918 void *mem = allocator.Alloc(objectSize); in TEST_F()
|
/arkcompiler/ets_runtime/ecmascript/serializer/ |
H A D | serialize_data.h | 332 void CalculateSerializedObjectSize(SerializedObjectSpace space, size_t objectSize) 336 AlignSpaceObjectSize(oldSpaceSize_, objectSize); 339 AlignSpaceObjectSize(nonMovableSpaceSize_, objectSize); 342 AlignSpaceObjectSize(machineCodeSpaceSize_, objectSize); 345 AlignSpaceObjectSize(sharedOldSpaceSize_, objectSize); 348 AlignSpaceObjectSize(sharedNonMovableSpaceSize_, objectSize); 355 void AlignSpaceObjectSize(size_t &spaceSize, size_t objectSize) 358 if (UNLIKELY(spaceSize + objectSize > alignRegionSize)) { 362 spaceSize += objectSize;
|
H A D | base_serializer-inl.h | 53 size_t objectSize = hclass->SizeFromJSHClass(object); in SerializeTaggedObject() local 56 data_->WriteUint32(objectSize); in SerializeTaggedObject() 57 data_->CalculateSerializedObjectSize(space, objectSize); in SerializeTaggedObject()
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_hclass_test.cpp | 60 size_t objectSize; in HWTEST_F_L0() local 62 objectSize = objectClass->SizeFromJSHClass(*objectClass); in HWTEST_F_L0() 63 EXPECT_EQ(objectSize, 40U); in HWTEST_F_L0() 66 objectSize = string->GetClass()->SizeFromJSHClass(string); in HWTEST_F_L0() 67 EXPECT_EQ(objectSize, 16U); in HWTEST_F_L0() 69 objectSize = string->GetClass()->SizeFromJSHClass(string); in HWTEST_F_L0() 70 EXPECT_EQ(objectSize, 32U); in HWTEST_F_L0() 73 objectSize = objectClass->SizeFromJSHClass(*objectClass); in HWTEST_F_L0() 75 EXPECT_EQ(objectSize, 328U); in HWTEST_F_L0() 77 EXPECT_EQ(objectSize, 20 in HWTEST_F_L0() [all...] |
/arkcompiler/runtime_core/static_core/runtime/mem/gc/g1/ |
H A D | g1-evacuate-regions-worker-state-inl.h | 64 auto objectSize = GetObjectSize(obj); in Evacuate() local 65 auto alignedSize = AlignUp(objectSize, DEFAULT_ALIGNMENT_IN_BYTES); in Evacuate() 78 [[maybe_unused]] auto copyResult = memcpy_s(dst, objectSize, obj, objectSize); in Evacuate()
|
/arkcompiler/ets_runtime/ecmascript/mem/shared_heap/ |
H A D | shared_space.cpp | 589 uintptr_t SharedHugeObjectSpace::Allocate(JSThread *thread, size_t objectSize, AllocateEventType allocType) in Allocate() argument 597 // In HugeObject allocation, we have a revervation of 8 bytes for markBitSet in objectSize. in Allocate() 599 size_t alignedSize = AlignUp(objectSize + sizeof(Region) + HUGE_OBJECT_BITSET_SIZE, PANDA_POOL_ALIGNMENT_IN_BYTES); in Allocate() 615 ASAN_UNPOISON_MEMORY_REGION(reinterpret_cast<void *>(region->GetBegin()), objectSize); in Allocate() 617 InvokeAllocationInspector(region->GetBegin(), objectSize); in Allocate() 661 void SharedHugeObjectSpace::InvokeAllocationInspector(Address object, size_t objectSize) in InvokeAllocationInspector() argument 666 if (objectSize >= allocationCounter_.NextBytes()) { in InvokeAllocationInspector() 667 allocationCounter_.InvokeAllocationInspector(object, objectSize, objectSize); in InvokeAllocationInspector() 669 allocationCounter_.AdvanceAllocationInspector(objectSize); in InvokeAllocationInspector() [all...] |
H A D | shared_space.h | 226 uintptr_t Allocate(JSThread *thread, size_t objectSize, AllocateEventType allocType = AllocateEventType::NORMAL); 233 void InvokeAllocationInspector(Address object, size_t objectSize);
|
/arkcompiler/ets_runtime/ecmascript/snapshot/mem/ |
H A D | snapshot_processor.h | 71 uintptr_t GetNewObj(size_t objectSize, TaggedObject *objectHeader); 142 uintptr_t AllocateObjectToLocalSpace(Space *space, size_t objectSize);
|
H A D | snapshot_processor.cpp | 1162 uintptr_t SnapshotProcessor::AllocateObjectToLocalSpace(Space *space, size_t objectSize) in AllocateObjectToLocalSpace() argument 1166 newObj = reinterpret_cast<HugeObjectSpace *>(space)->Allocate(objectSize, vm_->GetAssociatedJSThread()); in AllocateObjectToLocalSpace() 1168 newObj = reinterpret_cast<SnapshotSpace *>(space)->Allocate(objectSize); in AllocateObjectToLocalSpace() 1170 newObj = reinterpret_cast<LocalSpace *>(space)->Allocate(objectSize); in AllocateObjectToLocalSpace() 1178 snapshotData += SnapshotHelper::EncodeHugeObjectSize(objectSize); in AllocateObjectToLocalSpace() 1798 uintptr_t SnapshotProcessor::GetNewObj(size_t objectSize, TaggedObject *objectHeader) in GetNewObj() argument 1801 return AllocateObjectToLocalSpace(snapshotLocalSpace_, objectSize); in GetNewObj() 1805 return AllocateObjectToLocalSpace(oldLocalSpace_, objectSize); in GetNewObj() 1808 return AllocateObjectToLocalSpace(machineCodeLocalSpace_, objectSize); in GetNewObj() 1812 return AllocateObjectToLocalSpace(nonMovableLocalSpace_, objectSize); in GetNewObj() 1853 size_t objectSize = objectHeader->GetClass()->SizeFromJSHClass(objectHeader); EncodeTaggedObject() local [all...] |
H A D | snapshot.cpp | 236 size_t objectSize = AlignUp(EcmaStringAccessor(str).ObjectSize(), in WriteToFile() local 238 totalStringSize += objectSize; in WriteToFile()
|
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/ |
H A D | heap_profiler.cpp | 434 uint64_t objectSize = 0; in GetHeapCntAndSize() local 435 auto cb = [&objectSize, &cnt]([[maybe_unused]] TaggedObject *obj) { in GetHeapCntAndSize() 436 objectSize += obj->GetClass()->SizeFromJSHClass(obj); in GetHeapCntAndSize() 440 return std::make_pair(cnt, objectSize); in GetHeapCntAndSize()
|