• Home
  • Raw
  • Download

Lines Matching full:vm

67 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] const std::str…  in DumpHeapSnapshot()  argument
73 DumpHeapSnapshot(vm, &stream, dumpOption, nullptr, callback); in DumpHeapSnapshot()
83 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] Stream *stream, in DumpHeapSnapshot() argument
90 const_cast<EcmaVM *>(vm)); in DumpHeapSnapshot()
114 void DFXJSNApi::DumpCpuProfile([[maybe_unused]] const EcmaVM *vm) in DumpCpuProfile() argument
117 vm->GetJSThread()->PrintMegaICStat(); in DumpCpuProfile()
123 if (DFXJSNApi::StopCpuProfilerForColdStart(vm)) { in DumpCpuProfile()
128 if (DFXJSNApi::CpuProfilerSamplingAnyTime(vm)) { in DumpCpuProfile()
138 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, in DumpHeapSnapshot() argument
144 auto &options = const_cast<EcmaVM *>(vm)->GetJSOptions(); in DumpHeapSnapshot()
151 vm->GetJSThread()->SetStackTraceFd(stackTraceFd); in DumpHeapSnapshot()
168 const_cast<EcmaVM *>(vm)); in DumpHeapSnapshot()
178 // tid = 0: dump all vm; tid != 0: dump tid vm, hidumper.
179 void DFXJSNApi::DumpHeapSnapshot([[maybe_unused]] const EcmaVM *vm, in DumpHeapSnapshot() argument
183 if (vm->IsWorkerThread()) { in DumpHeapSnapshot()
188 uint32_t curTid = vm->GetTid(); in DumpHeapSnapshot()
190 DumpHeapSnapshotWithVm(vm, dumpOption, tid); in DumpHeapSnapshot()
193 void DFXJSNApi::DumpHeapSnapshotWithVm([[maybe_unused]] const EcmaVM *vm, in DumpHeapSnapshotWithVm() argument
199 uv_loop_t *loop = reinterpret_cast<uv_loop_t *>(vm->GetLoop()); in DumpHeapSnapshotWithVm()
205 dumpStruct->vm = vm; in DumpHeapSnapshotWithVm()
215 uint32_t curTid = vm->GetTid(); in DumpHeapSnapshotWithVm()
220 DFXJSNApi::GetHeapPrepare(dump->vm); in DumpHeapSnapshotWithVm()
222 DumpHeapSnapshot(dump->vm, dumpOption); in DumpHeapSnapshotWithVm()
231 // dump worker vm in DumpHeapSnapshotWithVm()
232 const_cast<EcmaVM *>(vm)->EnumerateWorkerVm([&](const EcmaVM *workerVm) -> void { in DumpHeapSnapshotWithVm()
248 // tid = 0: TriggerGC all vm; tid != 0: TriggerGC tid vm
249 void DFXJSNApi::TriggerGC([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] uint32_t tid) in TriggerGC() argument
251 if (vm->IsWorkerThread()) { in TriggerGC()
255 // triggerGC host vm in TriggerGC()
256 uint32_t curTid = vm->GetTid(); in TriggerGC()
259 TriggerGCWithVm(vm); in TriggerGC()
261 // triggerGC worker vm in TriggerGC()
262 const_cast<EcmaVM *>(vm)->EnumerateWorkerVm([&](const EcmaVM *workerVm) -> void { in TriggerGC()
271 TriggerSharedGCWithVm(vm); in TriggerGC()
274 void DFXJSNApi::TriggerSharedGCWithVm([[maybe_unused]] const EcmaVM *vm) in TriggerSharedGCWithVm() argument
278 uv_loop_t *loop = reinterpret_cast<uv_loop_t *>(vm->GetLoop()); in TriggerSharedGCWithVm()
292 work->data = static_cast<void *>(const_cast<EcmaVM *>(vm)); in TriggerSharedGCWithVm()
294 EcmaVM *vm = static_cast<EcmaVM *>(work->data); in TriggerSharedGCWithVm() local
296 JSThread *thread = vm->GetJSThread(); in TriggerSharedGCWithVm()
310 void DFXJSNApi::TriggerGCWithVm([[maybe_unused]] const EcmaVM *vm) in TriggerGCWithVm() argument
314 uv_loop_t *loop = reinterpret_cast<uv_loop_t *>(vm->GetLoop()); in TriggerGCWithVm()
328 work->data = static_cast<void *>(const_cast<EcmaVM *>(vm)); in TriggerGCWithVm()
330 EcmaVM *vm = static_cast<EcmaVM *>(work->data); in TriggerGCWithVm() local
331 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in TriggerGCWithVm()
332vm->CollectGarbage(ecmascript::TriggerGCType::FULL_GC, ecmascript::GCReason::TRIGGER_BY_MEM_TOOLS); in TriggerGCWithVm()
343 void DFXJSNApi::DestroyHeapProfiler([[maybe_unused]] const EcmaVM *vm) in DestroyHeapProfiler() argument
346 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in DestroyHeapProfiler()
347 ecmascript::HeapProfilerInterface::Destroy(const_cast<EcmaVM *>(vm)); in DestroyHeapProfiler()
353 bool DFXJSNApi::BuildNativeAndJsStackTrace(const EcmaVM *vm, std::string &stackTraceStr) in BuildNativeAndJsStackTrace() argument
355 stackTraceStr = ecmascript::JsStackInfo::BuildJsStackTrace(vm->GetAssociatedJSThread(), true); in BuildNativeAndJsStackTrace()
362 bool DFXJSNApi::BuildJsStackTrace(const EcmaVM *vm, std::string &stackTraceStr) in BuildJsStackTrace() argument
364 JSThread *thread = vm->GetAssociatedJSThread(); in BuildJsStackTrace()
381 bool DFXJSNApi::StartHeapTracking([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] double timeIn… in StartHeapTracking() argument
387 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in StartHeapTracking()
389 const_cast<EcmaVM *>(vm)); in StartHeapTracking()
397 bool DFXJSNApi::UpdateHeapTracking([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] Stream *stre… in UpdateHeapTracking() argument
401 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in UpdateHeapTracking()
403 const_cast<EcmaVM *>(vm)); in UpdateHeapTracking()
411 bool DFXJSNApi::StopHeapTracking([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] const std::str… in StopHeapTracking() argument
416 return StopHeapTracking(vm, &stream, nullptr, newThread); in StopHeapTracking()
423 bool DFXJSNApi::StopHeapTracking([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] Stream* stream, in StopHeapTracking() argument
428 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in StopHeapTracking()
431 const_cast<EcmaVM *>(vm)); in StopHeapTracking()
433 ecmascript::HeapProfilerInterface::Destroy(const_cast<EcmaVM *>(vm)); in StopHeapTracking()
441 void DFXJSNApi::PrintStatisticResult(const EcmaVM *vm) in PrintStatisticResult() argument
443 ecmascript::GCStats gcstats(vm->GetHeap()); in PrintStatisticResult()
447 void DFXJSNApi::StartRuntimeStat(EcmaVM *vm) in StartRuntimeStat() argument
449 vm->GetJSThread()->GetEcmaVM()->SetRuntimeStatEnable(true); in StartRuntimeStat()
452 void DFXJSNApi::StopRuntimeStat(EcmaVM *vm) in StopRuntimeStat() argument
454 vm->GetJSThread()->GetEcmaVM()->SetRuntimeStatEnable(false); in StopRuntimeStat()
471 size_t DFXJSNApi::GetArrayBufferSize(const EcmaVM *vm) in GetArrayBufferSize() argument
476 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in GetArrayBufferSize()
477 return vm->GetHeap()->GetArrayBufferSize(); in GetArrayBufferSize()
480 size_t DFXJSNApi::GetHeapTotalSize(const EcmaVM *vm) in GetHeapTotalSize() argument
485 return vm->GetHeap()->GetCommittedSize(); in GetHeapTotalSize()
488 size_t DFXJSNApi::GetHeapUsedSize(const EcmaVM *vm) in GetHeapUsedSize() argument
493 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in GetHeapUsedSize()
494 return vm->GetHeap()->GetLiveObjectSize(); in GetHeapUsedSize()
497 size_t DFXJSNApi::GetHeapObjectSize(const EcmaVM *vm) in GetHeapObjectSize() argument
502 return vm->GetHeap()->GetHeapObjectSize(); in GetHeapObjectSize()
505 size_t DFXJSNApi::GetHeapLimitSize(const EcmaVM *vm) in GetHeapLimitSize() argument
510 return vm->GetHeap()->GetHeapLimitSize(); in GetHeapLimitSize()
521 size_t DFXJSNApi::GetGCCount(const EcmaVM *vm) in GetGCCount() argument
523 if (vm->IsWorkerThread()) { in GetGCCount()
524 return vm->GetEcmaGCStats()->GetGCCount(); in GetGCCount()
526 return vm->GetEcmaGCStats()->GetGCCount() + in GetGCCount()
530 size_t DFXJSNApi::GetGCDuration(const EcmaVM *vm) in GetGCDuration() argument
532 if (vm->IsWorkerThread()) { in GetGCDuration()
533 return vm->GetEcmaGCStats()->GetGCDuration(); in GetGCDuration()
535 return vm->GetEcmaGCStats()->GetGCDuration() + in GetGCDuration()
539 size_t DFXJSNApi::GetAccumulatedAllocateSize(const EcmaVM *vm) in GetAccumulatedAllocateSize() argument
544 if (vm->IsWorkerThread()) { in GetAccumulatedAllocateSize()
545 return vm->GetEcmaGCStats()->GetAccumulatedAllocateSize(); in GetAccumulatedAllocateSize()
547 return vm->GetEcmaGCStats()->GetAccumulatedAllocateSize() + in GetAccumulatedAllocateSize()
551 size_t DFXJSNApi::GetAccumulatedFreeSize(const EcmaVM *vm) in GetAccumulatedFreeSize() argument
556 if (vm->IsWorkerThread()) { in GetAccumulatedFreeSize()
557 return vm->GetEcmaGCStats()->GetAccumulatedFreeSize(); in GetAccumulatedFreeSize()
559 return vm->GetEcmaGCStats()->GetAccumulatedFreeSize() + in GetAccumulatedFreeSize()
563 size_t DFXJSNApi::GetFullGCLongTimeCount(const EcmaVM *vm) in GetFullGCLongTimeCount() argument
565 return vm->GetEcmaGCStats()->GetFullGCLongTimeCount(); in GetFullGCLongTimeCount()
568 void DFXJSNApi::GetHeapPrepare(const EcmaVM *vm) in GetHeapPrepare() argument
570 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in GetHeapPrepare()
571 const_cast<ecmascript::Heap *>(vm->GetHeap())->GetHeapPrepare(); in GetHeapPrepare()
574 void DFXJSNApi::SetJsDumpThresholds([[maybe_unused]] EcmaVM *vm, [[maybe_unused]] size_t thresholds) in SetJsDumpThresholds() argument
577 vm->GetHeap()->SetJsDumpThresholds(thresholds); in SetJsDumpThresholds()
583 void DFXJSNApi::SetAppFreezeFilterCallback([[maybe_unused]] const EcmaVM *vm, AppFreezeFilterCallba… in SetAppFreezeFilterCallback() argument
590 void DFXJSNApi::NotifyApplicationState(EcmaVM *vm, bool inBackground) in NotifyApplicationState() argument
592 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in NotifyApplicationState()
593 const_cast<ecmascript::Heap *>(vm->GetHeap())->ChangeGCParams(inBackground); in NotifyApplicationState()
597 void DFXJSNApi::NotifyIdleStatusControl(const EcmaVM *vm, std::function<void(bool)> callback) in NotifyIdleStatusControl() argument
599 const_cast<ecmascript::Heap *>(vm->GetHeap())->InitializeIdleStatusControl(callback); in NotifyIdleStatusControl()
602 void DFXJSNApi::NotifyIdleTime(const EcmaVM *vm, int idleMicroSec) in NotifyIdleTime() argument
604 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in NotifyIdleTime()
605 const_cast<ecmascript::Heap *>(vm->GetHeap())->TriggerIdleCollection(idleMicroSec); in NotifyIdleTime()
608 void DFXJSNApi::NotifyMemoryPressure(EcmaVM *vm, bool inHighMemoryPressure) in NotifyMemoryPressure() argument
610 const_cast<ecmascript::Heap *>(vm->GetHeap())->NotifyMemoryPressure(inHighMemoryPressure); in NotifyMemoryPressure()
613 void DFXJSNApi::NotifyFinishColdStart(EcmaVM *vm, [[maybe_unused]] bool isConvinced) in NotifyFinishColdStart() argument
615 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in NotifyFinishColdStart()
618 void DFXJSNApi::NotifyHighSensitive(EcmaVM *vm, bool isStart) in NotifyHighSensitive() argument
620 const_cast<ecmascript::Heap *>(vm->GetHeap())->NotifyHighSensitive(isStart); in NotifyHighSensitive()
623 void DFXJSNApi::NotifyWarmStart(EcmaVM *vm) in NotifyWarmStart() argument
626 ecmascript::ThreadManagedScope managedScope(vm->GetJSThread()); in NotifyWarmStart()
627 if (AllowWarmStartGcRestrain(vm)) { in NotifyWarmStart()
628 const_cast<ecmascript::Heap *>(vm->GetHeap())->NotifyWarmStartup(); in NotifyWarmStart()
632 bool DFXJSNApi::AllowWarmStartGcRestrain(EcmaVM *vm) in AllowWarmStartGcRestrain() argument
634 common::GCPhase gcPhase = vm->GetJSThread()->GetCMCGCPhase(); in AllowWarmStartGcRestrain()
640 bool hasFinishedMark = vm->GetJSThread()->IsConcurrentMarkingOrFinished(); in AllowWarmStartGcRestrain()
645 …ecmascript::StartupStatus status = const_cast<ecmascript::Heap *>(vm->GetHeap())->GetStartupStatus… in AllowWarmStartGcRestrain()
655 bool DFXJSNApi::StopCpuProfilerForColdStart([[maybe_unused]] const EcmaVM *vm) in StopCpuProfilerForColdStart() argument
659 auto &options = const_cast<EcmaVM *>(vm)->GetJSOptions(); in StopCpuProfilerForColdStart()
662 DFXJSNApi::StopCpuProfilerForFile(vm); in StopCpuProfilerForColdStart()
667 const_cast<EcmaVM *>(vm)->EnumerateWorkerVm([&](const EcmaVM *workerVm) -> void { in StopCpuProfilerForColdStart()
682 void DFXJSNApi::CpuProfilerAnyTimeMainThread(const EcmaVM *vm) in CpuProfilerAnyTimeMainThread() argument
688 std::string fileName = ConvertToStdString(const_cast<EcmaVM *>(vm)->GetBundleName()) in CpuProfilerAnyTimeMainThread()
693 DFXJSNApi::StartCpuProfilerForFile(vm, fileName, CpuProfiler::INTERVAL_OF_INNER_START); in CpuProfilerAnyTimeMainThread()
697 if (vm->GetJSThread()->GetIsProfiling()) { in CpuProfilerAnyTimeMainThread()
698 DFXJSNApi::StopCpuProfilerForFile(vm); in CpuProfilerAnyTimeMainThread()
704 bool DFXJSNApi::CpuProfilerSamplingAnyTime([[maybe_unused]] const EcmaVM *vm) in CpuProfilerSamplingAnyTime() argument
710 auto &options = const_cast<EcmaVM *>(vm)->GetJSOptions(); in CpuProfilerSamplingAnyTime()
713 CpuProfilerAnyTimeMainThread(vm); in CpuProfilerSamplingAnyTime()
721 const_cast<EcmaVM *>(vm)->EnumerateWorkerVm([&](const EcmaVM *workerVm) -> void { in CpuProfilerSamplingAnyTime()
735 const_cast<EcmaVM *>(vm)->EnumerateWorkerVm([&](const EcmaVM *workerVm) -> void { in CpuProfilerSamplingAnyTime()
752 bool DFXJSNApi::StartCpuProfilerForFile([[maybe_unused]] const EcmaVM *vm, in StartCpuProfilerForFile() argument
757 LOG_ECMA(INFO) << "DFXJSNApi::StartCpuProfilerForFile, vm = " << vm; in StartCpuProfilerForFile()
762 if (vm == nullptr) { in StartCpuProfilerForFile()
763 LOG_ECMA(ERROR) << "DFXJSNApi::StartCpuProfilerForFile, vm == nullptr"; in StartCpuProfilerForFile()
766 CpuProfiler *profiler = vm->GetProfiler(); in StartCpuProfilerForFile()
768 profiler = new CpuProfiler(vm, interval); in StartCpuProfilerForFile()
769 const_cast<EcmaVM *>(vm)->SetProfiler(profiler); in StartCpuProfilerForFile()
778 void DFXJSNApi::StopCpuProfilerForFile([[maybe_unused]] const EcmaVM *vm) in StopCpuProfilerForFile() argument
781 LOG_ECMA(INFO) << "DFXJSNApi::StopCpuProfilerForFile, vm = " << vm; in StopCpuProfilerForFile()
782 if (vm == nullptr) { in StopCpuProfilerForFile()
783 LOG_ECMA(ERROR) << "DFXJSNApi::StopCpuProfilerForFile, vm == nullptr"; in StopCpuProfilerForFile()
786 CpuProfiler *profiler = vm->GetProfiler(); in StopCpuProfilerForFile()
798 const_cast<EcmaVM *>(vm)->SetProfiler(nullptr); in StopCpuProfilerForFile()
804 bool DFXJSNApi::StartCpuProfilerForInfo([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] int int… in StartCpuProfilerForInfo() argument
807 LOG_ECMA(INFO) << "DFXJSNApi::StartCpuProfilerForInfo, vm = " << vm; in StartCpuProfilerForInfo()
812 if (vm == nullptr) { in StartCpuProfilerForInfo()
813 LOG_ECMA(ERROR) << "DFXJSNApi::StartCpuProfilerForInfo, vm == nullptr"; in StartCpuProfilerForInfo()
816 CpuProfiler *profiler = vm->GetProfiler(); in StartCpuProfilerForInfo()
818 profiler = new CpuProfiler(vm, interval); in StartCpuProfilerForInfo()
819 const_cast<EcmaVM *>(vm)->SetProfiler(profiler); in StartCpuProfilerForInfo()
828 std::unique_ptr<ProfileInfo> DFXJSNApi::StopCpuProfilerForInfo([[maybe_unused]] const EcmaVM *vm) in StopCpuProfilerForInfo() argument
831 LOG_ECMA(INFO) << "DFXJSNApi::StopCpuProfilerForInfo, vm = " << vm; in StopCpuProfilerForInfo()
832 if (vm == nullptr) { in StopCpuProfilerForInfo()
833 LOG_ECMA(ERROR) << "DFXJSNApi::StopCpuProfilerForInfo, vm == nullptr"; in StopCpuProfilerForInfo()
836 CpuProfiler *profiler = vm->GetProfiler(); in StopCpuProfilerForInfo()
849 const_cast<EcmaVM *>(vm)->SetProfiler(nullptr); in StopCpuProfilerForInfo()
857 void DFXJSNApi::SetCpuSamplingInterval([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] int inte… in SetCpuSamplingInterval() argument
865 if (vm == nullptr) { in SetCpuSamplingInterval()
868 CpuProfiler *profiler = vm->GetProfiler(); in SetCpuSamplingInterval()
870 profiler = new CpuProfiler(vm, interval); in SetCpuSamplingInterval()
871 const_cast<EcmaVM *>(vm)->SetProfiler(profiler); in SetCpuSamplingInterval()
891 bool DFXJSNApi::SuspendVM([[maybe_unused]] const EcmaVM *vm) in SuspendVM() argument
894 … ecmascript::VmThreadControl* vmThreadControl = vm->GetAssociatedJSThread()->GetVmThreadControl(); in SuspendVM()
902 void DFXJSNApi::ResumeVM([[maybe_unused]] const EcmaVM *vm) in ResumeVM() argument
905 … ecmascript::VmThreadControl* vmThreadControl = vm->GetAssociatedJSThread()->GetVmThreadControl(); in ResumeVM()
912 bool DFXJSNApi::IsSuspended([[maybe_unused]] const EcmaVM *vm) in IsSuspended() argument
915 … ecmascript::VmThreadControl* vmThreadControl = vm->GetAssociatedJSThread()->GetVmThreadControl(); in IsSuspended()
923 void DFXJSNApi::TerminateExecution(const EcmaVM *vm) in TerminateExecution() argument
925 … ecmascript::VmThreadControl* vmThreadControl = vm->GetAssociatedJSThread()->GetVmThreadControl(); in TerminateExecution()
929 bool DFXJSNApi::CheckSafepoint([[maybe_unused]] const EcmaVM *vm) in CheckSafepoint() argument
932 ecmascript::JSThread* thread = vm->GetJSThread(); in CheckSafepoint()
942 EcmaVM *vm; in BuildJsStackInfoList() local
944 vm = const_cast<EcmaVM*>(hostVm); in BuildJsStackInfoList()
946 vm = const_cast<EcmaVM*>(hostVm)->GetWorkerVm(tid); in BuildJsStackInfoList()
947 if (vm == nullptr) { in BuildJsStackInfoList()
951 jsFrames = ecmascript::JsStackInfo::BuildJsStackInfo(vm->GetAssociatedJSThread()); in BuildJsStackInfoList()
960 int32_t DFXJSNApi::GetObjectHash(const EcmaVM *vm, Local<JSValueRef> nativeObject) in GetObjectHash() argument
963 return ecmascript::tooling::DebuggerApi::GetObjectHash(vm, obj); in GetObjectHash()
966 int32_t DFXJSNApi::GetObjectHashCode(const EcmaVM *vm, Local<JSValueRef> nativeObject) in GetObjectHashCode() argument
969 return ecmascript::tooling::DebuggerApi::GetObjectHashCode(vm, obj); in GetObjectHashCode()
972 bool DFXJSNApi::StartSampling([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] uint64_t sampling… in StartSampling() argument
976 const_cast<EcmaVM *>(vm)); in StartSampling()
984 const SamplingInfo *DFXJSNApi::GetAllocationProfile([[maybe_unused]] const EcmaVM *vm) in GetAllocationProfile() argument
988 const_cast<EcmaVM *>(vm)); in GetAllocationProfile()
996 void DFXJSNApi::StopSampling([[maybe_unused]] const EcmaVM *vm) in StopSampling() argument
1000 const_cast<EcmaVM *>(vm)); in StopSampling()
1009 bool DFXJSNApi::StartProfiler(EcmaVM *vm, const ProfilerOption &option, int tid, in StartProfiler() argument
1018 … if (JSNApi::NotifyDebugMode(tid, vm, debugOption, instanceId, debuggerPostTask, isDebugApp)) { in StartProfiler()
1019 return StartCpuProfilerForInfo(vm, option.interval); in StartProfiler()
1026 … return JSNApi::NotifyDebugMode(tid, vm, debugOption, instanceId, debuggerPostTask, isDebugApp); in StartProfiler()
1053 bool DFXJSNApi::StartTracing([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] std::string &categ… in StartTracing() argument
1056 if (vm == nullptr) { in StartTracing()
1059 Tracing *tracing = vm->GetTracing(); in StartTracing()
1061 tracing = new Tracing(vm); in StartTracing()
1062 const_cast<EcmaVM *>(vm)->SetTracing(tracing); in StartTracing()
1072 std::unique_ptr<std::vector<TraceEvent>> DFXJSNApi::StopTracing([[maybe_unused]] const EcmaVM *vm) in StopTracing() argument
1075 if (vm == nullptr) { in StopTracing()
1078 Tracing *tracing = vm->GetTracing(); in StopTracing()
1089 const_cast<EcmaVM *>(vm)->SetTracing(nullptr); in StopTracing()
1097 void DFXJSNApi::GetTracingBufferUseage([[maybe_unused]] const EcmaVM *vm, [[maybe_unused]] double &… in GetTracingBufferUseage() argument
1101 if (vm == nullptr) { in GetTracingBufferUseage()
1104 ecmascript::Tracing *tracing = vm->GetTracing(); in GetTracingBufferUseage()
1115 void DFXJSNApi::TranslateJSStackInfo(const EcmaVM *vm, std::string &url, int32_t &line, int32_t &co… in TranslateJSStackInfo() argument
1118 auto cb = vm->GetSourceMapTranslateCallback(); in TranslateJSStackInfo()
1131 void DFXJSNApi::RegisterAsyncDetectCallBack(const EcmaVM *vm) in RegisterAsyncDetectCallBack() argument
1133 vm->GetAsyncStackTrace()->RegisterAsyncDetectCallBack(); in RegisterAsyncDetectCallBack()
1136 void DFXJSNApi::GetMainThreadStackTrace(const EcmaVM *vm, std::string &stackTraceStr) in GetMainThreadStackTrace() argument
1138 auto thread = vm->GetJSThread(); in GetMainThreadStackTrace()
1149 auto sourceMapcb = vm->GetSourceMapCallback(); in GetMainThreadStackTrace()
1162 JSHandle<JSTaggedValue> DFXJSNApi::FindFunctionForHook(const EcmaVM *vm, const std::string &recordN… in FindFunctionForHook() argument
1166 JSThread *thread = vm->GetJSThread(); in FindFunctionForHook()
1170 void DFXJSNApi::ReplaceFunctionForHook(const EcmaVM *vm, JSHandle<JSTaggedValue> &target, in ReplaceFunctionForHook() argument
1177 JSThread *thread = vm->GetJSThread(); in ReplaceFunctionForHook()
1186 bool DFXJSNApi::LoadHookModule(const EcmaVM *vm) in LoadHookModule() argument
1189 return JSPandaFileExecutor::ExecuteInsecureAbcFile(vm->GetJSThread(), path); in LoadHookModule()