Lines Matching refs:tid
31 void ThreadTree::SetThreadName(int pid, int tid, const std::string& comm) { in SetThreadName() argument
32 ThreadEntry* thread = FindThreadOrNew(pid, tid); in SetThreadName()
40 void ThreadTree::ForkThread(int pid, int tid, int ppid, int ptid) { in ForkThread() argument
42 ThreadEntry* child = FindThreadOrNew(pid, tid); in ForkThread()
57 ThreadEntry* ThreadTree::FindThread(int tid) { in FindThread() argument
58 if (auto it = thread_tree_.find(tid); it != thread_tree_.end()) { in FindThread()
64 ThreadEntry* ThreadTree::FindThreadOrNew(int pid, int tid) { in FindThreadOrNew() argument
65 auto it = thread_tree_.find(tid); in FindThreadOrNew()
70 ExitThread(it->second.get()->pid, tid); in FindThreadOrNew()
72 return CreateThread(pid, tid); in FindThreadOrNew()
75 ThreadEntry* ThreadTree::CreateThread(int pid, int tid) { in CreateThread() argument
78 if (pid == tid) { in CreateThread()
88 pid, tid, in CreateThread()
92 auto pair = thread_tree_.insert(std::make_pair(tid, std::unique_ptr<ThreadEntry>(thread))); in CreateThread()
97 void ThreadTree::ExitThread(int pid, int tid) { in ExitThread() argument
98 auto it = thread_tree_.find(tid); in ExitThread()
127 void ThreadTree::AddThreadMap(int pid, int tid, uint64_t start_addr, uint64_t len, in AddThreadMap() argument
129 ThreadEntry* thread = FindThreadOrNew(pid, tid); in AddThreadMap()
309 AddThreadMap(r.data->pid, r.data->tid, r.data->addr, r.data->len, r.data->pgoff, r.filename); in Update()
319 AddThreadMap(r.data->pid, r.data->tid, r.data->addr, r.data->len, r.data->pgoff, filename, in Update()
324 SetThreadName(r.data->pid, r.data->tid, r.comm); in Update()
327 ForkThread(r.data->pid, r.data->tid, r.data->ppid, r.data->ptid); in Update()
330 ExitThread(r.data->pid, r.data->tid); in Update()