From 7bc984e424697be6fd0c7f67f0626e000e2ad701 Mon Sep 17 00:00:00 2001 From: dingwen Date: Mon, 30 Jun 2025 19:26:05 +0800 Subject: [PATCH] Add cmc-gc stw force gc Description:Add cmc-gc stw force gc Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICIXF3?from=project-issue Signed-off-by: dingwen Change-Id: I88d9a148c64f79e290acb0acd7c242f8df6dc6af --- ecmascript/object_factory.cpp | 2 +- ecmascript/shared_object_factory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ecmascript/object_factory.cpp b/ecmascript/object_factory.cpp index a591229c3e..7066e68e79 100644 --- a/ecmascript/object_factory.cpp +++ b/ecmascript/object_factory.cpp @@ -3646,7 +3646,7 @@ void ObjectFactory::NewObjectHook() const !heap_->InSensitiveStatus() && heap_->TriggerCollectionOnNewObjectEnabled()) { if (vm_->GetJSOptions().ForceFullGC()) { if (g_isEnableCMCGC) { - common::BaseRuntime::RequestGC(common::GcType::ASYNC); + common::BaseRuntime::RequestGC(common::GcType::FULL); } else { vm_->CollectGarbage(TriggerGCType::YOUNG_GC); vm_->CollectGarbage(TriggerGCType::OLD_GC); diff --git a/ecmascript/shared_object_factory.cpp b/ecmascript/shared_object_factory.cpp index 9167860e3e..266a02fac5 100644 --- a/ecmascript/shared_object_factory.cpp +++ b/ecmascript/shared_object_factory.cpp @@ -36,7 +36,7 @@ void ObjectFactory::NewSObjectHook() const return; } if (g_isEnableCMCGC) { - common::BaseRuntime::RequestGC(common::GcType::ASYNC); + common::BaseRuntime::RequestGC(common::GcType::FULL); } else { if (count++ % frequency == 0) { if (count % (CONCURRENT_MARK_FREQUENCY_FACTOR * frequency) == 0) { -- Gitee