Lines Matching refs:CpuProfiler
36 Mutex CpuProfiler::synchronizationMutex_;
37 CMap<pthread_t, struct TaskInfo> CpuProfiler::profilerMap_ = CMap<pthread_t, struct TaskInfo>();
38 CpuProfiler::CpuProfiler(const EcmaVM *vm, const int interval) : vm_(vm), interval_(interval)
56 bool CpuProfiler::RegisterGetStackSignal()
61 LOG_ECMA(ERROR) << "CpuProfiler::RegisterGetStackSignal, sigemptyset failed, errno = " << errno;
66 LOG_ECMA(ERROR) << "CpuProfiler::RegisterGetStackSignal, sigaction failed, errno = " << errno;
72 bool CpuProfiler::StartCpuProfilerForInfo()
74 LOG_ECMA(INFO) << "CpuProfiler::StartCpuProfilerForInfo, sampling interval = " << interval_;
76 LOG_ECMA(ERROR) << "CpuProfiler::StartCpuProfilerForInfo, can not start when CpuProfiler is Profiling";
110 LOG_ECMA(ERROR) << "CpuProfiler::StartCpuProfilerForInfo, pthread_create failed, errno = " << errno;
119 bool CpuProfiler::StartCpuProfilerForFile(const std::string &fileName)
121 LOG_ECMA(INFO) << "CpuProfiler::StartCpuProfilerForFile, sampling interval = " << interval_;
123 LOG_ECMA(ERROR) << "CpuProfiler::StartCpuProfilerForFile, can not start when CpuProfiler is Profiling";
134 LOG_ECMA(ERROR) << "CpuProfiler::StartCpuProfilerForFile, fileHandle_ open failed";
168 LOG_ECMA(ERROR) << "CpuProfiler::StartCpuProfilerForFile, pthread_create failed, errno = " << errno;
177 bool CpuProfiler::StopCpuProfilerForInfo(std::unique_ptr<struct ProfileInfo> &profileInfo)
179 LOG_ECMA(INFO) << "CpuProfiler::StopCpuProfilerForInfo enter";
181 LOG_ECMA(WARN) << "CpuProfiler::StopCpuProfilerForInfo, not isProfiling_";
185 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForInfo, is outToFile_";
190 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForInfo, sem_[0] post failed, errno = " << errno;
194 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForInfo, sem_[1] wait failed, errno = " << errno;
203 void CpuProfiler::SetCpuSamplingInterval(int interval)
208 bool CpuProfiler::StopCpuProfilerForFile()
210 LOG_ECMA(INFO) << "CpuProfiler::StopCpuProfilerForFile enter";
212 LOG_ECMA(WARN) << "CpuProfiler::StopCpuProfilerForFile, not isProfiling_";
216 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForFile, not outToFile_";
221 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForFile, sem_[0] post failed, errno = " << errno;
225 LOG_ECMA(ERROR) << "CpuProfiler::StopCpuProfilerForFile, sem_[1] wait failed, errno = " << errno;
236 CpuProfiler::~CpuProfiler()
257 void CpuProfiler::GetStack(FrameIterator &it)
300 bool CpuProfiler::GetStackBeforeCallNapi(JSThread *thread)
314 void CpuProfiler::GetStackAfterCallNapi(JSThread *thread)
319 bool CpuProfiler::GetStackCallNapi(JSThread *thread, bool beforeCallNapi)
374 void CpuProfiler::GetStackSignalHandler(int signal, [[maybe_unused]] siginfo_t *siginfo, void *context)
379 CpuProfiler *profiler = nullptr;
387 LOG_ECMA(ERROR) << "CpuProfiler GetStackSignalHandler vm is nullptr";
393 LOG_ECMA(ERROR) << "CpuProfiler GetStackSignalHandler profiler is nullptr";
469 bool CpuProfiler::InHeaderOrTail(uint64_t pc, uint64_t entryBegin, uint64_t entryDuration, uint64_t headerSize,
482 bool CpuProfiler::IsEntryFrameHeaderOrTail(JSThread *thread, uint64_t pc) const
495 uint64_t CpuProfiler::GetPcFromContext(void *context)
511 bool CpuProfiler::IsAddrAtStubOrAot(uint64_t pc) const
517 bool CpuProfiler::CheckFileName(const std::string &fileName, std::string &absoluteFilePath) const
520 LOG_ECMA(ERROR) << "CpuProfiler::CheckFileName, fileName is empty";
525 LOG_ECMA(ERROR) << "CpuProfiler::CheckFileName, fileName exceed PATH_MAX";
532 LOG_ECMA(ERROR) << "CpuProfiler::CheckFileName, realpath fail, errno = " << errno;
537 LOG_ECMA(ERROR) << "CpuProfiler::CheckFileName, file is not good, errno = " << errno;
545 void CpuProfiler::SetBuildNapiStack(bool flag)
550 bool CpuProfiler::GetBuildNapiStack()
555 bool CpuProfiler::GetOutToFile()
560 EcmaVM* CpuProfiler::GetVmbyTid(pthread_t tid)