Lines Matching refs:pid
69 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid();
70 AuthSystemProcess(pid);
105 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid();
117 QueryRenderServiceMain(uid, pid, queryRs);
120 QueryRenderServiceRender(uid, pid, queryRs);
126 QueryHardware(uid, pid, queryRs);
129 QueryExecutorStart(uid, pid, queryRs);
148 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid();
149 ForegroundAppRecord* record = GetRecordOfPid(pid);
151 CONCUR_LOGD("Query ui with pid %{public}d failed", pid);
156 CONCUR_LOGI("%{public}d Query ui with none grpid", pid);
161 queryRs.bundleName = appBundleName[pid];
166 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid();
167 ForegroundAppRecord* record = GetRecordOfPid(pid);
169 CONCUR_LOGD("Query render with pid %{public}d failed", pid);
174 CONCUR_LOGI("%{public}d Query render with none grpid", pid);
214 void TaskController::QueryRenderServiceMain(int uid, int pid, IntervalReply& queryRs)
219 if (authedRSPid_ != pid) {
220 if (AuthSystemProcess(pid) != 0) {
223 authedRSPid_ = pid;
244 void TaskController::QueryRenderServiceRender(int uid, int pid, IntervalReply& queryRs)
267 void TaskController::QueryHardware(int uid, int pid, IntervalReply& queryRs)
285 void TaskController::QueryExecutorStart(int uid, int pid, IntervalReply& queryRs)
311 pid_t pid = IPCSkeleton::GetInstance().GetCallingPid();
312 ForegroundAppRecord* record = GetRecordOfPid(pid);
314 CONCUR_LOGD("Query ipc thread with pid %{public}d failed", pid);
319 CONCUR_LOGI("%{public}d Query ipc thread with none grpid", pid);
442 bool TaskController::ParsePayload(const Json::Value& payload, int& uid, int& pid, std::string& bundleName)
446 pid = stoi(payload["pid"].asString());
449 CONCUR_LOGE("Unexpected uid or pid format");
452 if (uid > 0 && pid > 0) {
461 int pid = -1;
463 if (!ParsePayload(payload, uid, pid, bundleName)) {
468 NewForeground(uid, pid);
471 NewBackground(uid, pid);
474 NewAppStart(uid, pid, bundleName);
477 AppKilled(uid, pid);
481 ContinuousTaskProcess(uid, pid, requestType);
485 FocusStatusProcess(uid, pid, requestType);
497 ForegroundAppRecord* TaskController::GetRecordOfPid(int pid)
501 if (iter->GetPid() == pid) {
508 void TaskController::NewForeground(int uid, int pid)
510 int uiTid = pid;
511 auto it = find(authApps_.begin(), authApps_.end(), pid);
513 CONCUR_LOGI("un-authed pid %{public}d", pid);
516 int ret = AuthGet(pid);
518 CONCUR_LOGI("pid %{public}d change to foreground.", pid);
519 unsigned int pidParam = static_cast<unsigned int>(pid);
524 CONCUR_LOGI("auth_enable %{public}d success", pid);
526 CONCUR_LOGE("auth_enable %{public}d fail with ret %{public}d", pid, ret);
529 CONCUR_LOGI("pid %{public}d is already focus", pid);
535 if (iter->GetPid() == pid) {
537 if (ddlEnabled && pid != curGamePid_) {
545 NewForegroundAppRecord(pid, uiTid, ddlEnabled);
549 void TaskController::NewForegroundAppRecord(int pid, int uiTid, bool ddlEnabled)
551 ForegroundAppRecord& appRecord = foregroundApp_.emplace_back(pid, uiTid, pid != curGamePid_);
552 if (foregroundApp_.size() <= 0 || appRecord.GetPid() != pid) {
553 CONCUR_LOGE("pid %{public}d create app record failed", pid);
557 if (ddlEnabled && pid != curGamePid_) {
564 void TaskController::NewBackground(int uid, int pid)
566 auto it = find(authApps_.begin(), authApps_.end(), pid);
568 CONCUR_LOGI("un-authed pid %{public}d", pid);
571 CONCUR_LOGI("pid %{public}d change to background.", pid);
572 unsigned int pidParam = static_cast<unsigned int>(pid);
576 CONCUR_LOGI("auth_pause %{public}d success", pid);
578 CONCUR_LOGI("auth_pause %{public}d fail with %{public}d", pid, ret);
582 if (iter->GetPid() == pid) {
589 void TaskController::NewAppStart(int uid, int pid, const std::string& bundleName)
591 CONCUR_LOGI("pid %{public}d start.", pid);
592 unsigned int pidParam = static_cast<unsigned int>(pid);
598 CONCUR_LOGI("auth_enable %{public}d success", pid);
600 CONCUR_LOGE("auth_enable %{public}d fail with ret %{public}d", pid, ret);
604 authApps_.push_back(pid);
605 appBundleName[pid] = bundleName;
608 void TaskController::AppKilled(int uid, int pid)
610 CONCUR_LOGI("pid %{public}d killed.", pid);
611 unsigned int pidParam = static_cast<unsigned int>(pid);
614 CONCUR_LOGI("auth_delete %{public}d success", pid);
616 CONCUR_LOGE("auth_delete %{public}d fail with %{public}d", pid, ret);
620 if (iter->GetPid() == pid) {
626 if (*iter == pid) {
631 appBundleName.erase(pid);
634 int TaskController::AuthSystemProcess(int pid)
638 int ret = AuthEnable(pid, uaFlag, status);
640 CONCUR_LOGI("auth process %{public}d success", pid);
642 CONCUR_LOGI("auth process %{public}d failed, ret %{public}d", pid, ret);
647 void TaskController::ContinuousTaskProcess(int uid, int pid, int status)
651 ret = AuthEnhance(pid, true);
652 CONCUR_LOGI("auth_enhance pid %{public}d start, ret %{public}d", pid, ret);
654 ret = AuthEnhance(pid, false);
655 CONCUR_LOGI("auth_enhance pid %{public}d end, ret %{public}d", pid, ret);
661 void TaskController::FocusStatusProcess(int uid, int pid, int status)
667 ret = AuthSwitch(pid, rtgFlag, qosFlag, static_cast<unsigned int>(AuthStatus::AUTH_STATUS_FOCUS));
668 CONCUR_LOGI("pid %{public}d get focus. ret %{public}d", pid, ret);
670 ret = AuthSwitch(pid, rtgFlag, qosFlag, static_cast<unsigned int>(AuthStatus::AUTH_STATUS_FOREGROUND));
671 CONCUR_LOGI("pid %{public}d lose focus. ret %{public}d", pid, ret);
753 CONCUR_LOGI("[MSG_GAME]current game pid is %{public}d, old game pid is %{public}d",
761 CONCUR_LOGI("[MSG_GAME]destroy rtg grp, pid is %{public}d grpId is %{public}d",
973 ForegroundAppRecord::ForegroundAppRecord(int pid, int uiTid, bool createGrp)
975 pid_ = pid;
1021 CONCUR_LOGI("Error begin scene in pid %{public}d", pid_);
1032 CONCUR_LOGI("Error end scene loss grpId_ in pid %{public}d", pid_);
1084 std::string strLog = "pid ";