Lines Matching refs:pid
21 * /proc/${pid}/maps
22 * /proc/${pid}/numa_maps
23 * /proc/${pid}/smaps
24 * /proc/${pid}/smaps_rollup
138 pid_t pid;
141 pid = fork();
142 if (pid < 0) {
146 if (pid == 0) {
171 waitpid(pid, &wstatus, 0);
181 static int test_proc_pid_maps(pid_t pid)
184 snprintf(buf, sizeof(buf), "/proc/%u/maps", pid);
187 perror("open /proc/${pid}/maps");
203 static int test_proc_pid_numa_maps(pid_t pid)
206 snprintf(buf, sizeof(buf), "/proc/%u/numa_maps", pid);
211 * /proc/${pid}/numa_maps is under CONFIG_NUMA,
216 perror("open /proc/${pid}/numa_maps");
226 static int test_proc_pid_smaps(pid_t pid)
229 snprintf(buf, sizeof(buf), "/proc/%u/smaps", pid);
234 * /proc/${pid}/smaps is under CONFIG_PROC_PAGE_MONITOR,
239 perror("open /proc/${pid}/smaps");
282 static int test_proc_pid_smaps_rollup(pid_t pid)
285 snprintf(buf, sizeof(buf), "/proc/%u/smaps_rollup", pid);
290 * /proc/${pid}/smaps_rollup is under CONFIG_PROC_PAGE_MONITOR,
295 perror("open /proc/${pid}/smaps_rollup");
331 pid_t pid = fork();
332 if (pid == -1) {
335 } else if (pid == 0) {
381 rv = test_proc_pid_maps(pid);
384 rv = test_proc_pid_numa_maps(pid);
387 rv = test_proc_pid_smaps(pid);
390 rv = test_proc_pid_smaps_rollup(pid);
393 * TODO test /proc/${pid}/statm, task_statm()
400 waitpid(pid, &wstatus, 0);