Home
last modified time | relevance | path

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

123456

/system/core/libmemunreachable/
DThreadCapture.cpp81 bool ReleaseThread(pid_t tid);
86 int CaptureThread(pid_t tid);
87 bool ReleaseThread(pid_t tid, unsigned int signal);
88 int PtraceAttach(pid_t tid);
89 void PtraceDetach(pid_t tid, unsigned int signal);
90 bool PtraceThreadInfo(pid_t tid, ThreadInfo& thread_info);
138 pid_t tid = atoi(dirent->d_name); in ListThreads() local
139 if (tid <= 0) { in ListThreads()
142 tids.push_back(tid); in ListThreads()
179 void ThreadCaptureImpl::PtraceDetach(pid_t tid, unsigned int signal) { in PtraceDetach() argument
[all …]
/system/core/debuggerd/handler/
Ddebuggerd_fallback.cpp79 thread.tid = gettid(); in debuggerd_fallback_trace()
116 long tid = strtol(ent->d_name, &end, 10); in iterate_siblings() local
121 if (tid != current_tid) { in iterate_siblings()
122 callback(tid, output_fd); in iterate_siblings()
139 pid_t tid; in forward_output() local
140 if (TEMP_FAILURE_RETRY(read(src_fd, &tid, sizeof(tid))) != sizeof(tid)) { in forward_output()
145 if (tid != expected_tid) { in forward_output()
146 async_safe_format_log(ANDROID_LOG_ERROR, "libc", "received tid %d, expected %d", tid, in forward_output()
169 int32_t tid; member
173 static uint64_t pack_thread_fd(pid_t tid, int fd) { in pack_thread_fd() argument
[all …]
/system/core/libcutils/
Dsched_policy.cpp69 static int add_tid_to_cgroup(int tid, int fd) in add_tid_to_cgroup() argument
82 while (tid > 0) { in add_tid_to_cgroup()
83 *--ptr = '0' + (tid % 10); in add_tid_to_cgroup()
84 tid = tid / 10; in add_tid_to_cgroup()
187 static int getCGroupSubsys(int tid, const char* subsys, char* buf, size_t bufLen) in getCGroupSubsys() argument
194 snprintf(pathBuf, sizeof(pathBuf), "/proc/%d/cgroup", tid); in getCGroupSubsys()
248 int get_sched_policy(int tid, SchedPolicy *policy) in get_sched_policy() argument
250 if (tid == 0) { in get_sched_policy()
251 tid = gettid(); in get_sched_policy()
259 if (getCGroupSubsys(tid, "schedtune", grpBuf, sizeof(grpBuf)) < 0) return -1; in get_sched_policy()
[all …]
/system/nfc/src/nfc/llcp/
Dllcp_sdp.cc103 static void llcp_sdp_add_sdreq(uint8_t tid, char* p_name) { in llcp_sdp_add_sdreq() argument
112 UINT8_TO_BE_STREAM(p, tid); in llcp_sdp_add_sdreq()
128 tLLCP_STATUS llcp_sdp_send_sdreq(uint8_t tid, char* p_name) { in llcp_sdp_send_sdreq() argument
134 << StringPrintf("tid=0x%x, ServiceName=%s", tid, p_name); in llcp_sdp_send_sdreq()
157 llcp_sdp_add_sdreq(tid, p_name); in llcp_sdp_send_sdreq()
170 llcp_sdp_add_sdreq(tid, p_name); in llcp_sdp_send_sdreq()
200 static void llcp_sdp_add_sdres(uint8_t tid, uint8_t sap) { in llcp_sdp_add_sdres() argument
208 UINT8_TO_BE_STREAM(p, tid); in llcp_sdp_add_sdres()
224 static tLLCP_STATUS llcp_sdp_send_sdres(uint8_t tid, uint8_t sap) { in llcp_sdp_send_sdres() argument
229 << StringPrintf("tid=0x%x, SAP=0x%x", tid, sap); in llcp_sdp_send_sdres()
[all …]
/system/extras/memory_replay/
DThreads.cpp76 Thread* Threads::CreateThread(pid_t tid) { in CreateThread() argument
80 Thread* thread = FindEmptyEntry(tid); in CreateThread()
85 thread->tid_ = tid; in CreateThread()
89 err(1, "Failed to create thread %d: %s\n", tid, strerror(errno)); in CreateThread()
96 Thread* Threads::FindThread(pid_t tid) { in FindThread() argument
97 size_t index = GetHashEntry(tid); in FindThread()
100 if (cur_tid == tid) { in FindThread()
123 size_t Threads::GetHashEntry(pid_t tid) { in GetHashEntry() argument
124 return tid % max_threads_; in GetHashEntry()
127 Thread* Threads::FindEmptyEntry(pid_t tid) { in FindEmptyEntry() argument
[all …]
DThreads.h31 Thread* CreateThread(pid_t tid);
32 Thread* FindThread(pid_t tid);
49 Thread* FindEmptyEntry(pid_t tid);
50 size_t GetHashEntry(pid_t tid);
/system/core/libutils/
DProcessCallStack.cpp77 static String8 getThreadName(pid_t tid) { in getThreadName() argument
83 snprintf(path, sizeof(path), PATH_THREAD_NAME, tid); in getThreadName()
93 return String8::format("[err-unknown-tid-%d]", tid); in getThreadName()
156 pid_t tid = -1; in update() local
157 sscanf(ep->d_name, "%d", &tid); in update()
159 if (tid < 0) { in update()
166 ssize_t idx = mThreadMap.add(tid, ThreadInfo()); in update()
179 int ignoreDepth = (selfPid == tid) ? IGNORE_DEPTH_CURRENT_THREAD : 0; in update()
182 threadInfo.callStack.update(ignoreDepth, tid); in update()
185 threadInfo.threadName = getThreadName(tid); in update()
[all …]
/system/core/debuggerd/
Dcrash_dump.cpp67 static bool pid_contains_tid(int pid_proc_fd, pid_t tid) { in pid_contains_tid() argument
69 std::string task_path = StringPrintf("task/%d", tid); in pid_contains_tid()
83 static bool ptrace_seize_thread(int pid_proc_fd, pid_t tid, std::string* error, int flags = 0) { in ptrace_seize_thread() argument
84 if (ptrace(PTRACE_SEIZE, tid, 0, flags) != 0) { in ptrace_seize_thread()
86 pid_t tracer = get_tracer(tid); in ptrace_seize_thread()
88 *error = StringPrintf("failed to attach to thread %d, already traced by %d (%s)", tid, in ptrace_seize_thread()
94 *error = StringPrintf("failed to attach to thread %d: %s", tid, strerror(errno)); in ptrace_seize_thread()
99 if (!pid_contains_tid(pid_proc_fd, tid)) { in ptrace_seize_thread()
100 if (ptrace(PTRACE_DETACH, tid, 0, 0) != 0) { in ptrace_seize_thread()
101 PLOG(WARNING) << "failed to detach from thread " << tid; in ptrace_seize_thread()
[all …]
/system/extras/memory_replay/dumps/
DREADME9 <tid>: <action_name> <ptr> [<optional_arguments>]
11 <tid>
22 thread_done - Terminate the thread with the given tid.
26 <tid>: malloc <ptr> <size>
33 <tid>: calloc <ptr> <nmemb> <size>
41 <tid>:realloc <new_ptr> <old_ptr> <size>
50 <tid>:memalign <ptr> <alignment> <size>
58 <tid>: free <ptr>
66 <tid>: thread_done 0x0
67 Indicates that the thread <tid> has completed.
/system/bt/utils/src/
Dbt_utils.cc115 int tid = gettid(); in raise_priority_a2dp() local
130 rc = set_sched_policy(tid, SP_AUDIO_SYS); in raise_priority_a2dp()
134 g_TaskIDs[high_task] = tid; in raise_priority_a2dp()
138 LOG_WARN(LOG_TAG, "failed to change sched policy, tid %d, err: %d", tid, in raise_priority_a2dp()
148 const int rc = sched_setscheduler(tid, SCHED_FIFO, &rt_params); in raise_priority_a2dp()
152 __func__, A2DP_RT_PRIORITY, tid, strerror(errno)); in raise_priority_a2dp()
/system/core/libbacktrace/
DBacktrace.cpp41 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) in Backtrace() argument
42 : pid_(pid), tid_(tid), map_(map), map_shared_(true) { in Backtrace()
123 Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { in Create() argument
126 if (tid == BACKTRACE_CURRENT_THREAD) { in Create()
127 tid = gettid(); in Create()
129 } else if (tid == BACKTRACE_CURRENT_THREAD) { in Create()
130 tid = pid; in Create()
134 return new UnwindStackCurrent(pid, tid, map); in Create()
136 return new UnwindStackPtrace(pid, tid, map); in Create()
DThreadEntry.cpp33 ThreadEntry::ThreadEntry(pid_t pid, pid_t tid) in ThreadEntry() argument
34 : pid_(pid), tid_(tid), ref_count_(1), mutex_(PTHREAD_MUTEX_INITIALIZER), in ThreadEntry()
49 ThreadEntry* ThreadEntry::Get(pid_t pid, pid_t tid, bool create) { in Get() argument
53 if (entry->Match(pid, tid)) { in Get()
61 entry = new ThreadEntry(pid, tid); in Get()
/system/extras/simpleperf/
DCallChainJoiner.cpp45 void LRUCache::AddCallChain(pid_t tid, std::vector<uint64_t>& ips, std::vector<uint64_t>& sps) { in AddCallChain() argument
49 CacheNode* node = GetNode(tid, ips[i], sps[i]); in AddCallChain()
105 return n1->tid == n2->tid && n1->ip == n2->ip && n1->sp == n2->sp; in CacheNodeEqual()
112 CacheNode* LRUCache::GetNode(uint32_t tid, uint64_t ip, uint64_t sp) { in GetNode() argument
113 CacheNode* node = FindNode(tid, ip, sp); in GetNode()
123 node->tid = tid; in GetNode()
177 static bool WriteCallChain(FILE* fp, pid_t pid, pid_t tid, CallChainJoiner::ChainType type, in WriteCallChain() argument
193 MoveToBinaryFormat(tid, p); in WriteCallChain()
206 static bool ReadCallChain(FILE* fp, pid_t& pid, pid_t& tid, CallChainJoiner::ChainType& type, in ReadCallChain() argument
215 MoveFromBinaryFormat(tid, p); in ReadCallChain()
[all …]
DCallChainJoiner.h36 uint32_t tid; member
73 void AddCallChain(pid_t tid, std::vector<uint64_t>& ips, std::vector<uint64_t>& sps);
79 CacheNode* FindNode(uint32_t tid, uint64_t ip, uint64_t sp) { in FindNode() argument
81 key.tid = tid; in FindNode()
125 CacheNode* GetNode(uint32_t tid, uint64_t ip, uint64_t sp);
158 bool AddCallChain(pid_t pid, pid_t tid, ChainType type, const std::vector<uint64_t>& ips,
161 bool GetNextCallChain(pid_t& pid, pid_t& tid, ChainType& type, std::vector<uint64_t>& ips,
Dinplace_sampler_lib.cpp149 int tid = static_cast<int>(strtol(value, &value, 10)); in ParseStartProfilingMessage() local
150 monitor_tid_filter_.insert(tid); in ParseStartProfilingMessage()
220 for (auto& tid : tids) { in CheckThreadNameChange() local
221 if (tid == tid_) { in CheckThreadNameChange()
225 if (monitor_all_threads_ || monitor_tid_filter_.find(tid) != monitor_tid_filter_.end()) { in CheckThreadNameChange()
227 if (GetThreadName(tid, &name)) { in CheckThreadNameChange()
228 current[tid] = name; in CheckThreadNameChange()
234 pid_t tid = pair.first; in CheckThreadNameChange() local
235 auto it = threads_.find(tid); in CheckThreadNameChange()
237 threads_[tid].name = pair.second; in CheckThreadNameChange()
[all …]
Dthread_tree.cpp48 void ThreadTree::SetThreadName(int pid, int tid, const std::string& comm) { in SetThreadName() argument
49 ThreadEntry* thread = FindThreadOrNew(pid, tid); in SetThreadName()
57 void ThreadTree::ForkThread(int pid, int tid, int ppid, int ptid) { in ForkThread() argument
59 ThreadEntry* child = FindThreadOrNew(pid, tid); in ForkThread()
67 ThreadEntry* ThreadTree::FindThreadOrNew(int pid, int tid) { in FindThreadOrNew() argument
68 auto it = thread_tree_.find(tid); in FindThreadOrNew()
70 return CreateThread(pid, tid); in FindThreadOrNew()
75 << it->second.get()->pid << ", " << tid << "), actual (" << pid in FindThreadOrNew()
76 << ", " << tid << ")"; in FindThreadOrNew()
82 ThreadEntry* ThreadTree::CreateThread(int pid, int tid) { in CreateThread() argument
[all …]
Dsample_tree_test.cpp26 int tid; member
32 SampleEntry(int pid, int tid, const char* thread_comm, in SampleEntry()
36 tid(tid), in SampleEntry()
44 BUILD_COMPARE_VALUE_FUNCTION(TestCompareTid, tid);
64 void AddSample(int pid, int tid, uint64_t ip, bool in_kernel) { in AddSample() argument
65 const ThreadEntry* thread = thread_tree_->FindThreadOrNew(pid, tid); in AddSample()
68 pid, tid, thread->comm, map->dso->Path(), map->start_addr))); in AddSample()
101 ASSERT_EQ(expected.tid, sample.tid); in SampleMatchExpectation()
DCallChainJoiner_test.cpp26 static bool JoinCallChain(LRUCache& cache, uint32_t tid, in JoinCallChain() argument
33 cache.AddCallChain(tid, tmp_ip, tmp_sp); in JoinCallChain()
180 pid_t tid; in TEST_F() local
186 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F()
188 ASSERT_EQ(tid, expected_pid); in TEST_F()
200 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F()
202 ASSERT_EQ(tid, expected_pid); in TEST_F()
209 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F()
211 ASSERT_EQ(tid, expected_pid); in TEST_F()
223 ASSERT_FALSE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F()
[all …]
DInplaceSamplerClient.cpp107 for (auto& tid : tids_) { in SendStartProfilingMessage() local
113 options += std::to_string(tid); in SendStartProfilingMessage()
150 uint32_t tid; in HandleMessage() local
152 MoveFromBinaryFormat(tid, p); in HandleMessage()
153 CommRecord r(attr_, pid_, tid, p, Id(), time); in HandleMessage()
172 uint32_t tid; in HandleMessage() local
176 MoveFromBinaryFormat(tid, p); in HandleMessage()
182 SampleRecord r(attr_, Id(), ips[0], pid_, tid, time, 0, period, ips); in HandleMessage()
/system/extras/simpleperf/scripts/inferno/
Ddata_types.py27 def __init__(self, tid, pid): argument
28 self.tid = tid
66 def get_thread(self, tid, pid): argument
67 thread = self.threads.get(tid)
69 thread = self.threads[tid] = Thread(tid, pid)
73 thread = self.get_thread(sample.tid, sample.pid)
/system/extras/latencytop/
Dlatencytop.c46 …tency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal);
70 int pid, tid; in main() local
76 pid = tid = 0; in main()
112 tid = atoi(argv[++i]); in main()
120 if (tid && !pid) { in main()
145 if (tid) { in main()
146 e = read_thread_stats(e, erase, pid, tid, 1); in main()
157 if (tid) { in main()
158 printf("Latencies for thread %d in process %d:\n", tid, pid); in main()
205 int tid; in read_process_stats() local
[all …]
/system/core/libcutils/include_vndk/cutils/
Dsched_policy.h57 extern int set_cpuset_policy(int tid, SchedPolicy policy);
65 extern int set_sched_policy(int tid, SchedPolicy policy);
71 extern int get_sched_policy(int tid, SchedPolicy *policy);
/system/core/libcutils/include/cutils/
Dsched_policy.h57 extern int set_cpuset_policy(int tid, SchedPolicy policy);
65 extern int set_sched_policy(int tid, SchedPolicy policy);
71 extern int get_sched_policy(int tid, SchedPolicy *policy);
/system/core/libprocinfo/include/procinfo/
Dprocess.h50 pid_t tid; member
59 bool GetProcessInfo(pid_t tid, ProcessInfo* process_info);
82 pid_t tid; variable
83 if (!android::base::ParseInt(dent->d_name, &tid, 1, std::numeric_limits<pid_t>::max())) {
88 out->insert(out->end(), tid);
/system/bt/osi/src/
Dthread.cc45 pid_t tid; member
151 const int rc = setpriority(PRIO_PROCESS, thread->tid, priority); in thread_set_priority()
155 __func__, priority, thread->tid, rc); in thread_set_priority()
168 const int rc = sched_setscheduler(thread->tid, SCHED_FIFO, &rt_params); in thread_set_rt_priority()
172 __func__, priority, thread->tid, strerror(errno)); in thread_set_rt_priority()
209 thread->tid = gettid(); in run_thread()
212 thread->tid, thread->name); in run_thread()
242 thread->tid, thread->name); in run_thread()

123456