/linux-5.10/include/linux/ |
D | pid.h | 19 * What is struct pid? 21 * A struct pid is the kernel's internal notion of a process identifier. 23 * there are processes attached to it the struct pid lives in a hash 25 * quickly from the numeric pid value. The attached processes may be 26 * quickly accessed by following pointers from struct pid. 29 * problem. The process originally with that pid may have exited and the 30 * pid allocator wrapped, and another process could have come along 31 * and been assigned that pid. 38 * a struct pid is about 64 bytes. 40 * Holding a reference to struct pid solves both of these problems. [all …]
|
/linux-5.10/kernel/ |
D | pid.c | 3 * Generic pidhash and scalable, time-bounded PID allocator 9 * pid-structures are backing objects for tasks sharing a given ID to chain 17 * We have a list of bitmap pages, which bitmaps represent the PID space. 23 * Pid namespaces: 48 struct pid init_struct_pid = { 70 * PID-map pages start out as NULL, they get allocated upon 105 void put_pid(struct pid *pid) in put_pid() argument 109 if (!pid) in put_pid() 112 ns = pid->numbers[pid->level].ns; in put_pid() 113 if (refcount_dec_and_test(&pid->count)) { in put_pid() [all …]
|
/linux-5.10/include/trace/events/ |
D | oom.h | 17 __field( pid_t, pid) 23 __entry->pid = task->pid; 28 TP_printk("pid=%d comm=%s oom_score_adj=%hd", 29 __entry->pid, __entry->comm, __entry->oom_score_adj) 75 TP_PROTO(int pid), 77 TP_ARGS(pid), 80 __field(int, pid) 84 __entry->pid = pid; 87 TP_printk("pid=%d", __entry->pid) 91 TP_PROTO(int pid), [all …]
|
D | sched.h | 23 __field( pid_t, pid ) 28 __entry->pid = t->pid; 31 TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) 65 __field( pid_t, pid ) 73 __entry->pid = p->pid; 79 TP_printk("comm=%s pid=%d prio=%d target_cpu=%03d", 80 __entry->comm, __entry->pid, __entry->prio, 158 __entry->prev_pid = prev->pid; 162 __entry->next_pid = next->pid; 197 __field( pid_t, pid ) [all …]
|
/linux-5.10/arch/x86/um/os-Linux/ |
D | registers.c | 21 int save_i387_registers(int pid, unsigned long *fp_regs) in save_i387_registers() argument 23 if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) in save_i387_registers() 28 int save_fp_registers(int pid, unsigned long *fp_regs) in save_fp_registers() argument 36 if (ptrace(PTRACE_GETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in save_fp_registers() 41 return save_i387_registers(pid, fp_regs); in save_fp_registers() 44 int restore_i387_registers(int pid, unsigned long *fp_regs) in restore_i387_registers() argument 46 if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) in restore_i387_registers() 51 int restore_fp_registers(int pid, unsigned long *fp_regs) in restore_fp_registers() argument 58 if (ptrace(PTRACE_SETREGSET, pid, NT_X86_XSTATE, &iov) < 0) in restore_fp_registers() 63 return restore_i387_registers(pid, fp_regs); in restore_fp_registers() [all …]
|
/linux-5.10/arch/powerpc/mm/book3s64/ |
D | radix_tlb.c | 30 unsigned int pid, in tlbiel_radix_set_isa300() argument 37 rs = ((unsigned long)pid << PPC_BITLSHIFT(31)); in tlbiel_radix_set_isa300() 94 static __always_inline void __tlbiel_pid(unsigned long pid, int set, in __tlbiel_pid() argument 101 rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); in __tlbiel_pid() 110 static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) in __tlbie_pid() argument 115 rs = pid << PPC_BITLSHIFT(31); in __tlbie_pid() 152 static __always_inline void __tlbiel_va(unsigned long va, unsigned long pid, in __tlbiel_va() argument 159 rs = pid << PPC_BITLSHIFT(31); in __tlbiel_va() 168 static __always_inline void __tlbie_va(unsigned long va, unsigned long pid, in __tlbie_va() argument 175 rs = pid << PPC_BITLSHIFT(31); in __tlbie_va() [all …]
|
/linux-5.10/tools/testing/selftests/clone3/ |
D | clone3_set_tid.c | 6 * PID namespace. 47 pid_t pid = -1; in call_clone3_set_tid() local 56 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid() 57 if (pid < 0) { in call_clone3_set_tid() 63 if (pid == 0) { in call_clone3_set_tid() 68 ksft_print_msg("I am the child, my PID is %d (expected %d)\n", in call_clone3_set_tid() 98 if (expected_pid == 0 || expected_pid == pid) { in call_clone3_set_tid() 99 ksft_print_msg("I am the parent (%d). My child's pid is %d\n", in call_clone3_set_tid() 100 getpid(), pid); in call_clone3_set_tid() 103 "Expected child pid %d does not match actual pid %d\n", in call_clone3_set_tid() [all …]
|
D | clone3_cap_checkpoint_restore.c | 6 * PID namespace. 45 pid_t pid = -1; in call_clone3_set_tid() local 53 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid() 54 if (pid < 0) { in call_clone3_set_tid() 59 if (pid == 0) { in call_clone3_set_tid() 63 TH_LOG("I am the child, my PID is %d (expected %d)", getpid(), set_tid[0]); in call_clone3_set_tid() 70 TH_LOG("I am the parent (%d). My child's pid is %d", getpid(), pid); in call_clone3_set_tid() 72 if (waitpid(pid, &status, 0) < 0) { in call_clone3_set_tid() 140 pid_t pid; in TEST() local 152 /* Find the current active PID */ in TEST() [all …]
|
/linux-5.10/arch/um/os-Linux/skas/ |
D | process.c | 26 int is_skas_winch(int pid, int fd, void *data) in is_skas_winch() argument 28 return pid == getpgrp(); in is_skas_winch() 31 static int ptrace_dump_regs(int pid) in ptrace_dump_regs() argument 36 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) in ptrace_dump_regs() 55 void wait_stub_done(int pid) in wait_stub_done() argument 60 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL)); in wait_stub_done() 67 err = ptrace(PTRACE_CONT, pid, 0, 0); in wait_stub_done() 79 err = ptrace_dump_regs(pid); in wait_stub_done() 84 "pid = %d, n = %d, errno = %d, status = 0x%x\n", pid, n, errno, in wait_stub_done() 91 static void get_skas_faultinfo(int pid, struct faultinfo *fi, unsigned long *aux_fp_regs) in get_skas_faultinfo() argument [all …]
|
/linux-5.10/arch/um/os-Linux/ |
D | start_up.c | 32 int pid = os_getpid(), ppid = getppid(); in ptrace_child() local 38 kill(pid, SIGKILL); in ptrace_child() 40 kill(pid, SIGSTOP); in ptrace_child() 48 if (sc_result == pid) in ptrace_child() 95 int pid, n, status; in start_ptraced_child() local 99 pid = fork(); in start_ptraced_child() 100 if (pid == 0) in start_ptraced_child() 102 else if (pid < 0) in start_ptraced_child() 105 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); in start_ptraced_child() 112 return pid; in start_ptraced_child() [all …]
|
D | helper.c | 41 /* Returns either the pid of the child process we run or -E* on failure. */ 46 int pid, fds[2], ret, n; in run_helper() local 74 pid = clone(helper_child, (void *) sp, CLONE_VM, &data); in run_helper() 75 if (pid < 0) { in run_helper() 91 ret = pid; in run_helper() 99 CATCH_EINTR(waitpid(pid, NULL, __WALL)); in run_helper() 117 int pid, status, err; in run_helper_thread() local 124 pid = clone(proc, (void *) sp, flags, arg); in run_helper_thread() 125 if (pid < 0) { in run_helper_thread() 132 CATCH_EINTR(pid = waitpid(pid, &status, __WALL)); in run_helper_thread() [all …]
|
/linux-5.10/scripts/gdb/linux/ |
D | tasks.py | 42 def get_task_by_pid(pid): argument 44 if int(task['pid']) == pid: 50 """Find Linux task by PID and return the task_struct variable. 52 $lx_task_by_pid(PID): Given PID, iterate over all tasks of the target and 53 return that task_struct variable which PID matches.""" 58 def invoke(self, pid): argument 59 task = get_task_by_pid(pid) 63 raise gdb.GdbError("No task of PID " + str(pid)) 76 gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) 80 task["pid"].format_string(), [all …]
|
/linux-5.10/tools/testing/selftests/ftrace/test.d/trigger/inter-event/ |
D | trigger-inter-event-combined-hist.tc | 13 echo 'waking_latency u64 lat pid_t pid' > synthetic_events 20 echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_waking/trigger 21 echo 'hist:keys=pid:waking_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).waking_laten… 22 echo 'hist:keys=pid,lat:sort=pid,lat' > events/synthetic/waking_latency/trigger 24 echo 'wakeup_latency u64 lat pid_t pid' >> synthetic_events 25 echo 'hist:keys=pid:ts1=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_wakeup/trigger 28 echo 'waking_plus_wakeup_latency u64 lat; pid_t pid' >> synthetic_events 29 …ho 'hist:keys=pid,lat:sort=pid,lat:ww_lat=$waking_lat+$wakeup_lat:onmatch(synthetic.wakeup_latency… 30 echo 'hist:keys=pid,lat:sort=pid,lat' >> events/synthetic/waking_plus_wakeup_latency/trigger 33 if ! grep -q "pid:" events/synthetic/waking_plus_wakeup_latency/hist; then
|
/linux-5.10/drivers/media/common/b2c2/ |
D | flexcop-hw-filter.c | 4 * flexcop-hw-filter.c - pid and mac address filtering and control functions 47 u16 pid, u16 mask) in flexcop_pid_group_filter() argument 51 v30c.pid_filter_30c_ext_ind_0_7.Group_PID = pid; in flexcop_pid_group_filter() 61 /* this fancy define reduces the code size of the quite similar PID controlling of 68 vpid.vregname.field = onoff ? pid : 0x1fff; \ 75 u16 pid, int onoff) in flexcop_pid_Stream1_PID_ctrl() argument 82 u16 pid, int onoff) in flexcop_pid_Stream2_PID_ctrl() argument 89 u16 pid, int onoff) in flexcop_pid_PCR_PID_ctrl() argument 95 u16 pid, int onoff) in flexcop_pid_PMT_PID_ctrl() argument 101 u16 pid, int onoff) in flexcop_pid_EMM_PID_ctrl() argument [all …]
|
/linux-5.10/fs/f2fs/ |
D | trace.c | 27 last_io.pid, "----------------", in __print_last_io() 35 static int __file_type(struct inode *inode, pid_t pid) in __file_type() argument 47 else if (pid) in __file_type() 56 pid_t pid = task_pid_nr(current); in f2fs_trace_pid() local 59 set_page_private(page, (unsigned long)pid); in f2fs_trace_pid() 66 p = radix_tree_lookup(&pids, pid); in f2fs_trace_pid() 70 radix_tree_delete(&pids, pid); in f2fs_trace_pid() 72 if (radix_tree_insert(&pids, pid, current)) { in f2fs_trace_pid() 81 pid, current->comm); in f2fs_trace_pid() 90 pid_t pid; in f2fs_trace_ios() local [all …]
|
/linux-5.10/tools/perf/scripts/perl/ |
D | rw-by-pid.pl | 75 printf("read counts by pid:\n\n"); 77 printf("%6s %20s %10s %10s %10s\n", "pid", "comm", 82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=> 84 my $comm = $reads{$pid}{comm} || ""; 85 my $total_reads = $reads{$pid}{total_reads} || 0; 86 my $bytes_requested = $reads{$pid}{bytes_requested} || 0; 87 my $bytes_read = $reads{$pid}{bytes_read} || 0; 89 printf("%6s %-20s %10s %10s %10s\n", $pid, $comm, 93 printf("\nfailed reads by pid:\n\n"); 95 printf("%6s %20s %6s %10s\n", "pid", "comm", "error #", "# errors"); [all …]
|
/linux-5.10/tools/testing/selftests/cgroup/ |
D | cgroup_util.c | 259 int pid = strtol(ptr, &ptr, 10); in cg_killall() local 261 if (pid == 0) in cg_killall() 267 if (kill(pid, SIGKILL)) in cg_killall() 292 int cg_enter(const char *cgroup, int pid) in cg_enter() argument 296 snprintf(pidbuf, sizeof(pidbuf), "%d", pid); in cg_enter() 314 int pid, retcode; in cg_run() local 316 pid = fork(); in cg_run() 317 if (pid < 0) { in cg_run() 318 return pid; in cg_run() 319 } else if (pid == 0) { in cg_run() [all …]
|
/linux-5.10/tools/testing/selftests/pidfd/ |
D | pidfd_test.c | 96 pid_t pid; in test_pidfd_send_signal_exited_fail() local 106 pid = fork(); in test_pidfd_send_signal_exited_fail() 107 if (pid < 0) in test_pidfd_send_signal_exited_fail() 111 if (pid == 0) in test_pidfd_send_signal_exited_fail() 114 snprintf(buf, sizeof(buf), "/proc/%d", pid); in test_pidfd_send_signal_exited_fail() 118 (void)wait_for_pid(pid); in test_pidfd_send_signal_exited_fail() 155 const char *test_name = "pidfd_send_signal signal recycled pid"; in test_pidfd_send_signal_recycled_pid_fail() 167 ksft_test_result_skip("%s test: Unsharing pid namespace not permitted\n", in test_pidfd_send_signal_recycled_pid_fail() 171 ksft_exit_fail_msg("%s test: Failed to unshare pid namespace\n", in test_pidfd_send_signal_recycled_pid_fail() 191 /* pid 1 in new pid namespace */ in test_pidfd_send_signal_recycled_pid_fail() [all …]
|
/linux-5.10/tools/perf/scripts/python/ |
D | netdev-times.py | 142 event['pid'], event['comm'])) 232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 238 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 244 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 250 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, argument 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 256 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, irq, ret): argument [all …]
|
/linux-5.10/arch/powerpc/platforms/powernv/ |
D | vas-trace.h | 24 __field(int, pid) 34 __entry->pid = tsk->pid; 42 TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pid=%d, tid=%d", 43 __entry->pid, __entry->vasid, __entry->cop, 59 __field(int, pid) 68 __entry->pid = tsk->pid; 75 TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pidr=%d", 76 __entry->pid, __entry->vasid, __entry->cop, 90 __field(int, pid) 97 __entry->pid = tsk->pid; [all …]
|
/linux-5.10/include/uapi/linux/dvb/ |
D | dmx.h | 75 * @DMX_PES_AUDIO0: first audio PID. Also referred as @DMX_PES_AUDIO. 76 * @DMX_PES_VIDEO0: first video PID. Also referred as @DMX_PES_VIDEO. 77 * @DMX_PES_TELETEXT0: first teletext PID. Also referred as @DMX_PES_TELETEXT. 78 * @DMX_PES_SUBTITLE0: first subtitle PID. Also referred as @DMX_PES_SUBTITLE. 79 * @DMX_PES_PCR0: first Program Clock Reference PID. 82 * @DMX_PES_AUDIO1: second audio PID. 83 * @DMX_PES_VIDEO1: second video PID. 84 * @DMX_PES_TELETEXT1: second teletext PID. 85 * @DMX_PES_SUBTITLE1: second subtitle PID. 86 * @DMX_PES_PCR1: second Program Clock Reference PID. [all …]
|
/linux-5.10/tools/testing/selftests/bpf/ |
D | test_current_pid_tgid_new_ns.c | 33 pid_t pid; in main() local 39 if (stat("/proc/self/ns/pid", &st)) { in main() 40 perror("stat failed on /proc/self/ns/pid ns\n"); in main() 49 pid = fork(); in main() 50 if (pid == -1) { in main() 56 if (pid > 0) { in main() 60 waitpid(pid, &status, 0); in main() 64 pid = fork(); in main() 65 if (pid == -1) { in main() 71 if (pid > 0) { in main() [all …]
|
/linux-5.10/arch/um/include/shared/ |
D | registers.h | 12 extern int save_i387_registers(int pid, unsigned long *fp_regs); 13 extern int restore_i387_registers(int pid, unsigned long *fp_regs); 14 extern int save_fp_registers(int pid, unsigned long *fp_regs); 15 extern int restore_fp_registers(int pid, unsigned long *fp_regs); 16 extern int save_fpx_registers(int pid, unsigned long *fp_regs); 17 extern int restore_fpx_registers(int pid, unsigned long *fp_regs); 18 extern int save_registers(int pid, struct uml_pt_regs *regs); 19 extern int restore_registers(int pid, struct uml_pt_regs *regs); 20 extern int init_registers(int pid); 23 extern int get_fp_registers(int pid, unsigned long *regs); [all …]
|
/linux-5.10/tools/bpf/runqslower/ |
D | runqslower.bpf.c | 28 static int trace_enqueue(u32 tgid, u32 pid) in trace_enqueue() argument 32 if (!pid || (targ_pid && targ_pid != pid)) in trace_enqueue() 36 bpf_map_update_elem(&start, &pid, &ts, 0); in trace_enqueue() 46 return trace_enqueue(p->tgid, p->pid); in handle__sched_wakeup() 55 return trace_enqueue(p->tgid, p->pid); in handle__sched_wakeup_new() 69 u32 pid; in handle__sched_switch() local 73 trace_enqueue(prev->tgid, prev->pid); in handle__sched_switch() 75 pid = next->pid; in handle__sched_switch() 78 tsp = bpf_map_lookup_elem(&start, &pid); in handle__sched_switch() 86 event.pid = pid; in handle__sched_switch() [all …]
|
/linux-5.10/tools/lib/traceevent/Documentation/ |
D | libtraceevent-commands.txt | 8 Manage pid to process name mappings. 26 These functions can be used to handle the mapping between pid and process name. 28 of the process, instead of its pid. This information can be retrieved from 37 If a process with the same pid is already registered, the process name string is 42 The _tep_is_pid_registered()_ function checks if a pid has a process name 47 pid. The _pid_ argument is the process ID, _tep_ is the event context. 51 The _tep_data_pid_from_comm()_ function returns a pid for a given process name. 53 The argument _next_ is the cmdline structure to search for the next pid. 54 As there may be more than one pid for a given process, the result of this call 56 the next pid. If _next_ is NULL, it will return the first pid associated with [all …]
|