Lines Matching refs:tid
79 bool CreateAndChangeDumpDir(std::filesystem::path thread_dir, pid_t tid, bool is_main_thread) { in CreateAndChangeDumpDir() argument
80 std::string dir_name = std::to_string(tid); in CreateAndChangeDumpDir()
84 fprintf(stderr, "Failed to create directory for tid %d\n", tid); in CreateAndChangeDumpDir()
104 bool SaveStack(pid_t tid, const std::vector<std::pair<uint64_t, uint64_t>>& stacks, in SaveStack() argument
118 auto process_memory = unwindstack::Memory::CreateProcessMemory(tid); in SaveStack()
179 bool CreateElfFromMemory(pid_t tid, unwindstack::MapInfo* map_info, std::string* name) { in CreateElfFromMemory() argument
191 auto memory = unwindstack::Memory::CreateProcessMemory(tid); in CreateElfFromMemory()
217 bool CopyMapInfo(pid_t tid, unwindstack::MapInfo* map_info, in CopyMapInfo() argument
231 if (CreateElfFromMemory(tid, map_info, name)) { in CopyMapInfo()
263 void SaveMapInfo(FILE* maps_fp, pid_t tid, unwindstack::MapInfo* map_info, in SaveMapInfo() argument
267 SaveMapInfo(maps_fp, tid, prev_info.get(), copied_files); in SaveMapInfo()
270 if (CopyMapInfo(tid, map_info, copied_files, &map_name)) { in SaveMapInfo()
275 bool SaveData(pid_t tid, const std::filesystem::path& cwd, bool is_main_thread, FILE* output_fp) { in SaveData() argument
276 fprintf(output_fp, "-------------------- tid = %d %s--------------------\n", tid, in SaveData()
278 unwindstack::Regs* regs = unwindstack::Regs::RemoteGet(tid); in SaveData()
284 if (!CreateAndChangeDumpDir(cwd, tid, is_main_thread)) { in SaveData()
295 unwindstack::UnwinderFromPid unwinder(1024, tid); in SaveData()
323 if (!SaveStack(tid, stacks, output_fp)) { in SaveData()
340 SaveMapInfo(maps_fp.get(), tid, map_info, copied_files); in SaveData()
412 for (const pid_t& tid : proc.tids()) { in main() local
413 if (!proc.Attach(tid)) return EXIT_FAILURE; in main()
414 if (!SaveData(tid, cwd, /*is_main_thread=*/false, output_fp.get())) return EXIT_FAILURE; in main()
415 if (!proc.Detach(tid)) return EXIT_FAILURE; in main()