• Home
  • Raw
  • Download

Lines Matching defs:pid

532  * trace_find_filtered_pid - check if a pid exists in a filtered_pid list
560 * If filtered_no_pids is not empty, and the task's pid is listed
568 !trace_find_filtered_pid(filtered_pids, task->pid)) ||
570 trace_find_filtered_pid(filtered_no_pids, task->pid));
582 * @task pid will be removed from the list, which would happen on exit
594 if (!trace_find_filtered_pid(pid_list, self->pid))
600 trace_pid_list_set(pid_list, task->pid);
602 trace_pid_list_clear(pid_list, task->pid);
606 * trace_pid_next - Used for seq_file to get to the next pid of a pid_list
607 * @pid_list: The pid list to show
608 * @v: The last pid that was shown (+1 the actual pid to let zero be displayed)
614 * Returns the pid+1 as we want to display pid of zero, but NULL would
619 long pid = (unsigned long)v;
624 /* pid already is +1 of the actual previous bit */
625 if (trace_pid_list_next(pid_list, pid, &next) < 0)
628 pid = next;
630 /* Return pid + 1 to allow zero to be represented */
631 return (void *)(pid + 1);
635 * trace_pid_start - Used for seq_file to start reading pid lists
636 * @pid_list: The pid list to show
642 * Returns the pid+1 as we want to display pid of zero, but NULL would
647 unsigned long pid;
654 pid = first;
656 /* Return pid + 1 so that zero can be the exit value */
657 for (pid++; pid && l < *pos;
658 pid = (unsigned long)trace_pid_next(pid_list, (void *)pid, &l))
660 return (void *)pid;
664 * trace_pid_show - show the current pid in seq_file processing
666 * @v: A void pointer of the pid (+1) value to display
669 * pid value.
673 unsigned long pid = (unsigned long)v - 1;
675 seq_printf(m, "%lu\n", pid);
693 pid_t pid;
712 ret = trace_pid_list_first(filtered_pids, &pid);
714 trace_pid_list_set(pid_list, pid);
715 ret = trace_pid_list_next(filtered_pids, pid + 1, &pid);
740 pid = (pid_t)val;
742 if (trace_pid_list_set(pid_list, pid) < 0) {
1792 max_data->pid = tsk->pid;
2233 * The tgid_map array maps from pid to tgid; i.e. the value stored at index i
2234 * is the tgid last observed corresponding to pid=i.
2421 if (!tsk->pid)
2424 tpid = tsk->pid & (PID_MAX_DEFAULT - 1);
2447 savedcmd->map_cmdline_to_pid[idx] = tsk->pid;
2455 static void __trace_find_cmdline(int pid, char comm[])
2460 if (!pid) {
2465 if (WARN_ON_ONCE(pid < 0)) {
2470 tpid = pid & (PID_MAX_DEFAULT - 1);
2474 if (tpid == pid) {
2482 void trace_find_cmdline(int pid, char comm[])
2487 __trace_find_cmdline(pid, comm);
2493 static int *trace_find_tgid_ptr(int pid)
2502 if (unlikely(!map || pid > tgid_map_max))
2505 return &map[pid];
2508 int trace_find_tgid(int pid)
2510 int *ptr = trace_find_tgid_ptr(pid);
2520 if (!tsk->pid)
2523 ptr = trace_find_tgid_ptr(tsk->pid);
4251 "# cmd pid |||||| time | caller \n"
4334 data->comm, data->pid,
4422 entry->pid, iter->cpu, iter->ts);
4447 SEQ_PUT_HEX_FIELD(s, entry->pid);
4476 SEQ_PUT_FIELD(s, entry->pid);
5564 " saved_cmdlines_size\t- echo command number in here to store comm-pid list\n"
5604 " set_ftrace_pid\t- Write pid(s) to only function trace those pids\n"
5606 " set_ftrace_notrace_pid\t- Write pid(s) to not function trace those pids\n"
5825 int pid = ++(*pos);
5827 return trace_find_tgid_ptr(pid);
5832 int pid = *pos;
5834 return trace_find_tgid_ptr(pid);
5844 int pid = entry - tgid_map;
5850 seq_printf(m, "%d %d\n", pid, tgid);
5927 unsigned int *pid = v;
5929 __trace_find_cmdline(*pid, buf);
5930 seq_printf(m, "%d %s\n", *pid, buf);