Home
last modified time | relevance | path

Searched refs:tid (Results 1 – 25 of 42) sorted by relevance

12

/system/core/libcutils/
Dsched_policy.c68 static int add_tid_to_cgroup(int tid, SchedPolicy policy) in add_tid_to_cgroup() argument
101 while (tid > 0) { in add_tid_to_cgroup()
102 *--ptr = '0' + (tid % 10); in add_tid_to_cgroup()
103 tid = tid / 10; in add_tid_to_cgroup()
161 static int getSchedulerGroup(int tid, char* buf, size_t bufLen) in getSchedulerGroup() argument
168 snprintf(pathBuf, sizeof(pathBuf), "/proc/%d/cgroup", tid); in getSchedulerGroup()
222 int get_sched_policy(int tid, SchedPolicy *policy) in get_sched_policy() argument
225 if (tid == 0) { in get_sched_policy()
226 tid = gettid(); in get_sched_policy()
233 if (getSchedulerGroup(tid, grpBuf, sizeof(grpBuf)) < 0) in get_sched_policy()
[all …]
Ddebugger.c23 int dump_tombstone(pid_t tid, char* pathbuf, size_t pathlen) { in dump_tombstone() argument
31 msg.tid = tid; in dump_tombstone()
56 int dump_backtrace_to_file(pid_t tid, int fd) { in dump_backtrace_to_file() argument
64 msg.tid = tid; in dump_backtrace_to_file()
/system/core/debuggerd/
Ddebuggerd.c53 pid_t pid, tid; member
160 static int get_process_info(pid_t tid, pid_t* out_pid, uid_t* out_uid, uid_t* out_gid) { in get_process_info() argument
162 snprintf(path, sizeof(path), "/proc/%d/status", tid); in get_process_info()
227 out_request->tid = msg.tid; in read_request()
237 snprintf(buf, sizeof buf, "/proc/%d/task/%d", out_request->pid, out_request->tid); in read_request()
240 out_request->tid, out_request->pid); in read_request()
247 status = get_process_info(out_request->tid, &out_request->pid, in read_request()
251 out_request->tid); in read_request()
279 request.pid, request.uid, request.gid, request.tid); in handle_request()
292 if (ptrace(PTRACE_ATTACH, request.tid, 0, 0)) { in handle_request()
[all …]
Dbacktrace.c65 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()
[all …]
Dtombstone.c178 static void dump_fault_addr(log_t* log, pid_t tid, int sig) in dump_fault_addr() argument
183 if(ptrace(PTRACE_GETSIGINFO, tid, 0, &si)){ in dump_fault_addr()
196 static void dump_thread_info(log_t* log, pid_t pid, pid_t tid, bool at_fault) { in dump_thread_info() argument
202 snprintf(path, sizeof(path), "/proc/%d/comm", tid); in dump_thread_info()
224 _LOG(log, SCOPE_AT_FAULT, "pid: %d, tid: %d, name: %s >>> %s <<<\n", pid, tid, in dump_thread_info()
229 pid, tid, threadname ? threadname : "UNKNOWN"); in dump_thread_info()
234 log_t* log, pid_t tid __attribute((unused)), bool at_fault, in dump_backtrace()
250 static void dump_stack_segment(const ptrace_context_t* context, log_t* log, pid_t tid, in dump_stack_segment() argument
254 if (!try_get_word_ptrace(tid, *sp, &stack_content)) { in dump_stack_segment()
298 static void dump_stack(const ptrace_context_t* context, log_t* log, pid_t tid, bool at_fault, in dump_stack() argument
[all …]
Dutility.c89 int wait_for_signal(pid_t tid, int* total_sleep_time_usec) { in wait_for_signal() argument
92 pid_t n = waitpid(tid, &status, __WALL | WNOHANG); in wait_for_signal()
108 LOG("timed out waiting for tid=%d to die\n", tid); in wait_for_signal()
119 void wait_for_stop(pid_t tid, int* total_sleep_time_usec) { in wait_for_stop() argument
121 while (TEMP_FAILURE_RETRY(ptrace(PTRACE_GETSIGINFO, tid, 0, &si)) < 0 && errno == ESRCH) { in wait_for_stop()
123 LOG("timed out waiting for tid=%d to stop\n", tid); in wait_for_stop()
Dmachine.h28 void dump_memory_and_code(const ptrace_context_t* context, log_t* log, pid_t tid, bool at_fault);
29 void dump_registers(const ptrace_context_t* context, log_t* log, pid_t tid, bool at_fault);
Dutility.h63 int wait_for_signal(pid_t tid, int* total_sleep_time_usec);
64 void wait_for_stop(pid_t tid, int* total_sleep_time_usec);
/system/core/toolbox/
Dschedtop.c19 int tid; member
94 static void add_thread(int pid, int tid, struct thread_info *proc_info) in add_thread() argument
100 if(tid == 0) in add_thread()
105 info->tid = tid; in add_thread()
107 if(tid) in add_thread()
108 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid); in add_thread()
122 if (!tid) { in add_thread()
130 if (tid) in add_thread()
131 sprintf(line, "/proc/%d/task/%d/stat", pid, tid); in add_thread()
149 if(tid == 0) in add_thread()
[all …]
Dps.c34 static int ps_line(int pid, int tid, char *namefilter) in ps_line() argument
52 if(tid) { in ps_line()
53 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); in ps_line()
55 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid); in ps_line()
135 if(tid != 0) { in ps_line()
137 pid = tid; in ps_line()
195 int tid = atoi(de->d_name); in ps_threads() local
196 if(tid == pid) continue; in ps_threads()
197 ps_line(pid, tid, namefilter); in ps_threads()
Dtop.c56 pid_t tid; member
101 static struct proc_info *find_old_proc(pid_t pid, pid_t tid);
230 pid_t pid, tid; in read_procs() local
258 proc->pid = proc->tid = pid; in read_procs()
291 tid = atoi(tid_dir->d_name); in read_procs()
295 proc->pid = pid; proc->tid = tid; in read_procs()
297 sprintf(filename, "/proc/%d/task/%d/stat", pid, tid); in read_procs()
300 read_policy(tid, proc); in read_procs()
419 old_proc = find_old_proc(new_procs[i]->pid, new_procs[i]->tid); in print_procs()
483 …printf("%5d %5d %2d %3ld%% %c %6ldK %6ldK %3s %-8.8s %-15s %s\n", proc->pid, proc->tid, proc->prs,… in print_procs()
[all …]
/system/core/libcorkscrew/
Dbacktrace.c44 extern int tgkill(int tgid, int tid, int sig);
57 static int tgkill(int tgid, int tid, int sig) { in tgkill() argument
58 return syscall(__NR_tgkill, tgid, tid, sig); in tgkill()
141 ssize_t unwind_backtrace_thread(pid_t tid, backtrace_frame_t* backtrace, in unwind_backtrace_thread() argument
143 if (tid == gettid()) { in unwind_backtrace_thread()
147 ALOGV("Unwinding thread %d from thread %d.", tid, gettid()); in unwind_backtrace_thread()
167 android_atomic_release_store(tid, &g_unwind_signal_state.tid_state); in unwind_backtrace_thread()
170 int32_t tid_state = tid; in unwind_backtrace_thread()
171 if (tgkill(getpid(), tid, SIGURG)) { in unwind_backtrace_thread()
172 ALOGV("Failed to send SIGURG to thread %d.", tid); in unwind_backtrace_thread()
[all …]
Dptrace.c39 memory->tid = -1; in init_memory()
43 void init_memory_ptrace(memory_t* memory, pid_t tid) { in init_memory_ptrace() argument
44 memory->tid = tid; in init_memory_ptrace()
55 if (memory->tid < 0) { in try_get_word()
67 *out_value = ptrace(PTRACE_PEEKTEXT, memory->tid, (void*)ptr, NULL); in try_get_word()
70 "ptrace() errno=%d", ptr, memory->tid, errno); in try_get_word()
77 bool try_get_word_ptrace(pid_t tid, uintptr_t ptr, uint32_t* out_value) { in try_get_word_ptrace() argument
79 init_memory_ptrace(&memory, tid); in try_get_word_ptrace()
/system/core/debuggerd/arm/
Dmachine.c45 static void dump_memory(log_t* log, pid_t tid, uintptr_t addr, int scopeFlags) { in dump_memory() argument
82 long data = ptrace(PTRACE_PEEKTEXT, tid, (void*)p, NULL); in dump_memory()
114 log_t* log, pid_t tid, bool at_fault) { in dump_memory_and_code() argument
116 if(ptrace(PTRACE_GETREGS, tid, 0, &regs)) { in dump_memory_and_code()
138 dump_memory(log, tid, addr, scopeFlags | SCOPE_SENSITIVE); in dump_memory_and_code()
144 dump_memory(log, tid, (uintptr_t)regs.ARM_pc, scopeFlags); in dump_memory_and_code()
148 dump_memory(log, tid, (uintptr_t)regs.ARM_lr, scopeFlags); in dump_memory_and_code()
153 log_t* log, pid_t tid, bool at_fault) in dump_registers() argument
158 if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { in dump_registers()
177 if(ptrace(PTRACE_GETVFPREGS, tid, 0, &vfp_regs)) { in dump_registers()
/system/core/debuggerd/mips/
Dmachine.c39 static void dump_memory(log_t* log, pid_t tid, uintptr_t addr, int scopeFlags) { in dump_memory() argument
75 long data = ptrace(PTRACE_PEEKTEXT, tid, (void*)p, NULL); in dump_memory()
104 log_t* log, pid_t tid, bool at_fault) { in dump_memory_and_code() argument
106 if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { in dump_memory_and_code()
134 dump_memory(log, tid, addr, scopeFlags | SCOPE_SENSITIVE); in dump_memory_and_code()
142 dump_memory(log, tid, (uintptr_t)pc, scopeFlags); in dump_memory_and_code()
146 dump_memory(log, tid, (uintptr_t)ra, scopeFlags); in dump_memory_and_code()
151 log_t* log, pid_t tid, bool at_fault) in dump_registers() argument
156 if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { in dump_registers()
/system/core/include/cutils/
Ddebugger.h39 pid_t tid; member
47 int dump_tombstone(pid_t tid, char* pathbuf, size_t pathlen);
52 int dump_backtrace_to_file(pid_t tid, int fd);
Dsched_policy.h43 extern int set_sched_policy(int tid, SchedPolicy policy);
49 extern int get_sched_policy(int tid, SchedPolicy *policy);
Dlogger.h24 int32_t tid; /* generating process's tid */ member
39 int32_t tid; /* generating process's tid */ member
/system/extras/tests/bionic/libc/other/
Dtest_timer_create2.c51 timer_t tid; in create() local
59 if (timer_create (CLOCK_REALTIME, &se, &tid) < 0) in create()
64 printf("timer_create successfully = %d.\n", (int)tid); in create()
69 if (timer_settime (tid, TIMER_ABSTIME, &ts, &ots) < 0) in create()
Dtest_timer_create3.c35 static timer_t tid; variable
60 timer_settime(tid, TIMER_ABSTIME, &ts, NULL); in handle()
76 if (timer_create (CLOCK_REALTIME, &se, &tid) < 0) in create()
86 if (timer_settime (tid, TIMER_ABSTIME, &ts, &ots) < 0) in create()
Dtest_timer_create.c51 timer_t tid; in create() local
60 if (timer_create (CLOCK_REALTIME, &se, &tid) < 0) in create()
70 if (timer_settime (tid, TIMER_ABSTIME, &ts, &ots) < 0) in create()
/system/extras/latencytop/
Dlatencytop.c45 …tency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal);
71 int pid, tid; in main() local
77 pid = tid = 0; in main()
113 tid = atoi(argv[++i]); in main()
121 if (tid && !pid) { in main()
146 if (tid) { in main()
147 e = read_thread_stats(e, erase, pid, tid, 1); in main()
158 if (tid) { in main()
159 printf("Latencies for thread %d in process %d:\n", tid, pid); in main()
206 int tid; in read_process_stats() local
[all …]
/system/core/debuggerd/x86/
Dmachine.c35 log_t* log, pid_t tid, bool at_fault) { in dump_memory_and_code() argument
39 log_t* log, pid_t tid, bool at_fault) { in dump_registers() argument
43 if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { in dump_registers()
/system/core/include/corkscrew/
Dptrace.h41 pid_t tid; member
90 void init_memory_ptrace(memory_t* memory, pid_t tid);
103 bool try_get_word_ptrace(pid_t tid, uintptr_t ptr, uint32_t* out_value);
Dbacktrace.h67 ssize_t unwind_backtrace_thread(pid_t tid, backtrace_frame_t* backtrace,
75 ssize_t unwind_backtrace_ptrace(pid_t tid, const ptrace_context_t* context,

12