/tools/perf/scripts/perl/ |
D | rw-by-pid.pl | 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, 101 foreach my $pid (keys %reads) { 102 foreach my $error (keys %{$reads{$pid}{errors}}) { 103 my $comm = $reads{$pid}{comm} || ""; 104 my $errcount = $reads{$pid}{errors}{$error} || 0; [all …]
|
D | rwtop.pl | 136 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=> 138 my $comm = $reads{$pid}{comm} || ""; 139 my $total_reads = $reads{$pid}{total_reads} || 0; 140 my $bytes_requested = $reads{$pid}{bytes_requested} || 0; 141 my $bytes_read = $reads{$pid}{bytes_read} || 0; 143 printf("%6s %-20s %10s %10s %10s\n", $pid, $comm, 160 foreach my $pid (sort { ($writes{$b}{bytes_written} || 0) <=> 162 my $comm = $writes{$pid}{comm} || ""; 163 my $total_writes = $writes{$pid}{total_writes} || 0; 164 my $bytes_written = $writes{$pid}{bytes_written} || 0; [all …]
|
/tools/testing/selftests/powerpc/ |
D | harness.c | 30 pid_t pid; in run_test() local 35 pid = fork(); in run_test() 36 if (pid == 0) { in run_test() 39 } else if (pid == -1) { in run_test() 44 setpgid(pid, pid); in run_test() 51 rc = waitpid(pid, &status, 0); in run_test() 60 kill(-pid, SIGKILL); in run_test() 64 kill(-pid, SIGTERM); in run_test() 72 kill(-pid, SIGTERM); in run_test()
|
/tools/perf/util/ |
D | thread_map.h | 9 pid_t pid; member 22 struct thread_map *thread_map__new_by_pid(pid_t pid); 25 struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid); 31 struct thread_map *thread_map__new_str(const char *pid, 45 return map->map[thread].pid; in thread_map__pid() 49 thread_map__set_pid(struct thread_map *map, int thread, pid_t pid) in thread_map__set_pid() argument 51 map->map[thread].pid = pid; in thread_map__set_pid() 60 bool thread_map__has(struct thread_map *threads, pid_t pid);
|
D | cloexec.c | 37 pid_t pid = -1; in perf_flag_probe() local 50 fd = sys_perf_event_open(&attr, pid, cpu, -1, in perf_flag_probe() 52 if (fd < 0 && pid == -1 && errno == EACCES) { in perf_flag_probe() 53 pid = 0; in perf_flag_probe() 71 fd = sys_perf_event_open(&attr, pid, cpu, -1, 0); in perf_flag_probe() 72 if (fd < 0 && pid == -1 && errno == EACCES) { in perf_flag_probe() 73 pid = 0; in perf_flag_probe()
|
D | thread_map.c | 51 struct thread_map *thread_map__new_by_pid(pid_t pid) in thread_map__new_by_pid() argument 59 sprintf(name, "/proc/%d/task", pid); in thread_map__new_by_pid() 114 pid_t pid = strtol(dirent->d_name, &end, 10); in thread_map__new_by_uid() local 127 snprintf(path, sizeof(path), "/proc/%d/task", pid); in thread_map__new_by_uid() 178 struct thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid) in thread_map__new() argument 180 if (pid != -1) in thread_map__new() 181 return thread_map__new_by_pid(pid); in thread_map__new() 196 pid_t pid, prev_pid = INT_MAX; in thread_map__new_by_pid_str() local 206 pid = strtol(pos->s, &end_ptr, 10); in thread_map__new_by_pid_str() 208 if (pid == INT_MIN || pid == INT_MAX || in thread_map__new_by_pid_str() [all …]
|
D | values.c | 9 values->pid = malloc(values->threads_max * sizeof(*values->pid)); in perf_read_values_init() 12 if (!values->pid || !values->tid || !values->value) in perf_read_values_init() 36 zfree(&values->pid); in perf_read_values_destroy() 47 values->pid = realloc(values->pid, in perf_read_values__enlarge_threads() 48 values->threads_max * sizeof(*values->pid)); in perf_read_values__enlarge_threads() 53 if (!values->pid || !values->tid || !values->value) in perf_read_values__enlarge_threads() 58 u32 pid, u32 tid) in perf_read_values__findnew_thread() argument 63 if (values->pid[i] == pid && values->tid[i] == tid) in perf_read_values__findnew_thread() 70 values->pid[i] = pid; in perf_read_values__findnew_thread() 119 u32 pid, u32 tid, in perf_read_values_add_value() argument [all …]
|
/tools/testing/selftests/breakpoints/ |
D | step_after_suspend_test.c | 60 pid_t pid = fork(); in run_test() local 63 if (pid < 0) { in run_test() 67 if (pid == 0) in run_test() 70 wpid = waitpid(pid, &status, __WALL); in run_test() 71 if (wpid != pid) { in run_test() 84 if (ptrace(PTRACE_SINGLESTEP, pid, NULL, NULL) < 0) { in run_test() 93 wpid = waitpid(pid, &status, __WALL); in run_test() 94 if (wpid != pid) { in run_test() 111 if (ptrace(PTRACE_CONT, pid, NULL, NULL) < 0) { in run_test() 116 wpid = waitpid(pid, &status, __WALL); in run_test() [all …]
|
/tools/perf/arch/x86/tests/ |
D | intel-cqm.c | 14 pid_t pid; in spawn() local 16 pid = fork(); in spawn() 17 if (pid) in spawn() 18 return pid; in spawn() 44 pid_t pid; in test__intel_cqm_count_nmi_context() local 78 pid = spawn(); in test__intel_cqm_count_nmi_context() 80 fd[0] = sys_perf_event_open(&pe, pid, -1, -1, flag); in test__intel_cqm_count_nmi_context() 92 fd[1] = sys_perf_event_open(&pe, pid, -1, fd[0], flag); in test__intel_cqm_count_nmi_context() 119 kill(pid, SIGKILL); in test__intel_cqm_count_nmi_context()
|
/tools/perf/scripts/python/ |
D | netdev-times.py | 227 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 230 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 233 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 236 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 239 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 242 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 245 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, argument 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 251 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, irq, ret): argument 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, irq, ret) [all …]
|
/tools/perf/tests/ |
D | hists_link.c | 14 u32 pid; member 24 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, }, 26 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, }, 28 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, }, 30 { .pid = FAKE_PID_BASH, .ip = FAKE_IP_BASH_XMALLOC, }, 32 { .pid = FAKE_PID_BASH, .ip = FAKE_IP_LIBC_MALLOC, }, 38 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_RUN_COMMAND, }, 40 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, }, 42 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_PAGE_FAULT, }, 44 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_SYS_PERF_EVENT_OPEN, }, [all …]
|
/tools/testing/selftests/timers/ |
D | skew_consistency.c | 57 pid_t pid; in main() local 62 pid = fork(); in main() 63 if (!pid) in main() 69 while (pid != waitpid(pid, &ret, WNOHANG)) { in main()
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | task_event_vs_ebb_test.c | 40 pid_t pid; in task_event_vs_ebb() local 48 pid = fork(); in task_event_vs_ebb() 49 if (pid == 0) { in task_event_vs_ebb() 55 rc = setup_child_event(&event, pid); in task_event_vs_ebb() 57 kill_child_and_wait(pid); in task_event_vs_ebb() 71 FAIL_IF(wait_for_child(pid)); in task_event_vs_ebb()
|
D | task_event_pinned_vs_ebb_test.c | 42 pid_t pid; in task_event_pinned_vs_ebb() local 50 pid = fork(); in task_event_pinned_vs_ebb() 51 if (pid == 0) { in task_event_pinned_vs_ebb() 57 rc = setup_child_event(&event, pid); in task_event_pinned_vs_ebb() 59 kill_child_and_wait(pid); in task_event_pinned_vs_ebb() 73 FAIL_IF(wait_for_child(pid) != 2); in task_event_pinned_vs_ebb()
|
D | ebb_on_child_test.c | 48 pid_t pid; in ebb_on_child() local 55 pid = fork(); in ebb_on_child() 56 if (pid == 0) { in ebb_on_child() 72 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_child() 78 FAIL_IF(wait_for_child(pid)); in ebb_on_child()
|
D | ebb_on_willing_child_test.c | 55 pid_t pid; in ebb_on_willing_child() local 62 pid = fork(); in ebb_on_willing_child() 63 if (pid == 0) { in ebb_on_willing_child() 80 FAIL_IF(event_open_with_pid(&event, pid)); in ebb_on_willing_child() 84 FAIL_IF(wait_for_child(pid)); in ebb_on_willing_child()
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-signal-stack.c | 35 int pid; in tm_signal_stack() local 39 pid = fork(); in tm_signal_stack() 40 if (pid < 0) in tm_signal_stack() 43 if (pid) { /* Parent */ in tm_signal_stack()
|
D | tm-syscall.c | 33 pid_t pid; in getppid_tm() local 37 pid = getppid_tm_suspended(); in getppid_tm() 39 pid = getppid_tm_active(); in getppid_tm() 41 if (pid >= 0) in getppid_tm() 42 return pid; in getppid_tm()
|
/tools/testing/selftests/x86/ |
D | mpx-dig.c | 64 int open_proc(int pid, char *file) in open_proc() argument 69 snprintf(&buf[0], sizeof(buf), "/proc/%d/%s", pid, file); in open_proc() 86 int __pid_load_vaddrs(int pid) in __pid_load_vaddrs() argument 89 int proc_maps_fd = open_proc(pid, "maps"); in __pid_load_vaddrs() 128 int pid_load_vaddrs(int pid) in pid_load_vaddrs() argument 132 dprintf2("%s(%d)\n", __func__, pid); in pid_load_vaddrs() 136 dprintf2("%s(%d) allocated %d ranges @ %p\n", __func__, pid, in pid_load_vaddrs() 141 ret = __pid_load_vaddrs(pid); in pid_load_vaddrs() 145 dprintf2("%s(%d) need to realloc\n", __func__, pid); in pid_load_vaddrs() 150 pid, nr_ranges_allocated, ranges); in pid_load_vaddrs() [all …]
|
/tools/testing/selftests/nsfs/ |
D | owner.c | 30 pid_t pid; in main() local 36 pid = fork(); in main() 37 if (pid < 0) in main() 39 if (pid == 0) { in main() 54 snprintf(path, sizeof(path), "/proc/%d/ns/uts", pid); in main() 66 snprintf(path, sizeof(path), "/proc/%d/ns/user", pid); in main() 88 kill(pid, SIGKILL); in main()
|
/tools/testing/selftests/powerpc/math/ |
D | fpu_syscall.c | 22 extern int test_fpu(double *darray, pid_t *pid); 55 pid_t pid = fork(); in test_syscall_fpu() local 58 FAIL_IF(pid == -1); in test_syscall_fpu() 77 if (pid) in test_syscall_fpu() 78 waitpid(pid, &child_ret, 0); in test_syscall_fpu()
|
D | vmx_syscall.c | 27 extern int test_vmx(vector int *varray, pid_t *pid); 56 pid_t pid = fork(); in test_vmx_syscall() local 59 FAIL_IF(pid == -1); in test_vmx_syscall() 78 if (pid) in test_vmx_syscall() 79 waitpid(pid, &child_ret, 0); in test_vmx_syscall()
|
/tools/testing/selftests/powerpc/signal/ |
D | signal.c | 27 extern long signal_self(pid_t pid, int sig); 45 pid_t pid; in test_signal() local 61 pid = fork(); in test_signal() 62 if (pid == -1) { in test_signal() 66 if (pid == 0) { in test_signal() 79 waitpid(pid, NULL, 0); in test_signal()
|
/tools/testing/selftests/powerpc/dscr/ |
D | dscr_inherit_test.c | 26 pid_t pid; in dscr_inherit() local 43 pid = fork(); in dscr_inherit() 44 if (pid == -1) { in dscr_inherit() 47 } else if (pid) { in dscr_inherit() 50 if (waitpid(pid, &status, 0) == -1) { in dscr_inherit()
|
/tools/perf/trace/beauty/ |
D | pid.c | 3 int pid = arg->val; in syscall_arg__scnprintf_pid() local 5 size_t printed = scnprintf(bf, size, "%d", pid); in syscall_arg__scnprintf_pid() 6 struct thread *thread = machine__findnew_thread(trace->host, pid, pid); in syscall_arg__scnprintf_pid()
|