• Home
  • Raw
  • Download

Lines Matching refs:pid

52 static std::string GetProcessComm(const pid_t pid) {  in GetProcessComm()  argument
53 std::string pid_path = android::base::StringPrintf("/proc/%d/comm", pid); in GetProcessComm()
76 for (auto pid : pid_set) { in PrintDmaBufTable() local
77 printf("%16s:%-5d |", GetProcessComm(pid).c_str(), pid); in PrintDmaBufTable()
92 for (pid_t pid : pid_set) { in PrintDmaBufTable() local
94 if (buf.fdrefs().count(pid) == 1) { in PrintDmaBufTable()
97 pid_fdrefs += buf.fdrefs().at(pid); in PrintDmaBufTable()
99 if (buf.maprefs().count(pid) == 1) { in PrintDmaBufTable()
100 pid_maprefs += buf.maprefs().at(pid); in PrintDmaBufTable()
110 per_pid_size[pid] += buf.size() / 1024; in PrintDmaBufTable()
122 for (auto pid : pid_set) { in PrintDmaBufTable() local
123 printf("%19" PRIu64 " kB |", per_pid_size[pid]); in PrintDmaBufTable()
141 for (auto pid : buf.pids()) { in PrintDmaBufPerProcess() local
142 pid_to_inodes[pid].insert(buf.inode()); in PrintDmaBufPerProcess()
156 for (auto& [pid, inodes] : pid_to_inodes) { in PrintDmaBufPerProcess()
160 printf("%16s:%-5d\n", GetProcessComm(pid).c_str(), pid); in PrintDmaBufPerProcess()
164 uint64_t proc_pss = buf.Pss(pid); in PrintDmaBufPerProcess()
200 int pid = atoi(dent->d_name); in ReadDmaBufs() local
201 if (pid == 0) { in ReadDmaBufs()
205 if (!ReadDmaBufFdRefs(pid, bufs)) { in ReadDmaBufs()
206 fprintf(stderr, "Failed to read dmabuf fd references for pid %d\n", pid); in ReadDmaBufs()
211 if (!ReadDmaBufMapRefs(pid, bufs)) { in ReadDmaBufs()
212 fprintf(stderr, "Failed to read dmabuf map references for pid %d\n", pid); in ReadDmaBufs()
274 pid_t pid = -1; in main() local
284 pid = atoi(argv[optind]); in main()
285 if (pid == 0) { in main()
297 if (pid != -1) { in main()
298 if (!ReadDmaBufInfo(pid, &bufs)) { in main()
299 fprintf(stderr, "Unable to read dmabuf info for %d\n", pid); in main()