mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 04:00:37 +00:00
Make hidumper api trigger shared full gc
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAUM1T Signed-off-by: xiongluo <xiongluo@huawei.com> Change-Id: I7b893c0042489d9330058942b8c05bb7c45f3df5
This commit is contained in:
parent
d50c327b8a
commit
952dd2e92e
@ -246,7 +246,7 @@ void DFXJSNApi::TriggerGC([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] ui
|
||||
return;
|
||||
}
|
||||
});
|
||||
// triggerSharedGC
|
||||
// triggerSharedFullGC
|
||||
TriggerSharedGCWithVm(vm);
|
||||
}
|
||||
|
||||
@ -274,7 +274,8 @@ void DFXJSNApi::TriggerSharedGCWithVm([[maybe_unused]] const EcmaVM *vm)
|
||||
ecmascript::SharedHeap* sHeap = ecmascript::SharedHeap::GetInstance();
|
||||
JSThread *thread = vm->GetJSThread();
|
||||
ecmascript::ThreadManagedScope managedScope(thread);
|
||||
sHeap->CollectGarbage<ecmascript::TriggerGCType::SHARED_GC, ecmascript::GCReason::TRIGGER_BY_MEM_TOOLS>(thread);
|
||||
sHeap->CollectGarbage<ecmascript::TriggerGCType::SHARED_FULL_GC,
|
||||
ecmascript::GCReason::TRIGGER_BY_MEM_TOOLS>(thread);
|
||||
delete work;
|
||||
});
|
||||
if (ret != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user