Lines Matching refs:pid
100 VirtualThread &VirtualRuntime::UpdateThread(pid_t pid, pid_t tid, const std::string name) in UpdateThread() argument
105 VirtualThread &thread = GetThread(pid, tid, name); in UpdateThread()
115 VirtualThread &VirtualRuntime::CreateThread(pid_t pid, pid_t tid, const std::string name) in CreateThread() argument
118 if (pid == tid) { in CreateThread()
120 std::forward_as_tuple(pid, symbolsFiles_)); in CreateThread()
125 std::forward_as_tuple(pid, tid, GetThread(pid, pid), symbolsFiles_)); in CreateThread()
129 if (pid == tid && !IsKernelThread(pid)) { in CreateThread()
143 thread.name_ = ReadThreadName(tid, pid != tid); in CreateThread()
145 HLOGD("create a new thread record for %u:%u:%s with %zu dso", pid, tid, in CreateThread()
148 … auto commRecord = std::make_unique<PerfRecordComm>(IsKernelThread(pid), pid, tid, thread.name_); in CreateThread()
151 if (pid == tid) { in CreateThread()
207 VirtualThread &VirtualRuntime::GetThread(pid_t pid, pid_t tid, const std::string name) in GetThread() argument
209 if (userSpaceThreadMap_.find(pid) == userSpaceThreadMap_.end()) { in GetThread()
212 CreateThread(pid, pid); in GetThread()
218 return CreateThread(pid, tid, name); in GetThread()
224 void VirtualRuntime::UpdateThreadMaps(pid_t pid, pid_t tid, const std::string filename, in UpdateThreadMaps() argument
227 VirtualThread &thread = GetThread(pid, tid); in UpdateThreadMaps()
359 u32 pid = recordSample->data_.pid; in DedupFromRecord() local
363 auto entry = processStackMap_.find(pid); in DedupFromRecord()
368 table = std::make_shared<UniqueStackTable>(pid); in DedupFromRecord()
369 processStackMap_[pid] = table; in DedupFromRecord()
394 u32 pid; in CollectDedupSymbol() local
397 pid = table->GetPid(); in CollectDedupSymbol()
410 userSymbolsHits[pid].insert(node->section.ip); in CollectDedupSymbol()
467 pid_t pid = static_cast<pid_t>(recordSample.data_.pid); in SymbolicCallFrame() local
469 if (server_pid != pid) { in SymbolicCallFrame()
470 pid = tid = server_pid; in SymbolicCallFrame()
472 auto symbol = GetSymbol(ip, pid, tid, context); in SymbolicCallFrame()
481 auto StackTable = processStackMap_.find(recordSample.data_.pid); in RecoverCallStack()
483 HLOGV("not found %" PRIu32 " pid", recordSample.data_.pid); in RecoverCallStack()
566 pid_t pid = static_cast<pid_t>(recordSample.data_.pid); in UnwindFromRecord() local
568 if (server_pid != pid) { in UnwindFromRecord()
569 pid = tid = server_pid; in UnwindFromRecord()
571 auto &thread = UpdateThread(pid, tid); in UnwindFromRecord()
616 UpdateThread(recordSample.data_.pid, recordSample.data_.tid); in UpdateFromRecord()
620 pid_t pid = static_cast<pid_t>(recordSample.data_.server_pids[i]); in UpdateFromRecord() local
621 UpdateThread(pid, pid); in UpdateFromRecord()
634 HLOGV(" MMAP: size %d pid %u tid %u", recordMmap.header.size, recordMmap.data_.pid, in UpdateFromRecord()
641 if (IsKernelThread(recordMmap.data_.pid)) { in UpdateFromRecord()
642 UpdateKernelThreadMap(recordMmap.data_.pid, recordMmap.data_.addr, in UpdateFromRecord()
648 … NeedAdaptSandboxPath(recordMmap.data_.filename, recordMmap.data_.pid, recordMmap.header.size); in UpdateFromRecord()
649 FixHMBundleMmap(recordMmap.data_.filename, recordMmap.data_.pid, recordMmap.header.size); in UpdateFromRecord()
650 UpdateThreadMaps(recordMmap.data_.pid, recordMmap.data_.tid, recordMmap.data_.filename, in UpdateFromRecord()
694 …std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_… in CheckValidSandBoxMmap()
696 …UpdateThreadMaps(mmap2FirstSeg->data_.pid, mmap2FirstSeg->data_.tid, mmap2FirstSeg->data_.filename, in CheckValidSandBoxMmap()
705 …std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_… in CheckValidSandBoxMmap()
707 UpdateThreadMaps(mmap2FirstSeg->data_.pid, mmap2FirstSeg->data_.tid, curMap->name, in CheckValidSandBoxMmap()
712 …std::make_unique<PerfRecordMmap2>(recordMmap2.inKernel(), recordMmap2.data_.pid, recordMmap2.data_… in CheckValidSandBoxMmap()
717 … UpdateThreadMaps(mmap2SecondSegment->data_.pid, mmap2SecondSegment->data_.tid, curMap->name, in CheckValidSandBoxMmap()
747 HLOGV(" MMAP2: size %d pid %u tid %u", recordMmap2.header.size, recordMmap2.data_.pid, in UpdateFromRecord()
754 …if (NeedAdaptSandboxPath(recordMmap2.data_.filename, recordMmap2.data_.pid, recordMmap2.header.siz… in UpdateFromRecord()
755 … FixHMBundleMmap(recordMmap2.data_.filename, recordMmap2.data_.pid, recordMmap2.header.size); in UpdateFromRecord()
761 UpdateThreadMaps(recordMmap2.data_.pid, recordMmap2.data_.tid, recordMmap2.data_.filename, in UpdateFromRecord()
769 UpdateThread(recordComm.data_.pid, recordComm.data_.tid, recordComm.data_.comm); in UpdateFromRecord()
987 DfxSymbol VirtualRuntime::GetSymbol(uint64_t ip, pid_t pid, pid_t tid, const perf_callchain_context… in GetSymbol() argument
992 if (IsKernelThread(pid)) { in GetSymbol()
993 VirtualThread &kthread = GetThread(pid, tid); in GetSymbol()
994 HLOGM("try found addr in kernel thread %u with %zu maps", pid, in GetSymbol()
1007 symbol = GetUserSymbol(ip, GetThread(pid, tid)); in GetSymbol()
1019 symbol = GetKernelSymbol(ip, kernelSpaceMemMaps_, GetThread(pid, tid)); in GetSymbol()
1071 auto stackTable = std::make_shared<UniqueStackTable>(item.pid, item.tableSize); in ImportUniqueStackNodes()
1075 processStackMap_[item.pid] = std::move(stackTable); in ImportUniqueStackNodes()
1164 void VirtualRuntime::UpdateKernelThreadMap(pid_t pid, uint64_t begin, uint64_t len, in UpdateKernelThreadMap() argument
1167 HLOGV("update kernel thread map pid %u name:'%s'", pid, filename.c_str()); in UpdateKernelThreadMap()
1169 VirtualThread &thread = GetThread(pid, pid); in UpdateKernelThreadMap()
1228 void VirtualRuntime::FixHMBundleMmap(char *filename, int pid, u16 &headerSize) in FixHMBundleMmap() argument
1235 VirtualThread &thread = GetThread(pid, pid); in FixHMBundleMmap()
1252 bool VirtualRuntime::IsKernelThread(pid_t pid) in IsKernelThread() argument
1257 return pid == SYSMGR_PID || pid == devhostPid_; in IsKernelThread()