Lines Matching refs:tid
65 static void dump_thread(log_t* log, pid_t tid, ptrace_context_t* context, bool attached,
72 snprintf(path, sizeof(path), "/proc/%d/comm", tid);
84 _LOG(log, false, "\n\"%s\" sysTid=%d\n", threadname ? threadname : "<unknown>", tid);
86 if (!attached && ptrace(PTRACE_ATTACH, tid, 0, 0) < 0) {
91 wait_for_stop(tid, total_sleep_time_usec);
94 ssize_t frames = unwind_backtrace_ptrace(tid, context, backtrace, 0, STACK_DEPTH);
109 if (!attached && ptrace(PTRACE_DETACH, tid, 0, 0) != 0) {
110 LOG("ptrace detach from %d failed: %s\n", tid, strerror(errno));
115 void dump_backtrace(int fd, pid_t pid, pid_t tid, bool* detach_failed,
121 ptrace_context_t* context = load_ptrace_context(tid);
123 dump_thread(&log, tid, context, true, detach_failed, total_sleep_time_usec);
138 if (*end || new_tid == tid) {