Lines Matching refs:pid

40     int pid;  member
63 static struct proc* pid_lookup(int pid) { in pid_lookup() argument
68 for (procp = pidhash[pid_hashfn(pid)]; procp && procp->pid != pid; procp = procp->pidhash_next) in pid_lookup()
101 int stats_write_lmk_kill_occurred_pid(int32_t uid, int pid, int32_t oom_score, in stats_write_lmk_kill_occurred_pid() argument
104 struct proc* proc = pid_lookup(pid); in stats_write_lmk_kill_occurred_pid()
133 static int memory_stat_from_cgroup(struct memory_stat* mem_st, int pid, uid_t uid) { in memory_stat_from_cgroup() argument
137 snprintf(buf, sizeof(buf), MEMCG_PROCESS_MEMORY_STAT_PATH, uid, pid); in memory_stat_from_cgroup()
153 static int memory_stat_from_procfs(struct memory_stat* mem_st, int pid) { in memory_stat_from_procfs() argument
158 snprintf(path, sizeof(path), PROC_STAT_FILE_PATH, pid); in memory_stat_from_procfs()
190 struct memory_stat *stats_read_memory_stat(bool per_app_memcg, int pid, uid_t uid) { in stats_read_memory_stat() argument
198 if (memory_stat_from_cgroup(&mem_st, pid, uid) == 0) { in stats_read_memory_stat()
202 if (memory_stat_from_procfs(&mem_st, pid) == 0) { in stats_read_memory_stat()
215 int hval = pid_hashfn(procp->pid); in proc_insert()
220 void stats_remove_taskname(int pid) { in stats_remove_taskname() argument
225 int hval = pid_hashfn(pid); in stats_remove_taskname()
229 for (procp = pidhash[hval], prevp = NULL; procp && procp->pid != pid; in stats_remove_taskname()
244 void stats_store_taskname(int pid, const char* taskname) { in stats_store_taskname() argument
249 struct proc* procp = pid_lookup(pid); in stats_store_taskname()
254 stats_remove_taskname(pid); in stats_store_taskname()
257 procp->pid = pid; in stats_store_taskname()