mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 20:20:52 +00:00
replace bytrace key to hitrace_meter
Signed-off-by: wenlong12 <wenlong12@huawei.com> Signed-off-by: wenlong12 <wenlong12@huawei.com>
This commit is contained in:
parent
d44cc1e02f
commit
6c951ee7e4
@ -40,7 +40,7 @@
|
||||
#define ECMA_BYTRACE_NAME(tag, name)
|
||||
#elif !defined(PANDA_TARGET_LINUX) && !defined(PANDA_TARGET_WINDOWS) \
|
||||
&& !defined(PANDA_TARGET_MACOS) && defined(IS_PUBLIC_VERSION)
|
||||
#define ECMA_BYTRACE_NAME(tag, name) BYTRACE_NAME(tag, name); trace::ScopedTrace scopedTrace(name)
|
||||
#define ECMA_BYTRACE_NAME(tag, name) HITRACE_METER_NAME(tag, name); trace::ScopedTrace scopedTrace(name)
|
||||
#elif defined(ENABLE_BYTRACE)
|
||||
#define ECMA_BYTRACE_NAME(tag, name) trace::ScopedTrace scopedTrace(name)
|
||||
#endif
|
||||
|
@ -131,7 +131,7 @@ void EcmaVM::TryLoadSnapshotFile()
|
||||
bool EcmaVM::Initialize()
|
||||
{
|
||||
LOG(INFO, RUNTIME) << "EcmaVM Initialize";
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "EcmaVM::Initialize");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "EcmaVM::Initialize");
|
||||
Taskpool::GetCurrentTaskpool()->Initialize();
|
||||
#ifndef PANDA_TARGET_WINDOWS
|
||||
RuntimeStubs::Initialize(thread_);
|
||||
|
@ -72,7 +72,7 @@ const JSPandaFile *JSPandaFileManager::LoadAotInfoFromPf(const CString &filename
|
||||
|
||||
const JSPandaFile *JSPandaFileManager::LoadJSPandaFile(const CString &filename, std::string_view entryPoint)
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "JSPandaFileManager::LoadJSPandaFile");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "JSPandaFileManager::LoadJSPandaFile");
|
||||
const JSPandaFile *jsPandaFile = FindJSPandaFile(filename);
|
||||
if (jsPandaFile != nullptr) {
|
||||
IncreaseRefJSPandaFile(jsPandaFile);
|
||||
@ -113,7 +113,7 @@ const JSPandaFile *JSPandaFileManager::LoadJSPandaFile(const CString &filename,
|
||||
|
||||
JSHandle<Program> JSPandaFileManager::GenerateProgram(EcmaVM *vm, const JSPandaFile *jsPandaFile)
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "JSPandaFileManager::GenerateProgram");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "JSPandaFileManager::GenerateProgram");
|
||||
LOG_ECMA(INFO) << "GenerateProgram " << jsPandaFile->GetPandaFile()->GetFilename();
|
||||
ASSERT(GetJSPandaFile(jsPandaFile->GetPandaFile()) != nullptr);
|
||||
|
||||
|
@ -41,7 +41,7 @@ ConcurrentMarker::ConcurrentMarker(Heap *heap)
|
||||
void ConcurrentMarker::Mark()
|
||||
{
|
||||
ECMA_GC_LOG() << "ConcurrentMarker: Concurrent Marking Begin";
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "ConcurrentMarker::Mark");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "ConcurrentMarker::Mark");
|
||||
MEM_ALLOCATE_AND_GC_TRACE(vm_, ConcurrentMarking);
|
||||
ClockScope scope;
|
||||
InitializeMarking();
|
||||
|
@ -30,7 +30,7 @@ FullGC::FullGC(Heap *heap) : heap_(heap), workManager_(heap->GetWorkManager()) {
|
||||
|
||||
void FullGC::RunPhases()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "FullGC::RunPhases");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "FullGC::RunPhases");
|
||||
MEM_ALLOCATE_AND_GC_TRACE(heap_->GetEcmaVM(), FullGC_RunPhases);
|
||||
ClockScope clockScope;
|
||||
|
||||
@ -50,7 +50,7 @@ void FullGC::RunPhases()
|
||||
|
||||
void FullGC::Initialize()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "FullGC::Initialize");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "FullGC::Initialize");
|
||||
heap_->Prepare();
|
||||
auto callback = [](Region *current) {
|
||||
current->ClearOldToNewRSet();
|
||||
@ -73,7 +73,7 @@ void FullGC::Initialize()
|
||||
|
||||
void FullGC::Mark()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "FullGC::Mark");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "FullGC::Mark");
|
||||
heap_->GetCompressGCMarker()->MarkRoots(MAIN_THREAD_INDEX);
|
||||
heap_->GetCompressGCMarker()->ProcessMarkStack(MAIN_THREAD_INDEX);
|
||||
heap_->WaitRunningTaskFinished();
|
||||
@ -81,7 +81,7 @@ void FullGC::Mark()
|
||||
|
||||
void FullGC::Sweep()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "FullGC::Sweep");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "FullGC::Sweep");
|
||||
// process weak reference
|
||||
auto totalThreadCount = Taskpool::GetCurrentTaskpool()->GetTotalThreadNum() + 1; // gc thread and main thread
|
||||
for (uint32_t i = 0; i < totalThreadCount; i++) {
|
||||
@ -140,7 +140,7 @@ void FullGC::Sweep()
|
||||
|
||||
void FullGC::Finish()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "FullGC::Finish");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "FullGC::Finish");
|
||||
heap_->GetSweeper()->PostConcurrentSweepTasks(true);
|
||||
heap_->Resume(FULL_GC);
|
||||
workManager_->Finish(youngAndOldAliveSize_);
|
||||
|
@ -416,7 +416,7 @@ bool Heap::CheckOngoingConcurrentMarking()
|
||||
if (concurrentMarkingEnabled_ && !thread_->IsReadyToMark()) {
|
||||
if (thread_->IsMarking()) {
|
||||
[[maybe_unused]] ClockScope clockScope;
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "Heap::CheckOngoingConcurrentMarking");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "Heap::CheckOngoingConcurrentMarking");
|
||||
MEM_ALLOCATE_AND_GC_TRACE(GetEcmaVM(), WaitConcurrentMarkingFinished);
|
||||
GetNonMovableMarker()->ProcessMarkStack(MAIN_THREAD_INDEX);
|
||||
WaitConcurrentMarkingFinished();
|
||||
|
@ -33,7 +33,7 @@ PartialGC::PartialGC(Heap *heap) : heap_(heap), workManager_(heap->GetWorkManage
|
||||
|
||||
void PartialGC::RunPhases()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::RunPhases");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::RunPhases");
|
||||
MEM_ALLOCATE_AND_GC_TRACE(heap_->GetEcmaVM(), PartialGC_RunPhases);
|
||||
ClockScope clockScope;
|
||||
|
||||
@ -51,7 +51,7 @@ void PartialGC::RunPhases()
|
||||
|
||||
void PartialGC::Initialize()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::Initialize");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::Initialize");
|
||||
if (!markingInProgress_) {
|
||||
LOG(INFO, RUNTIME) << "No ongoing Concurrent marking. Initializing...";
|
||||
heap_->Prepare();
|
||||
@ -74,7 +74,7 @@ void PartialGC::Initialize()
|
||||
|
||||
void PartialGC::Finish()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::Finish");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::Finish");
|
||||
if (markingInProgress_) {
|
||||
auto marker = heap_->GetConcurrentMarker();
|
||||
marker->Reset(false);
|
||||
@ -86,7 +86,7 @@ void PartialGC::Finish()
|
||||
|
||||
void PartialGC::Mark()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::Mark");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::Mark");
|
||||
if (markingInProgress_) {
|
||||
heap_->GetConcurrentMarker()->ReMark();
|
||||
return;
|
||||
@ -103,7 +103,7 @@ void PartialGC::Mark()
|
||||
|
||||
void PartialGC::Sweep()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::Sweep");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::Sweep");
|
||||
if (heap_->IsFullMark()) {
|
||||
ProcessNativeDelete();
|
||||
heap_->GetSweeper()->Sweep();
|
||||
@ -127,7 +127,7 @@ void PartialGC::ProcessNativeDelete()
|
||||
|
||||
void PartialGC::Evacuate()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "PartialGC::Evacuate");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "PartialGC::Evacuate");
|
||||
heap_->GetEvacuator()->Evacuate();
|
||||
}
|
||||
} // namespace panda::ecmascript
|
||||
|
@ -38,7 +38,7 @@ void STWYoungGC::RunPhases()
|
||||
MEM_ALLOCATE_AND_GC_TRACE(heap_->GetEcmaVM(), STWYoungGC_RunPhases);
|
||||
[[maybe_unused]] ClockScope clockScope;
|
||||
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "STWYoungGC::RunPhases");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "STWYoungGC::RunPhases");
|
||||
if (heap_->CheckOngoingConcurrentMarking()) {
|
||||
ECMA_GC_LOG() << "STWYoungGC after ConcurrentMarking";
|
||||
heap_->GetConcurrentMarker()->Reset(); // HPPGC use mark result to move TaggedObject.
|
||||
@ -54,7 +54,7 @@ void STWYoungGC::RunPhases()
|
||||
|
||||
void STWYoungGC::Initialize()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "STWYoungGC::Initialize");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "STWYoungGC::Initialize");
|
||||
heap_->Prepare();
|
||||
commitSize_ = heap_->GetNewSpace()->GetCommittedSize();
|
||||
heap_->SwapNewSpace();
|
||||
@ -66,7 +66,7 @@ void STWYoungGC::Initialize()
|
||||
|
||||
void STWYoungGC::Mark()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "STWYoungGC::Mark");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "STWYoungGC::Mark");
|
||||
auto region = heap_->GetOldSpace()->GetCurrentRegion();
|
||||
|
||||
if (parallelGC_) {
|
||||
@ -92,7 +92,7 @@ void STWYoungGC::Mark()
|
||||
|
||||
void STWYoungGC::Sweep()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "STWYoungGC::Sweep");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "STWYoungGC::Sweep");
|
||||
auto totalThreadCount = static_cast<uint32_t>(
|
||||
Taskpool::GetCurrentTaskpool()->GetTotalThreadNum() + 1); // gc thread and main thread
|
||||
for (uint32_t i = 0; i < totalThreadCount; i++) {
|
||||
@ -138,7 +138,7 @@ void STWYoungGC::Sweep()
|
||||
|
||||
void STWYoungGC::Finish()
|
||||
{
|
||||
ECMA_BYTRACE_NAME(BYTRACE_TAG_ARK, "STWYoungGC::Finish");
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "STWYoungGC::Finish");
|
||||
workManager_->Finish(semiCopiedSize_, promotedSize_);
|
||||
heap_->Resume(YOUNG_GC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user