Lines Matching refs:thread
275 struct thread *thread; member
1372 static struct thread_trace *thread__trace(struct thread *thread, FILE *fp) in thread__trace() argument
1376 if (thread == NULL) in thread__trace()
1379 if (thread__priv(thread) == NULL) in thread__trace()
1380 thread__set_priv(thread, thread_trace__new()); in thread__trace()
1382 if (thread__priv(thread) == NULL) in thread__trace()
1385 ttrace = thread__priv(thread); in thread__trace()
1417 struct thread *current;
1453 static int trace__set_fd_pathname(struct thread *thread, int fd, const char *pathname) in trace__set_fd_pathname() argument
1455 struct thread_trace *ttrace = thread__priv(thread); in trace__set_fd_pathname()
1479 static int thread__read_fd_path(struct thread *thread, int fd) in thread__read_fd_path() argument
1485 if (thread->pid_ == thread->tid) { in thread__read_fd_path()
1487 "/proc/%d/fd/%d", thread->pid_, fd); in thread__read_fd_path()
1490 "/proc/%d/task/%d/fd/%d", thread->pid_, thread->tid, fd); in thread__read_fd_path()
1502 return trace__set_fd_pathname(thread, fd, pathname); in thread__read_fd_path()
1505 static const char *thread__fd_path(struct thread *thread, int fd, in thread__fd_path() argument
1508 struct thread_trace *ttrace = thread__priv(thread); in thread__fd_path()
1520 if (thread__read_fd_path(thread, fd)) in thread__fd_path()
1532 const char *path = thread__fd_path(arg->thread, fd, arg->trace); in syscall_arg__scnprintf_fd()
1545 struct thread_trace *ttrace = thread__priv(arg->thread); in syscall_arg__scnprintf_close_fd()
1553 static void thread__set_filename_pos(struct thread *thread, const char *bf, in thread__set_filename_pos() argument
1556 struct thread_trace *ttrace = thread__priv(thread); in thread__set_filename_pos()
1570 thread__set_filename_pos(arg->thread, bf, ptr); in syscall_arg__scnprintf_filename()
1595 static size_t trace__fprintf_entry_head(struct trace *trace, struct thread *thread, in trace__fprintf_entry_head() argument
1603 printed += fprintf(fp, "%.14s/", thread__comm_str(thread)); in trace__fprintf_entry_head()
1604 printed += fprintf(fp, "%d ", thread->tid); in trace__fprintf_entry_head()
1795 struct thread *thread) in syscall__scnprintf_args() argument
1808 .thread = thread, in syscall__scnprintf_args()
1964 struct thread *thread; in trace__sys_enter() local
1972 thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); in trace__sys_enter()
1973 ttrace = thread__trace(thread, trace->output); in trace__sys_enter()
1993 args, trace, thread); in trace__sys_enter()
1997 trace__fprintf_entry_head(trace, thread, 1, sample->time, trace->output); in trace__sys_enter()
2006 if (trace->current != thread) { in trace__sys_enter()
2008 trace->current = thread__get(thread); in trace__sys_enter()
2012 thread__put(thread); in trace__sys_enter()
2022 struct thread *thread; in trace__sys_exit() local
2030 thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); in trace__sys_exit()
2031 ttrace = thread__trace(thread, trace->output); in trace__sys_exit()
2041 trace__set_fd_pathname(thread, ret, ttrace->filename.name); in trace__sys_exit()
2058 trace__fprintf_entry_head(trace, thread, duration, sample->time, trace->output); in trace__sys_exit()
2089 thread__put(thread); in trace__sys_exit()
2097 struct thread *thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); in trace__vfs_getname() local
2104 if (!thread) in trace__vfs_getname()
2107 ttrace = thread__priv(thread); in trace__vfs_getname()
2156 struct thread *thread = machine__findnew_thread(trace->host, in trace__sched_stat_runtime() local
2159 struct thread_trace *ttrace = thread__trace(thread, trace->output); in trace__sched_stat_runtime()
2166 thread__put(thread); in trace__sched_stat_runtime()
2176 thread__put(thread); in trace__sched_stat_runtime()
2224 struct thread *thread; in trace__pgfault() local
2231 thread = machine__findnew_thread(trace->host, sample->pid, sample->tid); in trace__pgfault()
2232 ttrace = thread__trace(thread, trace->output); in trace__pgfault()
2244 thread__find_addr_location(thread, cpumode, MAP__FUNCTION, in trace__pgfault()
2247 trace__fprintf_entry_head(trace, thread, 0, sample->time, trace->output); in trace__pgfault()
2257 thread__find_addr_location(thread, cpumode, MAP__VARIABLE, in trace__pgfault()
2261 thread__find_addr_location(thread, cpumode, in trace__pgfault()
2276 thread__put(thread); in trace__pgfault()
2891 static int trace__fprintf_one_thread(struct thread *thread, void *priv) in trace__fprintf_one_thread() argument
2897 struct thread_trace *ttrace = thread__priv(thread); in trace__fprintf_one_thread()
2905 printed += fprintf(fp, " %s (%d), ", thread__comm_str(thread), thread->tid); in trace__fprintf_one_thread()