Lines Matching refs:item
55 for (const auto& item : hookCtx_) {
56 if (item->eventPoller != nullptr) {
57 item->eventPoller = nullptr;
59 if (item->shareMemoryBlock != nullptr) {
60 item->shareMemoryBlock = nullptr;
62 if (item->stackPreprocess != nullptr) {
63 item->stackPreprocess = nullptr;
65 if (item->stackData != nullptr) {
66 item->stackData = nullptr;
138 for (const auto& item : hookCtx_) {
139 if (item->pid == pidValue) {
424 for (const auto& item : hookCtx_) {
425 CHECK_TRUE(HandleHookContext(item), false, "handle hook context failed"); // Create the required resources.
561 for (const auto& item : hookCtx_) {
562 if (item->eventPoller != nullptr) {
564 if (item->eventNotifier != nullptr) {
565 item->eventPoller->RemoveFileDescriptor(item->eventNotifier->GetFd());
567 item->eventPoller->Stop();
568 item->eventPoller->Finalize();
570 if (item->shareMemoryBlock != nullptr) {
571 ShareMemoryAllocator::GetInstance().ReleaseMemoryBlockLocal(item->smbName);
573 if (item->stackData != nullptr) {
574 item->stackData->ClearCache();
610 for (const auto& item : hookCtx_) {
611 if (item->pid > 0) {
612 PROFILER_LOG_INFO(LOG_CORE, "stop command : send 37 signal to process %d", item->pid);
613 if (kill(item->pid, SIGNAL_STOP_HOOK) == -1) {
617 PROFILER_LOG_ERROR(LOG_CORE, "send 37 signal to process %d , error = %s", item->pid, buf);
620 PROFILER_LOG_INFO(LOG_CORE, "StopPluginSession: pid(%d) is less or equal zero.", item->pid);
622 CHECK_TRUE(item->stackPreprocess != nullptr, false, "stop StackPreprocess FAIL");
623 item->stackPreprocess->StopTakeResults();
626 item->stackPreprocess->FlushRecordStatistics();
629 item->stackPreprocess->FlushRecordApplyAndReleaseMatchData();
631 if (item->stackData != nullptr) {
632 item->stackData->Close();
634 item->stackPreprocess->FinishTraceFile();
744 for (const auto& item : hookCtx_) {
745 if (item->stackPreprocess == nullptr) {
748 PROFILER_LOG_ERROR(LOG_CORE, "StartPluginSession name: %s", item->processName.c_str());
750 item->stackPreprocess->StartTakeResults();
752 item->stackPreprocess->InitStatisticsTime();
753 if (item->pid > 0) {
754 PROFILER_LOG_INFO(LOG_CORE, "start command : send 36 signal to process %d", item->pid);
755 if (kill(item->pid, SIGNAL_START_HOOK) == -1) {
762 PROFILER_LOG_INFO(LOG_CORE, "StartPluginSession: pid(%d) is less or equal zero.", item->pid);
769 for (const auto& item : hookCtx_) {
770 if (item == nullptr) {
774 item->stackPreprocess->WriteHookConfig();
780 for (const auto& item : hookCtx_) {
781 if (item->pid == pid || item->processName == name) {
782 if (item->pid == -1) {
783 item->pid = pid;
785 item->stackPreprocess->SetPid(pid);
786 return {item->eventNotifier->GetFd(), item->shareMemoryBlock->GetfileDescriptor()};