Lines Matching refs:cgroup

126 static std::string ConvertUidToPath(const char* cgroup, uid_t uid) {  in ConvertUidToPath()  argument
127 return StringPrintf("%s/uid_%d", cgroup, uid); in ConvertUidToPath()
130 static std::string ConvertUidPidToPath(const char* cgroup, uid_t uid, int pid) { in ConvertUidPidToPath() argument
131 return StringPrintf("%s/uid_%d/pid_%d", cgroup, uid, pid); in ConvertUidPidToPath()
134 static int RemoveProcessGroup(const char* cgroup, uid_t uid, int pid, unsigned int retries) { in RemoveProcessGroup() argument
136 auto uid_pid_path = ConvertUidPidToPath(cgroup, uid, pid); in RemoveProcessGroup()
137 auto uid_path = ConvertUidToPath(cgroup, uid); in RemoveProcessGroup()
273 static int DoKillProcessGroupOnce(const char* cgroup, uid_t uid, int initialPid, int signal) { in DoKillProcessGroupOnce() argument
274 auto path = ConvertUidPidToPath(cgroup, uid, initialPid) + PROCESSGROUP_CGROUP_PROCS_FILE; in DoKillProcessGroupOnce()
347 const char* cgroup = hierarchy_root_path.c_str(); in KillProcessGroup() local
357 while ((processes = DoKillProcessGroupOnce(cgroup, uid, initialPid, signal)) > 0) { in KillProcessGroup()
391 int err = RemoveProcessGroup(cgroup, uid, initialPid, retries); in KillProcessGroup()
419 static int createProcessGroupInternal(uid_t uid, int initialPid, std::string cgroup) { in createProcessGroupInternal() argument
420 auto uid_path = ConvertUidToPath(cgroup.c_str(), uid); in createProcessGroupInternal()
427 if (stat(cgroup.c_str(), &cgroup_stat) == 1) { in createProcessGroupInternal()
428 PLOG(ERROR) << "Failed to get stats for " << cgroup; in createProcessGroupInternal()
440 auto uid_pid_path = ConvertUidPidToPath(cgroup.c_str(), uid, initialPid); in createProcessGroupInternal()
459 std::string cgroup; in createProcessGroup() local
467 CgroupGetControllerPath("memory", &cgroup); in createProcessGroup()
468 cgroup += "/apps"; in createProcessGroup()
469 int ret = createProcessGroupInternal(uid, initialPid, cgroup); in createProcessGroup()
475 CgroupGetControllerPath(CGROUPV2_CONTROLLER_NAME, &cgroup); in createProcessGroup()
476 return createProcessGroupInternal(uid, initialPid, cgroup); in createProcessGroup()