Lines Matching full:if
37 if (generator_->SemInit(0, 0, 0) != 0) { in CpuProfiler()
40 if (generator_->SemInit(1, 0, 0) != 0) { in CpuProfiler()
43 if (generator_->SemInit(2, 0, 0) != 0) { // 2: signal 2 in CpuProfiler()
52 if (isProfiling_) { in StartCpuProfilerForInfo()
59 if (sigemptyset(&sa.sa_mask) != 0) { in StartCpuProfilerForInfo()
65 if (sigaction(SIGPROF, &sa, nullptr) != 0) { in StartCpuProfilerForInfo()
85 if (isProfiling_) { in StartCpuProfilerForFile()
91 if (!CheckFileName(fileName, absoluteFilePath)) { in StartCpuProfilerForFile()
97 if (fileName_.empty()) { in StartCpuProfilerForFile()
104 if (generator_->fileHandle_.fail()) { in StartCpuProfilerForFile()
111 if (sigemptyset(&sa.sa_mask) != 0) { in StartCpuProfilerForFile()
117 if (sigaction(SIGPROF, &sa, nullptr) != 0) { in StartCpuProfilerForFile()
138 if (!isProfiling_) { in StopCpuProfilerForInfo()
143 if (outToFile_) { in StopCpuProfilerForInfo()
151 if (generator_->SemPost(0) != 0) { in StopCpuProfilerForInfo()
155 if (generator_->SemWait(1) != 0) { in StopCpuProfilerForInfo()
176 if (!isProfiling_) { in StopCpuProfilerForFile()
182 if (!outToFile_) { in StopCpuProfilerForFile()
192 if (generator_->SemPost(0) != 0) { in StopCpuProfilerForFile()
196 if (generator_->SemWait(1) != 0) { in StopCpuProfilerForFile()
207 if (generator_->SemDestroy(0) != 0) { in ~CpuProfiler()
210 if (generator_->SemDestroy(1) != 0) { in ~CpuProfiler()
213 if (generator_->SemDestroy(2) != 0) { // 2: signal 2 in ~CpuProfiler()
216 if (generator_ != nullptr) { in ~CpuProfiler()
249 if (syscall(SYS_gettid) == -1) { in GetCurrentProcessInfo()
262 if (topFrame && function->IsCallNapi()) { in GetRunningState()
265 if (topFrame && thread->GetGcState()) { in GetRunningState()
269 if (function->IsCallNapi()) { in GetRunningState()
273 if (extraInfoValue.IsJSNativePointer() || jsPandaFile == nullptr) { in GetRunningState()
274 if (extraInfoValue.IsJSNativePointer()) { in GetRunningState()
279 if (it.IsLeaveFrame()) { in GetRunningState()
282 if (it.IsOptimizedJSFunctionFrame()) { in GetRunningState()
285 if (topFrame && thread->GetRuntimeState()) { in GetRunningState()
288 if (thread->IsAsmInterpreter()) { in GetRunningState()
301 if (method == nullptr) { in GetStack()
307 if (topFrame) { in GetStack()
314 if (methodIdentifier == nullptr) { in GetStack()
319 if (stackInfo.count(methodKey) == 0) { in GetStack()
320 if (UNLIKELY(!ParseMethodInfo(methodKey, it, jsPandaFile, false))) { in GetStack()
325 if (UNLIKELY(!generator_->PushFrameStack(methodKey))) { in GetStack()
336 if (beforeCallNapi) { in GetStackCallNapi()
337 if (tempTimeStamp - beforeCallNapiTimeStamp_ < INTERVAL_OF_ACTIVE_SAMPLING) { in GetStackCallNapi()
343 if (tempTimeStamp - beforeCallNapiTimeStamp_ < CPUPROFILER_DEFAULT_INTERVAL) { in GetStackCallNapi()
353 if (!beforeCallNapi) { in GetStackCallNapi()
358 if (method == nullptr) { in GetStackCallNapi()
364 if (topFrame) { in GetStackCallNapi()
365 if (beforeCallNapi) { in GetStackCallNapi()
375 if (methodIdentifier == nullptr) { in GetStackCallNapi()
379 if (stackInfo.count(methodKey) == 0) { in GetStackCallNapi()
380 if (UNLIKELY(!ParseMethodInfo(methodKey, it, method->GetJSPandaFile(), true))) { in GetStackCallNapi()
384 if (UNLIKELY(!generator_->PushNapiFrameStack(methodKey))) { in GetStackCallNapi()
400 if (extraInfoValue.CheckIsJSNativePointer() || jsPandaFile == nullptr) { in ParseMethodInfo()
401 if (!CheckAndCopy(codeEntry.codeType, sizeof(codeEntry.codeType), "other")) { in ParseMethodInfo()
409 if (!CheckAndCopy(codeEntry.codeType, sizeof(codeEntry.codeType), "JS")) { in ParseMethodInfo()
415 if (length != 0 && tempVariable[0] == '#') { in ParseMethodInfo()
422 if (strlen(tempVariable) == 0) { in ParseMethodInfo()
425 if (!CheckAndCopy(codeEntry.functionName, sizeof(codeEntry.functionName), tempVariable)) { in ParseMethodInfo()
433 if (sourceFile.empty()) { in ParseMethodInfo()
438 if (!CheckAndCopy(codeEntry.url, sizeof(codeEntry.url), tempVariable)) { in ParseMethodInfo()
447 if (isCallNapi) { in ParseMethodInfo()
464 if (funcNameValue->IsString()) { in GetNativeStack()
469 if (function->IsCallNapi() && extraInfoValue.CheckIsJSNativePointer()) { in GetNativeStack()
472 if (cb != nullptr && extraInfo != nullptr) { in GetNativeStack()
473 if (!vm_->GetJSThread()->CpuProfilerCheckJSTaggedType(extraInfoValue.GetRawData())) { in GetNativeStack()
495 if (signal != SIGPROF) { in GetStackSignalHandler()
504 if (vm == nullptr) { in GetStackSignalHandler()
510 if (profiler == nullptr) { in GetStackSignalHandler()
516 if (profiler->GetBuildNapiStack()) { in GetStackSignalHandler()
517 if (profiler->generator_->SemPost(0) != 0) { in GetStackSignalHandler()
524 if (thread->IsAsmInterpreter()) { in GetStackSignalHandler()
525 …// If the attempt fails, the callback will be terminated directly to avoid the reentrancy deadlock, in GetStackSignalHandler()
528 if (!thread->GetEcmaVM()->GetAOTFileManager()->TryReadLock()) { in GetStackSignalHandler()
529 if (profiler->generator_->SemPost(0) != 0) { in GetStackSignalHandler()
536 if (thread->IsAsmInterpreter() && profiler->IsAddrAtStubOrAot(pc) && in GetStackSignalHandler()
542 #if defined(PANDA_TARGET_AMD64) in GetStackSignalHandler()
552 if (reinterpret_cast<uint64_t*>(sp) > reinterpret_cast<uint64_t*>(fp)) { in GetStackSignalHandler()
554 if (profiler->generator_->SemPost(0) != 0) { in GetStackSignalHandler()
560 if (profiler->CheckFrameType(thread, reinterpret_cast<JSTaggedType *>(fp))) { in GetStackSignalHandler()
564 } else if (thread->IsAsmInterpreter()) { in GetStackSignalHandler()
565 if (thread->GetLastLeaveFrame() != nullptr) { in GetStackSignalHandler()
567 if (profiler->CheckFrameType(thread, leaveFrame)) { in GetStackSignalHandler()
573 if (thread->GetCurrentFrame() != nullptr) { in GetStackSignalHandler()
574 … if (profiler->CheckFrameType(thread, const_cast<JSTaggedType *>(thread->GetCurrentFrame()))) { in GetStackSignalHandler()
581 if (profiler->generator_->SemPost(0) != 0) { in GetStackSignalHandler()
590 if (type > FrameType::FRAME_TYPE_LAST || type < FrameType::FRAME_TYPE_FIRST) { in CheckFrameType()
597 if (preSp == nullptr) { in CheckFrameType()
600 #if defined(PANDA_TARGET_64) in CheckFrameType()
601 if (thread->IsAsmInterpreter() && !thread->IsLegalSp(reinterpret_cast<uintptr_t>(preSp))) { in CheckFrameType()
606 if (type > FrameType::FRAME_TYPE_LAST || type < FrameType::FRAME_TYPE_FIRST) { in CheckFrameType()
616 if (pc >= entryBegin && pc <= (entryBegin + headerSize)) { in InHeaderOrTail()
619 if (pc <= entryEnd && pc >= (entryEnd - tailSize)) { in InHeaderOrTail()
643 #if defined(PANDA_TARGET_AMD64) in GetPcFromContext()
662 if (fileName.empty()) { in CheckFileName()
666 if (fileName.size() > PATH_MAX) { in CheckFileName()
672 if (result == nullptr) { in CheckFileName()
677 if (!file.good()) { in CheckFileName()
688 if (length <= static_cast<size_t>(srcLength) || strcpy_s(dest, srcLength + 1, src) != EOK) { in CheckAndCopy()
700 if (extraInfoValue.CheckIsJSNativePointer()) { in GetMethodIdentifier()
705 if (method->GetJSPandaFile() == nullptr) { in GetMethodIdentifier()
723 if (nextMethod == nullptr) { in GetNativeMethodCallPos()
728 if (!extraInfoValue.IsJSNativePointer() && nextMethod->GetJSPandaFile() != nullptr) { in GetNativeMethodCallPos()
734 if (sourceFile.empty()) { in GetNativeMethodCallPos()
739 if (!CheckAndCopy(codeEntry.url, sizeof(codeEntry.url), tempVariable)) { in GetNativeMethodCallPos()
753 if (!debugExtractor->MatchLineWithOffset(callbackLineFunc, methodId, offset)) { in GetNativeMethodCallPos()
756 if (!debugExtractor->MatchColumnWithOffset(callbackColumnFunc, methodId, offset)) { in GetNativeMethodCallPos()