Lines Matching refs:procp

708 bool llkSkipProc(proc* procp,  in llkSkipProc()  argument
710 if (!procp) return false; in llkSkipProc()
711 if (llkSkipName(std::to_string(procp->pid), ignorelist)) return true; in llkSkipProc()
712 if (llkSkipName(procp->getComm(), ignorelist)) return true; in llkSkipProc()
713 if (llkSkipName(procp->getCmdline(), ignorelist)) return true; in llkSkipProc()
714 if (llkSkipName(android::base::Basename(procp->getCmdline()), ignorelist)) return true; in llkSkipProc()
728 bool llkSkipPproc(proc* pprocp, proc* procp, in llkSkipPproc() argument
731 if (!pprocp || !procp || ignorelist.empty()) return false; in llkSkipPproc()
732 if (llkSkipProc(procp, llkSkipName(std::to_string(pprocp->pid), ignorelist))) return true; in llkSkipPproc()
733 if (llkSkipProc(procp, llkSkipName(pprocp->getComm(), ignorelist))) return true; in llkSkipPproc()
734 if (llkSkipProc(procp, llkSkipName(pprocp->getCmdline(), ignorelist))) return true; in llkSkipPproc()
735 return llkSkipProc(procp, in llkSkipPproc()
805 bool llkCheckStack(proc* procp, const std::string& piddir) { in llkCheckStack() argument
807 if (procp->state == 'Z') { // No brains for Zombies in llkCheckStack()
808 procp->stack = -1; in llkCheckStack()
809 procp->count_stack = 0ms; in llkCheckStack()
814 if (llkSkipProc(procp, llkIgnorelistStack)) return false; in llkCheckStack()
817 LOG(VERBOSE) << piddir << "/stack empty comm=" << procp->getComm() in llkCheckStack()
818 << " cmdline=" << procp->getCmdline(); in llkCheckStack()
835 if (procp->stack != match) { in llkCheckStack()
836 procp->stack = match; in llkCheckStack()
837 procp->count_stack = 0ms; in llkCheckStack()
841 procp->count_stack += llkCycle; in llkCheckStack()
842 if (procp->count_stack < llkStateTimeoutMs[llkStateStack]) return false; in llkCheckStack()
843 LOG(WARNING) << "Found " << matched_stack_symbol << " in stack for pid " << procp->pid; in llkCheckStack()
849 void llkCheckSchedUpdate(proc* procp, const std::string& piddir) { in llkCheckSchedUpdate() argument
871 (val != procp->nrSwitches)) { in llkCheckSchedUpdate()
872 procp->nrSwitches = val; in llkCheckSchedUpdate()
873 procp->count = 0ms; in llkCheckSchedUpdate()
874 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
885 if (schedUpdate != procp->schedUpdate) { in llkCheckSchedUpdate()
886 procp->schedUpdate = schedUpdate; in llkCheckSchedUpdate()
887 procp->count = 0ms; in llkCheckSchedUpdate()
888 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
894 if (static_cast<uint64_t>(val) != procp->nrSwitches) { in llkCheckSchedUpdate()
895 procp->nrSwitches = val; in llkCheckSchedUpdate()
896 procp->count = 0ms; in llkCheckSchedUpdate()
897 procp->killed = !llkTestWithKill; in llkCheckSchedUpdate()
1054 auto procp = llkTidLookup(tid); in llkCheck() local
1055 if (procp == nullptr) { in llkCheck()
1056 procp = llkTidAlloc(tid, pid, ppid, pdir, utime + stime, state, frozen); in llkCheck()
1059 procp->setComm(pdir); in llkCheck()
1061 procp->setFrozen(frozen); in llkCheck()
1062 procp->updated = true; in llkCheck()
1064 if (((procp->update != prevUpdate) && (procp->update != llkUpdate)) || in llkCheck()
1065 (procp->ppid != ppid) || (procp->pid != pid)) { in llkCheck()
1066 procp->reset(); in llkCheck()
1067 } else if (procp->time != (utime + stime)) { // secondary ABA. in llkCheck()
1069 procp->state = '?'; in llkCheck()
1071 procp->update = llkUpdate; in llkCheck()
1072 procp->pid = pid; in llkCheck()
1073 procp->ppid = ppid; in llkCheck()
1074 procp->time = utime + stime; in llkCheck()
1075 if (procp->state != state) { in llkCheck()
1076 procp->count = 0ms; in llkCheck()
1077 procp->killed = !llkTestWithKill; in llkCheck()
1078 procp->state = state; in llkCheck()
1080 procp->count += llkCycle; in llkCheck()
1101 if (procp->isFrozen()) { in llkCheck()
1108 auto process_comm = procp->getComm(); in llkCheck()
1112 if (llkSkipName(procp->getCmdline())) { in llkCheck()
1115 if (llkSkipName(android::base::Basename(procp->getCmdline()))) { in llkCheck()
1124 if (llkSkipPproc(pprocp, procp)) break; in llkCheck()
1130 if ((llkIgnorelistUid.size() != 0) && llkSkipUid(procp->getUid())) { in llkCheck()
1135 llkCheckSchedUpdate(procp, piddir); in llkCheck()
1138 auto stuck = llkCheckStack(procp, piddir); in llkCheck()
1140 if (procp->count >= llkStateTimeoutMs[(state == 'Z') ? llkStateZ : llkStateD]) { in llkCheck()
1142 } else if (procp->count != 0ms) { in llkCheck()
1143 LOG(VERBOSE) << state << ' ' << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1149 if (procp->count >= llkStateTimeoutMs[(state == 'Z') ? llkStateZ : llkStateD]) { in llkCheck()
1150 if (procp->count != 0ms) { in llkCheck()
1151 LOG(VERBOSE) << state << ' ' << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1167 if (procp->killed == false) { in llkCheck()
1168 procp->killed = true; in llkCheck()
1170 procp->uid = -1; in llkCheck()
1179 LOG(WARNING) << "Z " << llkFormat(procp->count) << ' ' << ppid << "->" in llkCheck()
1181 if ((llkKillOneProcess(pprocp, procp) >= 0) || in llkCheck()
1182 (llkKillOneProcess(ppid, procp) >= 0)) { in llkCheck()
1196 LOG(WARNING) << state << ' ' << llkFormat(procp->count) << ' ' << pid in llkCheck()
1198 if ((llkKillOneProcess(llkTidLookup(pid), procp) >= 0) || in llkCheck()
1200 (llkKillOneProcess(procp, procp) >= 0) || in llkCheck()
1216 const auto message = state + " "s + llkFormat(procp->count) + " " + in llkCheck()