Lines Matching refs:procp
700 bool llkSkipProc(proc* procp, in llkSkipProc() argument
702 if (!procp) return false; in llkSkipProc()
703 if (llkSkipName(std::to_string(procp->pid), blacklist)) return true; in llkSkipProc()
704 if (llkSkipName(procp->getComm(), blacklist)) return true; in llkSkipProc()
705 if (llkSkipName(procp->getCmdline(), blacklist)) return true; in llkSkipProc()
706 if (llkSkipName(android::base::Basename(procp->getCmdline()), blacklist)) return true; in llkSkipProc()
720 bool llkSkipPproc(proc* pprocp, proc* procp, in llkSkipPproc() argument
723 if (!pprocp || !procp || blacklist.empty()) return false; in llkSkipPproc()
724 if (llkSkipProc(procp, llkSkipName(std::to_string(pprocp->pid), blacklist))) return true; in llkSkipPproc()
725 if (llkSkipProc(procp, llkSkipName(pprocp->getComm(), blacklist))) return true; in llkSkipPproc()
726 if (llkSkipProc(procp, llkSkipName(pprocp->getCmdline(), blacklist))) return true; in llkSkipPproc()
727 return llkSkipProc(procp, in llkSkipPproc()
797 bool llkCheckStack(proc* procp, const std::string& piddir) { in llkCheckStack() argument
799 if (procp->state == 'Z') { // No brains for Zombies in llkCheckStack()
800 procp->stack = -1; in llkCheckStack()
801 procp->count_stack = 0ms; in llkCheckStack()
806 if (llkSkipProc(procp, llkBlacklistStack)) return false; in llkCheckStack()
809 LOG(VERBOSE) << piddir << "/stack empty comm=" << procp->getComm() in llkCheckStack()
810 << " cmdline=" << procp->getCmdline(); in llkCheckStack()
827 if (procp->stack != match) { in llkCheckStack()
828 procp->stack = match; in llkCheckStack()
829 procp->count_stack = 0ms; in llkCheckStack()
833 procp->count_stack += llkCycle; in llkCheckStack()
834 if (procp->count_stack < llkStateTimeoutMs[llkStateStack]) return false; in llkCheckStack()
835 LOG(WARNING) << "Found " << matched_stack_symbol << " in stack for pid " << procp->pid; in llkCheckStack()
841 void llkCheckSchedUpdate(proc* procp, const std::string& piddir) { in llkCheckSchedUpdate() argument
863 (val != procp->nrSwitches)) { in llkCheckSchedUpdate()
864 procp->nrSwitches = val; in llkCheckSchedUpdate()
865 procp->count = 0ms; in llkCheckSchedUpdate()
866 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
877 if (schedUpdate != procp->schedUpdate) { in llkCheckSchedUpdate()
878 procp->schedUpdate = schedUpdate; in llkCheckSchedUpdate()
879 procp->count = 0ms; in llkCheckSchedUpdate()
880 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
886 if (static_cast<uint64_t>(val) != procp->nrSwitches) { in llkCheckSchedUpdate()
887 procp->nrSwitches = val; in llkCheckSchedUpdate()
888 procp->count = 0ms; in llkCheckSchedUpdate()
889 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
1042 auto procp = llkTidLookup(tid); in llkCheck() local
1043 if (procp == nullptr) { in llkCheck()
1044 procp = llkTidAlloc(tid, pid, ppid, pdir, utime + stime, state); in llkCheck()
1047 procp->setComm(pdir); in llkCheck()
1048 procp->updated = true; in llkCheck()
1050 if (((procp->update != prevUpdate) && (procp->update != llkUpdate)) || in llkCheck()
1051 (procp->ppid != ppid) || (procp->pid != pid)) { in llkCheck()
1052 procp->reset(); in llkCheck()
1053 } else if (procp->time != (utime + stime)) { // secondary ABA. in llkCheck()
1055 procp->state = '?'; in llkCheck()
1057 procp->update = llkUpdate; in llkCheck()
1058 procp->pid = pid; in llkCheck()
1059 procp->ppid = ppid; in llkCheck()
1060 procp->time = utime + stime; in llkCheck()
1061 if (procp->state != state) { in llkCheck()
1062 procp->count = 0ms; in llkCheck()
1063 procp->killed = !llkTestWithKill; in llkCheck()
1064 procp->state = state; in llkCheck()
1066 procp->count += llkCycle; in llkCheck()
1091 auto process_comm = procp->getComm(); in llkCheck()
1095 if (llkSkipName(procp->getCmdline())) { in llkCheck()
1098 if (llkSkipName(android::base::Basename(procp->getCmdline()))) { in llkCheck()
1107 if (llkSkipPproc(pprocp, procp)) break; in llkCheck()
1113 if ((llkBlacklistUid.size() != 0) && llkSkipUid(procp->getUid())) { in llkCheck()
1118 llkCheckSchedUpdate(procp, piddir); in llkCheck()
1121 auto stuck = llkCheckStack(procp, piddir); in llkCheck()
1123 if (procp->count >= llkStateTimeoutMs[(state == 'Z') ? llkStateZ : llkStateD]) { in llkCheck()
1125 } else if (procp->count != 0ms) { in llkCheck()
1126 LOG(VERBOSE) << state << ' ' << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1132 if (procp->count >= llkStateTimeoutMs[(state == 'Z') ? llkStateZ : llkStateD]) { in llkCheck()
1133 if (procp->count != 0ms) { in llkCheck()
1134 LOG(VERBOSE) << state << ' ' << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1150 if (procp->killed == false) { in llkCheck()
1151 procp->killed = true; in llkCheck()
1153 procp->uid = -1; in llkCheck()
1162 LOG(WARNING) << "Z " << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1164 if ((llkKillOneProcess(pprocp, procp) >= 0) || in llkCheck()
1165 (llkKillOneProcess(ppid, procp) >= 0)) { in llkCheck()
1179 LOG(WARNING) << state << ' ' << llkFormat(procp->count) << ' ' << pid in llkCheck()
1181 if ((llkKillOneProcess(llkTidLookup(pid), procp) >= 0) || in llkCheck()
1183 (llkKillOneProcess(procp, procp) >= 0) || in llkCheck()
1191 const auto message = state + " "s + llkFormat(procp->count) + " " + in llkCheck()