Lines Matching refs:pid
72 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid(); in RequestAuth() local
73 AuthSystemProcess(pid); in RequestAuth()
108 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid(); in QueryInterval() local
120 QueryRenderServiceMain(uid, pid, queryRs); in QueryInterval()
123 QueryRenderServiceRender(uid, pid, queryRs); in QueryInterval()
129 QueryHardware(uid, pid, queryRs); in QueryInterval()
132 QueryExecutorStart(uid, pid, queryRs); in QueryInterval()
151 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid(); in QueryUi() local
152 auto iter = GetRecordOfPid(pid); in QueryUi()
154 CONCUR_LOGD("Query ui with pid %{public}d failed", pid); in QueryUi()
159 CONCUR_LOGI("%{public}d Query ui with none grpid", pid); in QueryUi()
164 queryRs.bundleName = appBundleName[pid]; in QueryUi()
169 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid(); in QueryRender() local
170 auto iter = GetRecordOfPid(pid); in QueryRender()
172 CONCUR_LOGD("Query render with pid %{public}d failed", pid); in QueryRender()
177 CONCUR_LOGI("%{public}d Query render with none grpid", pid); in QueryRender()
217 void TaskController::QueryRenderServiceMain(int uid, int pid, IntervalReply& queryRs) in QueryRenderServiceMain() argument
222 if (authedRSPid_ != pid) { in QueryRenderServiceMain()
223 if (AuthSystemProcess(pid) != 0) { in QueryRenderServiceMain()
226 authedRSPid_ = pid; in QueryRenderServiceMain()
247 void TaskController::QueryRenderServiceRender(int uid, int pid, IntervalReply& queryRs) in QueryRenderServiceRender() argument
270 void TaskController::QueryHardware(int uid, int pid, IntervalReply& queryRs) in QueryHardware() argument
288 void TaskController::QueryExecutorStart(int uid, int pid, IntervalReply& queryRs) in QueryExecutorStart() argument
314 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid(); in QueryHwc() local
315 auto iter = GetRecordOfPid(pid); in QueryHwc()
317 CONCUR_LOGD("Query ipc thread with pid %{public}d failed", pid); in QueryHwc()
322 CONCUR_LOGI("%{public}d Query ipc thread with none grpid", pid); in QueryHwc()
446 bool TaskController::ParsePayload(const Json::Value& payload, int& uid, int& pid, std::string& bund… in ParsePayload() argument
450 pid = stoi(payload["pid"].asString()); in ParsePayload()
456 if (uid > 0 && pid > 0) { in ParsePayload()
465 int pid = -1; in DealSystemRequest() local
467 if (!ParsePayload(payload, uid, pid, bundleName)) { in DealSystemRequest()
472 NewForeground(uid, pid); in DealSystemRequest()
475 NewBackground(uid, pid); in DealSystemRequest()
478 NewAppStart(uid, pid, bundleName, ParseAppType(payload)); in DealSystemRequest()
481 AppKilled(uid, pid); in DealSystemRequest()
485 ContinuousTaskProcess(uid, pid, requestType); in DealSystemRequest()
489 FocusStatusProcess(uid, pid, requestType); in DealSystemRequest()
501 std::list<ForegroundAppRecord>::iterator TaskController::GetRecordOfPid(int pid) in GetRecordOfPid() argument
505 if (iter->GetPid() == pid) { in GetRecordOfPid()
512 void TaskController::NewForeground(int uid, int pid) in NewForeground() argument
514 int uiTid = pid; in NewForeground()
515 auto it = find(authApps_.begin(), authApps_.end(), pid); in NewForeground()
517 CONCUR_LOGI("un-authed pid %{public}d", pid); in NewForeground()
520 int ret = AuthGet(pid); in NewForeground()
522 unsigned int pidParam = static_cast<unsigned int>(pid); in NewForeground()
527 CONCUR_LOGI("auth_enable %{public}d success", pid); in NewForeground()
529 CONCUR_LOGE("auth_enable %{public}d fail with ret %{public}d", pid, ret); in NewForeground()
531 CONCUR_LOGI("pid %{public}d change to foreground.", pid); in NewForeground()
533 CONCUR_LOGI("pid %{public}d is already focus", pid); in NewForeground()
539 if (iter->GetPid() == pid) { in NewForeground()
541 if (ddlEnabled && pid != curGamePid_) { in NewForeground()
548 NewForegroundAppRecord(pid, uiTid, ddlEnabled); in NewForeground()
552 void TaskController::NewForegroundAppRecord(int pid, int uiTid, bool ddlEnabled) in NewForegroundAppRecord() argument
554 auto appRecord = foregroundApp_.emplace_back(pid, uiTid, pid != curGamePid_); in NewForegroundAppRecord()
555 if (foregroundApp_.size() <= 0 || appRecord.GetPid() != pid) { in NewForegroundAppRecord()
556 CONCUR_LOGE("pid %{public}d create app record failed", pid); in NewForegroundAppRecord()
560 if (ddlEnabled && pid != curGamePid_) { in NewForegroundAppRecord()
567 void TaskController::NewBackground(int uid, int pid) in NewBackground() argument
569 auto it = find(authApps_.begin(), authApps_.end(), pid); in NewBackground()
571 CONCUR_LOGI("un-authed pid %{public}d", pid); in NewBackground()
574 CONCUR_LOGI("pid %{public}d change to background.", pid); in NewBackground()
575 unsigned int pidParam = static_cast<unsigned int>(pid); in NewBackground()
579 CONCUR_LOGI("auth_pause %{public}d success", pid); in NewBackground()
581 CONCUR_LOGI("auth_pause %{public}d fail with %{public}d", pid, ret); in NewBackground()
585 if (iter->GetPid() == pid) { in NewBackground()
592 void TaskController::NewAppStart(int uid, int pid, const std::string& bundleName, int appType) in NewAppStart() argument
594 CONCUR_LOGI("pid %{public}d start.", pid); in NewAppStart()
595 unsigned int pidParam = static_cast<unsigned int>(pid); in NewAppStart()
601 CONCUR_LOGI("auth_enable %{public}d success", pid); in NewAppStart()
603 CONCUR_LOGE("auth_enable %{public}d fail with ret %{public}d", pid, ret); in NewAppStart()
607 authApps_.push_back(pid); in NewAppStart()
608 appBundleName[pid] = bundleName; in NewAppStart()
614 void TaskController::AppKilled(int uid, int pid) in AppKilled() argument
616 CONCUR_LOGI("pid %{public}d killed.", pid); in AppKilled()
617 unsigned int pidParam = static_cast<unsigned int>(pid); in AppKilled()
620 CONCUR_LOGI("auth_delete %{public}d success", pid); in AppKilled()
622 CONCUR_LOGE("auth_delete %{public}d fail with %{public}d", pid, ret); in AppKilled()
626 if (iter->GetPid() == pid) { in AppKilled()
632 if (*iter == pid) { in AppKilled()
637 appBundleName.erase(pid); in AppKilled()
640 int TaskController::AuthSystemProcess(int pid) in AuthSystemProcess() argument
644 int ret = AuthEnable(pid, uaFlag, status); in AuthSystemProcess()
646 CONCUR_LOGI("auth process %{public}d success", pid); in AuthSystemProcess()
648 CONCUR_LOGI("auth process %{public}d failed, ret %{public}d", pid, ret); in AuthSystemProcess()
653 void TaskController::ContinuousTaskProcess(int uid, int pid, int status) in ContinuousTaskProcess() argument
657 ret = AuthEnhance(pid, true); in ContinuousTaskProcess()
658 CONCUR_LOGI("auth_enhance pid %{public}d start, ret %{public}d", pid, ret); in ContinuousTaskProcess()
660 ret = AuthEnhance(pid, false); in ContinuousTaskProcess()
661 CONCUR_LOGI("auth_enhance pid %{public}d end, ret %{public}d", pid, ret); in ContinuousTaskProcess()
667 void TaskController::FocusStatusProcess(int uid, int pid, int status) in FocusStatusProcess() argument
673 … ret = AuthSwitch(pid, rtgFlag, qosFlag, static_cast<unsigned int>(AuthStatus::AUTH_STATUS_FOCUS)); in FocusStatusProcess()
674 CONCUR_LOGI("pid %{public}d get focus. ret %{public}d", pid, ret); in FocusStatusProcess()
676 if (IsVideoApp(pid)) { in FocusStatusProcess()
678 … CONCUR_LOGD("video app bundleName %{public}s get focus", appBundleName[pid].c_str()); in FocusStatusProcess()
684 …ret = AuthSwitch(pid, rtgFlag, qosFlag, static_cast<unsigned int>(AuthStatus::AUTH_STATUS_FOREGROU… in FocusStatusProcess()
685 CONCUR_LOGI("pid %{public}d lose focus. ret %{public}d", pid, ret); in FocusStatusProcess()
1005 bool TaskController::IsVideoApp(int pid) in IsVideoApp() argument
1007 if (!ddlSceneSchedSwitch_ || appBundleName.find(pid) == appBundleName.end()) { in IsVideoApp()
1010 std::string bundleName = appBundleName[pid]; in IsVideoApp()
1018 ForegroundAppRecord::ForegroundAppRecord(int pid, int uiTid, bool createGrp) in ForegroundAppRecord() argument
1020 pid_ = pid; in ForegroundAppRecord()