mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
commit
3914589dbb
@ -433,6 +433,7 @@ void GCStats::RecordStatisticBeforeGC(TriggerGCType gcType, GCReason reason)
|
||||
|
||||
void GCStats::RecordStatisticAfterGC()
|
||||
{
|
||||
ASSERT(heap_ != nullptr);
|
||||
SetRecordData(RecordData::END_OBJ_SIZE, heap_->GetHeapObjectSize());
|
||||
SetRecordData(RecordData::END_COMMIT_SIZE, heap_->GetCommittedSize());
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
namespace panda::ecmascript {
|
||||
MemController::MemController(Heap *heap) : heap_(heap), allocTimeMs_(GetSystemTimeInMs())
|
||||
{
|
||||
ASSERT(heap != nullptr);
|
||||
minAllocLimitGrowingStep_ = heap->GetEcmaVM()->GetEcmaParamConfiguration().GetMinAllocLimitGrowingStep();
|
||||
}
|
||||
|
||||
@ -209,6 +210,7 @@ void MemController::StopCalculationAfterGC(TriggerGCType gcType)
|
||||
|
||||
void MemController::RecordAfterConcurrentMark(MarkType markType, const ConcurrentMarker *marker)
|
||||
{
|
||||
ASSERT(marker != nullptr);
|
||||
double duration = marker->GetDuration();
|
||||
if (markType == MarkType::MARK_FULL) {
|
||||
recordedConcurrentMarks_.Push(MakeBytesAndDuration(marker->GetHeapObjectSize(), duration));
|
||||
|
@ -21,6 +21,7 @@ namespace panda::ecmascript {
|
||||
|
||||
RegExpCachedChunk::RegExpCachedChunk(JSThread *JSThread) : jsThread_(JSThread)
|
||||
{
|
||||
ASSERT(jsThread_ != nullptr);
|
||||
allocator_ = jsThread_->GetNativeAreaAllocator();
|
||||
currentArea_ = jsThread_->GetOrCreateRegExpCache();
|
||||
ptr_ = currentArea_->GetBegin();
|
||||
|
@ -120,7 +120,7 @@ void VerifyObjectVisitor::VerifyObjectSlotLegal(ObjectSlot slot, TaggedObject *o
|
||||
LogErrorForObjSlot(heap_, "Heap verify detected an invalid value.",
|
||||
object, slot, value.GetTaggedWeakRef());
|
||||
}
|
||||
if (!heap_->IsAlive(value.GetTaggedWeakRef())) {
|
||||
if (!heap_->IsAlive(value.GetTaggedWeakRef()) && failCount_ != nullptr) {
|
||||
LogErrorForObjSlot(heap_, "Heap verify detected a dead weak object.",
|
||||
object, slot, value.GetTaggedWeakRef());
|
||||
++(*failCount_);
|
||||
@ -139,7 +139,7 @@ void VerifyObjectVisitor::VerifyHeapObjectSlotLegal(ObjectSlot slot,
|
||||
LogErrorForObjSlot(heap_, "Heap verify detected an invalid value.",
|
||||
object, slot, slotValue.GetTaggedObject());
|
||||
}
|
||||
if (!heap_->IsAlive(slotValue.GetTaggedObject())) {
|
||||
if (!heap_->IsAlive(slotValue.GetTaggedObject()) && failCount_ != nullptr) {
|
||||
LogErrorForObjSlot(heap_, "Heap verify detected a dead object.",
|
||||
object, slot, slotValue.GetTaggedObject());
|
||||
++(*failCount_);
|
||||
@ -417,7 +417,7 @@ void VerifyObjectVisitor::operator()(TaggedObject *obj, JSTaggedValue value)
|
||||
|
||||
TaggedObject *object = value.GetRawTaggedObject();
|
||||
auto region = Region::ObjectAddressToRange(object);
|
||||
if (region->InGeneralOldSpace()) { // LCOV_EXCL_START
|
||||
if (region->InGeneralOldSpace() && failCount_ != nullptr) { // LCOV_EXCL_START
|
||||
LOG_GC(ERROR) << "Heap object(" << slot.GetTaggedType() << ") old to new rset fail: value("
|
||||
<< slot.GetTaggedObject() << "/"
|
||||
<< JSHClass::DumpJSType(slot.GetTaggedObject()->GetClass()->GetObjectType())
|
||||
|
Loading…
Reference in New Issue
Block a user