Lines Matching refs:thread
48 struct thread *thread = machine__findnew_thread(machine, -1, in machine__init() local
52 if (thread == NULL) in machine__init()
56 thread__set_comm(thread, comm, 0); in machine__init()
97 struct thread *t = rb_entry(nd, struct thread, rb_node); in machine__delete_threads()
294 struct thread *th, pid_t pid) in machine__update_thread_pid()
296 struct thread *leader; in machine__update_thread_pid()
339 static struct thread *__machine__findnew_thread(struct machine *machine, in __machine__findnew_thread()
345 struct thread *th; in __machine__findnew_thread()
364 th = rb_entry(parent, struct thread, rb_node); in __machine__findnew_thread()
409 struct thread *machine__findnew_thread(struct machine *machine, pid_t pid, in machine__findnew_thread()
415 struct thread *machine__find_thread(struct machine *machine, pid_t pid, in machine__find_thread()
422 struct thread *thread) in machine__thread_exec_comm() argument
425 return thread__exec_comm(thread); in machine__thread_exec_comm()
427 return thread__comm(thread); in machine__thread_exec_comm()
433 struct thread *thread = machine__findnew_thread(machine, in machine__process_comm_event() local
444 if (thread == NULL || in machine__process_comm_event()
445 __thread__set_comm(thread, event->comm.comm, sample->time, exec)) { in machine__process_comm_event()
579 struct thread *pos = rb_entry(nd, struct thread, rb_node); in machine__fprintf()
1164 struct thread *thread; in machine__process_mmap2_event() local
1180 thread = machine__findnew_thread(machine, event->mmap2.pid, in machine__process_mmap2_event()
1182 if (thread == NULL) in machine__process_mmap2_event()
1197 event->mmap2.filename, type, thread); in machine__process_mmap2_event()
1202 thread__insert_map(thread, map); in machine__process_mmap2_event()
1214 struct thread *thread; in machine__process_mmap_event() local
1230 thread = machine__findnew_thread(machine, event->mmap.pid, in machine__process_mmap_event()
1232 if (thread == NULL) in machine__process_mmap_event()
1244 type, thread); in machine__process_mmap_event()
1249 thread__insert_map(thread, map); in machine__process_mmap_event()
1257 void machine__remove_thread(struct machine *machine, struct thread *th) in machine__remove_thread()
1275 struct thread *thread = machine__find_thread(machine, in machine__process_fork_event() local
1278 struct thread *parent = machine__findnew_thread(machine, in machine__process_fork_event()
1283 if (thread != NULL) in machine__process_fork_event()
1284 machine__remove_thread(machine, thread); in machine__process_fork_event()
1286 thread = machine__findnew_thread(machine, event->fork.pid, in machine__process_fork_event()
1291 if (thread == NULL || parent == NULL || in machine__process_fork_event()
1292 thread__fork(thread, parent, sample->time) < 0) { in machine__process_fork_event()
1303 struct thread *thread = machine__find_thread(machine, in machine__process_exit_event() local
1310 if (thread != NULL) in machine__process_exit_event()
1311 thread__exited(thread); in machine__process_exit_event()
1349 static void ip__resolve_ams(struct thread *thread, in ip__resolve_ams() argument
1363 thread__find_cpumode_addr_location(thread, MAP__FUNCTION, ip, &al); in ip__resolve_ams()
1371 static void ip__resolve_data(struct thread *thread, in ip__resolve_data() argument
1378 thread__find_addr_location(thread, m, MAP__VARIABLE, addr, &al); in ip__resolve_data()
1385 thread__find_addr_location(thread, m, MAP__FUNCTION, addr, &al); in ip__resolve_data()
1402 ip__resolve_ams(al->thread, &mi->iaddr, sample->ip); in sample__resolve_mem()
1403 ip__resolve_data(al->thread, al->cpumode, &mi->daddr, sample->addr); in sample__resolve_mem()
1409 static int add_callchain_ip(struct thread *thread, in add_callchain_ip() argument
1420 thread__find_cpumode_addr_location(thread, MAP__FUNCTION, in add_callchain_ip()
1446 thread__find_addr_location(thread, *cpumode, MAP__FUNCTION, in add_callchain_ip()
1477 ip__resolve_ams(al->thread, &bi[i].to, bs->entries[i].to); in sample__resolve_bstack()
1478 ip__resolve_ams(al->thread, &bi[i].from, bs->entries[i].from); in sample__resolve_bstack()
1532 static int resolve_lbr_callchain_sample(struct thread *thread, in resolve_lbr_callchain_sample() argument
1587 err = add_callchain_ip(thread, parent, root_al, &cpumode, ip); in resolve_lbr_callchain_sample()
1597 static int thread__resolve_callchain_sample(struct thread *thread, in thread__resolve_callchain_sample() argument
1615 err = resolve_lbr_callchain_sample(thread, sample, parent, in thread__resolve_callchain_sample()
1626 skip_idx = arch_skip_callchain_idx(thread, chain); in thread__resolve_callchain_sample()
1672 err = add_callchain_ip(thread, parent, root_al, in thread__resolve_callchain_sample()
1675 err = add_callchain_ip(thread, parent, root_al, in thread__resolve_callchain_sample()
1705 err = add_callchain_ip(thread, parent, root_al, &cpumode, ip); in thread__resolve_callchain_sample()
1721 int thread__resolve_callchain(struct thread *thread, in thread__resolve_callchain() argument
1728 int ret = thread__resolve_callchain_sample(thread, evsel, in thread__resolve_callchain()
1745 thread, sample, max_stack); in thread__resolve_callchain()
1750 int (*fn)(struct thread *thread, void *p), in machine__for_each_thread() argument
1754 struct thread *thread; in machine__for_each_thread() local
1758 thread = rb_entry(nd, struct thread, rb_node); in machine__for_each_thread()
1759 rc = fn(thread, priv); in machine__for_each_thread()
1764 list_for_each_entry(thread, &machine->dead_threads, node) { in machine__for_each_thread()
1765 rc = fn(thread, priv); in machine__for_each_thread()
1795 struct thread *thread; in machine__set_current_tid() local
1818 thread = machine__findnew_thread(machine, pid, tid); in machine__set_current_tid()
1819 if (!thread) in machine__set_current_tid()
1822 thread->cpu = cpu; in machine__set_current_tid()