Lines Matching refs:tid
65 static void dump_thread(log_t* log, pid_t tid, ptrace_context_t* context, bool attached, in dump_thread() argument
72 snprintf(path, sizeof(path), "/proc/%d/comm", tid); in dump_thread()
85 threadname ? threadname : "<unknown>", tid); in dump_thread()
87 if (!attached && ptrace(PTRACE_ATTACH, tid, 0, 0) < 0) { in dump_thread()
92 wait_for_stop(tid, total_sleep_time_usec); in dump_thread()
95 ssize_t frames = unwind_backtrace_ptrace(tid, context, backtrace, 0, STACK_DEPTH); in dump_thread()
110 if (!attached && ptrace(PTRACE_DETACH, tid, 0, 0) != 0) { in dump_thread()
111 LOG("ptrace detach from %d failed: %s\n", tid, strerror(errno)); in dump_thread()
116 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed, in dump_backtrace() argument
123 ptrace_context_t* context = load_ptrace_context(tid); in dump_backtrace()
125 dump_thread(&log, tid, context, true, detach_failed, total_sleep_time_usec); in dump_backtrace()
139 if (*end || new_tid == tid) { in dump_backtrace()