Lines Matching refs:pid

54 static FdInfoResult ReadDmaBufFdInfo(pid_t pid, int fd, std::string* name, std::string* exporter,  in ReadDmaBufFdInfo()  argument
58 ::android::base::StringPrintf("%s/%d/fdinfo/%d", procfs_path.c_str(), pid, fd); in ReadDmaBufFdInfo()
109 bool ReadDmaBufFdRefs(int pid, std::vector<DmaBuffer>* dmabufs, in ReadDmaBufFdRefs() argument
117 ::android::base::StringPrintf("%s/%d/fdinfo", procfs_path.c_str(), pid); in ReadDmaBufFdRefs()
146 auto fdinfo_result = ReadDmaBufFdInfo(pid, fd, &name, &exporter, &count, &size, &inode, in ReadDmaBufFdRefs()
155 LOG(ERROR) << "Failed to read fd info for pid: " << pid << ", fd: " << fd; in ReadDmaBufFdRefs()
168 ::android::base::StringPrintf("%s/%d/fd/%d", procfs_path.c_str(), pid, fd); in ReadDmaBufFdRefs()
190 buf->AddFdRef(pid); in ReadDmaBufFdRefs()
195 db.AddFdRef(pid); in ReadDmaBufFdRefs()
201 bool ReadDmaBufMapRefs(pid_t pid, std::vector<DmaBuffer>* dmabufs, in ReadDmaBufMapRefs() argument
204 std::string mapspath = ::android::base::StringPrintf("%s/%d/maps", procfs_path.c_str(), pid); in ReadDmaBufMapRefs()
207 LOG(ERROR) << "Failed to open " << mapspath << " for pid: " << pid; in ReadDmaBufMapRefs()
223 buf->AddMapRef(pid); in ReadDmaBufMapRefs()
246 dbuf.AddMapRef(pid); in ReadDmaBufMapRefs()
251 LOG(ERROR) << "Failed to parse " << mapspath << " for pid: " << pid; in ReadDmaBufMapRefs()
259 bool ReadDmaBufInfo(pid_t pid, std::vector<DmaBuffer>* dmabufs, bool read_fdrefs, in ReadDmaBufInfo() argument
264 if (!ReadDmaBufFdRefs(pid, dmabufs, procfs_path)) { in ReadDmaBufInfo()
270 if (!ReadDmaBufMapRefs(pid, dmabufs, procfs_path, dmabuf_sysfs_path)) { in ReadDmaBufInfo()
291 int pid = atoi(dent->d_name); in ReadProcfsDmaBufs() local
292 if (pid == 0) { in ReadProcfsDmaBufs()
296 if (!ReadDmaBufFdRefs(pid, bufs)) { in ReadProcfsDmaBufs()
297 LOG(ERROR) << "Failed to read dmabuf fd references for pid " << pid; in ReadProcfsDmaBufs()
300 if (!ReadDmaBufMapRefs(pid, bufs)) { in ReadProcfsDmaBufs()
301 LOG(ERROR) << "Failed to read dmabuf map references for pid " << pid; in ReadProcfsDmaBufs()