/tools/perf/util/ |
D | thread.h | 32 struct thread { struct 68 struct thread *thread__new(pid_t pid, pid_t tid); argument 69 int thread__init_maps(struct thread *thread, struct machine *machine); 70 void thread__delete(struct thread *thread); 72 struct thread *thread__get(struct thread *thread); 73 void thread__put(struct thread *thread); 75 static inline void __thread__zput(struct thread **thread) in __thread__zput() argument 77 thread__put(*thread); in __thread__zput() 78 *thread = NULL; in __thread__zput() 81 #define thread__zput(thread) __thread__zput(&thread) argument [all …]
|
D | thread.c | 22 int thread__init_maps(struct thread *thread, struct machine *machine) in thread__init_maps() argument 24 pid_t pid = thread->pid_; in thread__init_maps() 26 if (pid == thread->tid || pid == -1) { in thread__init_maps() 27 thread->maps = maps__new(machine); in thread__init_maps() 29 struct thread *leader = __machine__findnew_thread(machine, pid, pid); in thread__init_maps() 31 thread->maps = maps__get(leader->maps); in thread__init_maps() 36 return thread->maps ? 0 : -1; in thread__init_maps() 39 struct thread *thread__new(pid_t pid, pid_t tid) in thread__new() 43 struct thread *thread = zalloc(sizeof(*thread)); in thread__new() local 45 if (thread != NULL) { in thread__new() [all …]
|
D | thread-stack.h | 14 struct thread; 55 struct thread *thread; member 83 int thread_stack__event(struct thread *thread, int cpu, u32 flags, u64 from_ip, 86 void thread_stack__set_trace_nr(struct thread *thread, int cpu, u64 trace_nr); 87 void thread_stack__sample(struct thread *thread, int cpu, struct ip_callchain *chain, 89 void thread_stack__sample_late(struct thread *thread, int cpu, 92 void thread_stack__br_sample(struct thread *thread, int cpu, 94 void thread_stack__br_sample_late(struct thread *thread, int cpu, 97 int thread_stack__flush(struct thread *thread); 98 void thread_stack__free(struct thread *thread); [all …]
|
D | db-export.c | 62 int db_export__thread(struct db_export *dbe, struct thread *thread, in db_export__thread() argument 63 struct machine *machine, struct thread *main_thread) in db_export__thread() 67 if (thread->db_id) in db_export__thread() 70 thread->db_id = ++dbe->thread_last_db_id; in db_export__thread() 76 return dbe->export_thread(dbe, thread, main_thread_db_id, in db_export__thread() 83 struct thread *thread) in __db_export__comm() argument 88 return dbe->export_comm(dbe, comm, thread); in __db_export__comm() 94 struct thread *thread) in db_export__comm() argument 99 return __db_export__comm(dbe, comm, thread); in db_export__comm() 109 struct thread *main_thread) in db_export__exec_comm() [all …]
|
D | thread-stack.c | 113 static inline bool thread_stack__per_cpu(struct thread *thread) in thread_stack__per_cpu() argument 115 return !(thread->tid || thread->pid_); in thread_stack__per_cpu() 136 static int thread_stack__init(struct thread_stack *ts, struct thread *thread, in thread_stack__init() argument 158 if (thread->maps && thread->maps->machine) { in thread_stack__init() 159 struct machine *machine = thread->maps->machine; in thread_stack__init() 173 static struct thread_stack *thread_stack__new(struct thread *thread, int cpu, in thread_stack__new() argument 178 struct thread_stack *ts = thread->ts, *new_ts; in thread_stack__new() 182 if (thread_stack__per_cpu(thread) && cpu > 0) in thread_stack__new() 192 zfree(&thread->ts); in thread_stack__new() 193 thread->ts = new_ts; in thread_stack__new() [all …]
|
D | db-export.h | 15 struct thread; 44 int (*export_thread)(struct db_export *dbe, struct thread *thread, 47 struct thread *thread); 49 struct comm *comm, struct thread *thread); 84 int db_export__thread(struct db_export *dbe, struct thread *thread, 85 struct machine *machine, struct thread *main_thread); 87 struct thread *thread); 89 struct thread *main_thread); 91 struct thread *thread);
|
D | counts.h | 21 perf_counts(struct perf_counts *counts, int cpu, int thread) in perf_counts() argument 23 return xyarray__entry(counts->values, cpu, thread); in perf_counts() 27 perf_counts__is_loaded(struct perf_counts *counts, int cpu, int thread) in perf_counts__is_loaded() argument 29 return *((bool *) xyarray__entry(counts->loaded, cpu, thread)); in perf_counts__is_loaded() 33 perf_counts__set_loaded(struct perf_counts *counts, int cpu, int thread, bool loaded) in perf_counts__set_loaded() argument 35 *((bool *) xyarray__entry(counts->loaded, cpu, thread)) = loaded; in perf_counts__set_loaded()
|
D | machine.c | 44 static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock); 115 struct thread *thread = machine__findnew_thread(machine, -1, in machine__init() local 119 if (thread == NULL) in machine__init() 123 thread__set_comm(thread, comm, 0); in machine__init() 124 thread__put(thread); in machine__init() 204 struct thread *t = rb_entry(nd, struct thread, rb_node); in machine__delete_threads() 230 struct thread *thread, *n; in machine__exit() local 239 list_for_each_entry_safe(thread, n, &threads->dead, node) in machine__exit() 240 list_del_init(&thread->node); in machine__exit() 400 struct thread *th, pid_t pid) in machine__update_thread_pid() [all …]
|
D | unwind.h | 11 struct thread; 25 struct thread *thread, 31 struct thread *thread, 66 struct thread *thread __maybe_unused, in unwind__get_entries()
|
D | unwind-libdw.h | 10 struct thread; 12 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg); 18 struct thread *thread; member
|
D | archinsn.h | 6 struct thread; 9 struct thread *thread,
|
/tools/perf/tests/ |
D | dwarf-unwind.c | 52 int test_dwarf_unwind__thread(struct thread *thread); 54 int test_dwarf_unwind__krava_3(struct thread *thread); 55 int test_dwarf_unwind__krava_2(struct thread *thread); 56 int test_dwarf_unwind__krava_1(struct thread *thread); 98 noinline int test_dwarf_unwind__thread(struct thread *thread) in test_dwarf_unwind__thread() argument 106 if (test__arch_unwind_sample(&sample, thread)) { in test_dwarf_unwind__thread() 111 err = unwind__get_entries(unwind_entry, &cnt, thread, in test_dwarf_unwind__thread() 132 struct thread *thread = *(struct thread **)p1; in test_dwarf_unwind__compare() local 138 global_unwind_retval = test_dwarf_unwind__thread(thread); in test_dwarf_unwind__compare() 141 global_unwind_retval = test_dwarf_unwind__thread(thread); in test_dwarf_unwind__compare() [all …]
|
/tools/perf/scripts/python/ |
D | stat-cpi.py | 10 def get_key(time, event, cpu, thread): argument 11 return "%d-%s-%d-%d" % (time, event, cpu, thread) 13 def store_key(time, cpu, thread): argument 20 if (thread not in threads): 21 threads.append(thread) 23 def store(time, event, cpu, thread, val, ena, run): argument 27 store_key(time, cpu, thread) 28 key = get_key(time, event, cpu, thread) 31 def get(time, event, cpu, thread): argument 32 key = get_key(time, event, cpu, thread) [all …]
|
/tools/perf/trace/beauty/ |
D | pid.c | 8 struct thread *thread = machine__findnew_thread(trace->host, pid, pid); in syscall_arg__scnprintf_pid() local 10 if (thread != NULL) { in syscall_arg__scnprintf_pid() 11 if (!thread->comm_set) in syscall_arg__scnprintf_pid() 12 thread__set_comm_from_proc(thread); in syscall_arg__scnprintf_pid() 14 if (thread->comm_set) in syscall_arg__scnprintf_pid() 16 " (%s)", thread__comm_str(thread)); in syscall_arg__scnprintf_pid() 17 thread__put(thread); in syscall_arg__scnprintf_pid()
|
/tools/lib/perf/ |
D | evsel.c | 47 int cpu, thread; in perf_evsel__alloc_fd() local 49 for (thread = 0; thread < nthreads; thread++) { in perf_evsel__alloc_fd() 50 FD(evsel, cpu, thread) = -1; in perf_evsel__alloc_fd() 69 int cpu, thread, err = 0; in perf_evsel__open() local 100 for (thread = 0; thread < threads->nr; thread++) { in perf_evsel__open() 104 threads->map[thread].pid, in perf_evsel__open() 110 FD(evsel, cpu, thread) = fd; in perf_evsel__open() 119 int thread; in perf_evsel__close_fd_cpu() local 121 for (thread = 0; thread < xyarray__max_y(evsel->fd); ++thread) { in perf_evsel__close_fd_cpu() 122 if (FD(evsel, cpu, thread) >= 0) in perf_evsel__close_fd_cpu() [all …]
|
D | threadmap.c | 35 void perf_thread_map__set_pid(struct perf_thread_map *map, int thread, pid_t pid) in perf_thread_map__set_pid() argument 37 map->map[thread].pid = pid; in perf_thread_map__set_pid() 40 char *perf_thread_map__comm(struct perf_thread_map *map, int thread) in perf_thread_map__comm() argument 42 return map->map[thread].comm; in perf_thread_map__comm() 88 pid_t perf_thread_map__pid(struct perf_thread_map *map, int thread) in perf_thread_map__pid() argument 90 return map->map[thread].pid; in perf_thread_map__pid()
|
/tools/testing/selftests/powerpc/dscr/ |
D | dscr_default_test.c | 20 unsigned long thread = (unsigned long)in; in do_test() local 44 "but is %ld\n", thread, d, cur_dscr); in do_test() 45 result[thread] = 1; in do_test() 46 pthread_exit(&result[thread]); in do_test() 51 "but is %ld\n", thread, d, cur_dscr_usr); in do_test() 52 result[thread] = 1; in do_test() 53 pthread_exit(&result[thread]); in do_test() 56 result[thread] = 0; in do_test() 57 pthread_exit(&result[thread]); in do_test()
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-vmx-unavail.c | 92 pthread_t *thread; in tm_vmx_unavail_test() local 99 thread = malloc(sizeof(pthread_t)*threads); in tm_vmx_unavail_test() 100 if (!thread) in tm_vmx_unavail_test() 104 pthread_create(&thread[i], NULL, &worker, NULL); in tm_vmx_unavail_test() 107 pthread_join(thread[i], NULL); in tm_vmx_unavail_test() 109 free(thread); in tm_vmx_unavail_test()
|
D | tm-tmspr.c | 94 pthread_t *thread; in test_tmspr() local 103 thread = malloc(thread_num * sizeof(pthread_t)); in test_tmspr() 104 if (thread == NULL) in test_tmspr() 109 if (pthread_create(&thread[i], NULL, (void *)tfiar_tfhar, in test_tmspr() 115 if (pthread_create(&thread[i], NULL, (void *)texasr, (void *)i)) in test_tmspr() 120 if (pthread_join(thread[i], NULL) != 0) in test_tmspr() 124 free(thread); in test_tmspr()
|
/tools/perf/arch/arm/tests/ |
D | dwarf-unwind.c | 14 struct thread *thread, u64 *regs) in sample_ustack() argument 29 map = maps__find(thread->maps, (u64)sp); in sample_ustack() 46 struct thread *thread) in test__arch_unwind_sample() argument 62 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
|
/tools/perf/arch/arm64/tests/ |
D | dwarf-unwind.c | 14 struct thread *thread, u64 *regs) in sample_ustack() argument 29 map = maps__find(thread->maps, (u64)sp); in sample_ustack() 46 struct thread *thread) in test__arch_unwind_sample() argument 62 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
|
/tools/perf/arch/powerpc/tests/ |
D | dwarf-unwind.c | 15 struct thread *thread, u64 *regs) in sample_ustack() argument 30 map = maps__find(thread->maps, (u64)sp); in sample_ustack() 47 struct thread *thread) in test__arch_unwind_sample() argument 63 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
|
/tools/perf/arch/x86/tests/ |
D | dwarf-unwind.c | 15 struct thread *thread, u64 *regs) in sample_ustack() argument 30 map = maps__find(thread->maps, (u64)sp); in sample_ustack() 54 struct thread *thread) in test__arch_unwind_sample() argument 78 return sample_ustack(sample, thread, buf); in test__arch_unwind_sample()
|
/tools/perf/ |
D | builtin-sched.c | 68 pthread_t thread; member 130 struct thread *thread; member 196 struct thread *curr_thread[MAX_CPUS]; 284 struct thread *last_thread; 291 static struct thread **idle_threads; 689 err = pthread_create(&task->thread, &attr, thread_func, parms); in create_tasks() 882 struct thread *child, *parent; in replay_fork_event() 918 static struct thread_runtime *thread__init_runtime(struct thread *thread) in thread__init_runtime() argument 927 thread__set_priv(thread, r); in thread__init_runtime() 932 static struct thread_runtime *thread__get_runtime(struct thread *thread) in thread__get_runtime() argument [all …]
|
/tools/perf/arch/powerpc/include/ |
D | arch-tests.h | 6 struct thread; 9 struct thread *thread);
|