diff --git a/ecmascript/mem/compress_collector.cpp b/ecmascript/mem/compress_collector.cpp index c6dfc6a094887a65244de7adcf032aaff8f2f548..db3759594c3e193fd0be8a585f48de9cd9037310 100644 --- a/ecmascript/mem/compress_collector.cpp +++ b/ecmascript/mem/compress_collector.cpp @@ -22,6 +22,8 @@ #include "ecmascript/mem/heap_roots-inl.h" #include "ecmascript/mem/mark_stack.h" #include "ecmascript/mem/mem.h" +#include "ecmascript/runtime_call_id.h" +#include "ecmascript/vmstat/runtime_stat.h" namespace panda::ecmascript { CompressCollector::CompressCollector(Heap *heap, bool parallelGc) @@ -40,6 +42,8 @@ CompressCollector::~CompressCollector() void CompressCollector::RunPhases() { + [[maybe_unused]] ecmascript::JSThread *thread = heap_->GetEcmaVM()->GetJSThread(); + INTERPRETER_TRACE(thread, CompressCollector_RunPhases); trace::ScopedTrace scoped_trace("CompressCollector::RunPhases"); [[maybe_unused]] ClockScope clock("CompressCollector::RunPhases"); InitializePhase(); diff --git a/ecmascript/mem/old_space_collector.cpp b/ecmascript/mem/old_space_collector.cpp index e6145e81cfdf5e268b0220285c9b1fde7f0b0b31..3572760030bc5a72f1440173fb54d5204987a955 100644 --- a/ecmascript/mem/old_space_collector.cpp +++ b/ecmascript/mem/old_space_collector.cpp @@ -23,12 +23,16 @@ #include "ecmascript/mem/mark_stack.h" #include "ecmascript/mem/mem.h" #include "ecmascript/mem/space-inl.h" +#include "ecmascript/runtime_call_id.h" +#include "ecmascript/vmstat/runtime_stat.h" namespace panda::ecmascript { OldSpaceCollector::OldSpaceCollector(Heap *heap) : heap_(heap), rootManager_(heap->GetEcmaVM()) {} void OldSpaceCollector::RunPhases() { + [[maybe_unused]] ecmascript::JSThread *thread = heap_->GetEcmaVM()->GetJSThread(); + INTERPRETER_TRACE(thread, OldSpaceCollector_RunPhases); trace::ScopedTrace scoped_trace("OldSpaceCollector::RunPhases"); [[maybe_unused]] ClockScope clock("OldSpaceCollector::RunPhases"); InitializePhase(); diff --git a/ecmascript/mem/semi_space_collector.cpp b/ecmascript/mem/semi_space_collector.cpp index 44b22063f1444446b0754355d47759b379cf24aa..ef6975066f4328a0f4a42b5b9701b7fd21bfccc2 100644 --- a/ecmascript/mem/semi_space_collector.cpp +++ b/ecmascript/mem/semi_space_collector.cpp @@ -24,6 +24,8 @@ #include "ecmascript/mem/mem.h" #include "ecmascript/mem/space-inl.h" #include "ecmascript/mem/tlab_allocator-inl.h" +#include "ecmascript/runtime_call_id.h" +#include "ecmascript/vmstat/runtime_stat.h" namespace panda::ecmascript { SemiSpaceCollector::SemiSpaceCollector(Heap *heap, bool parallelGc) @@ -42,6 +44,8 @@ SemiSpaceCollector::~SemiSpaceCollector() void SemiSpaceCollector::RunPhases() { + [[maybe_unused]] ecmascript::JSThread *thread = heap_->GetEcmaVM()->GetJSThread(); + INTERPRETER_TRACE(thread, SemiSpaceCollector_RunPhases); trace::ScopedTrace scoped_trace("SemiSpaceCollector::RunPhases"); [[maybe_unused]] ClockScope clock("SemiSpaceCollector::RunPhases"); InitializePhase(); diff --git a/ecmascript/runtime_call_id.h b/ecmascript/runtime_call_id.h index 7dbd98352fe4d73e238277dcca0cc23f3bcb2c15..2539364caafd5e36ff7d2adbc43b353080e26dc7 100644 --- a/ecmascript/runtime_call_id.h +++ b/ecmascript/runtime_call_id.h @@ -135,6 +135,9 @@ namespace panda::ecmascript { V(TryStoreICByValue) \ V(StoreICByValue) \ V(NotifyInlineCache) \ + V(CompressCollector_RunPhases) \ + V(OldSpaceCollector_RunPhases) \ + V(SemiSpaceCollector_RunPhases) \ V(GetIteratorNext) // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)