Lines Matching defs:pid

821      * All of the processes we currently have running organized by pid.
822 * The keys are the pid running the application.
831 * is the pid of the caller who requested it (we hold a death
835 final int pid;
840 pid = _pid;
848 + " " + reason + " " + pid + " " + token + " }";
1182 public final int pid;
1187 pid = _pid;
1549 int pid;
1627 AppDeathRecipient(ProcessRecord app, int pid,
1633 mPid = pid;
1771 Process.killProcessGroup(msg.arg1 /* uid */, msg.arg2 /* pid */);
1933 final int pid = msg.arg1;
1935 dispatchProcessDied(pid, uid);
2488 if (mPidsSelfLocked.indexOfKey(stats.get(j).pid) >= 0) {
2493 nativeTotalPss += Debug.getPss(stats.get(j).pid, null, null);
2515 int pid;
2531 pid = proc.pid;
2534 pid = 0;
2538 long pss = Debug.getPss(pid, tmp, null);
2541 && proc.pid == pid && proc.lastPssTime == lastPssTime) {
2574 app.pid = MY_PID;
2578 mPidsSelfLocked.put(app.pid, app);
3013 ProcessRecord pr = mPidsSelfLocked.get(st.pid);
3332 static void killProcessGroup(int uid, int pid) {
3335 sKillHandler.obtainMessage(KillHandler.KILL_PROCESS_GROUP_MSG, uid, pid));
3338 Process.killProcessGroup(uid, pid);
3347 killProcessQuiet(app.pid);
3348 killProcessGroup(app.uid, app.pid);
3632 return proc != null ? proc.pid : 0;
3691 // (3) There is a pid assigned to it, so it is either starting or
3696 + " pid=" + (app != null ? app.pid : -1));
3697 if (app != null && app.pid > 0) {
3700 // come up (we have a pid but not yet its thread), so keep it.
3712 killProcessGroup(app.uid, app.pid);
3754 return (app.pid != 0) ? app : null;
3770 if (app.pid > 0 && app.pid != MY_PID) {
3773 mPidsSelfLocked.remove(app.pid);
3937 UserHandle.getUserId(uid), startResult.pid, uid,
3943 seInfo, app.info.sourceDir, startResult.pid);
3949 Watchdog.getInstance().processStarted(app.processName, startResult.pid);
3956 buf.append(startResult.pid);
3973 app.setPid(startResult.pid);
3981 oldApp = mPidsSelfLocked.get(startResult.pid);
3983 // If there is already an app occupying that pid that hasn't been cleaned up
3985 // Clean up anything relating to this pid first
3986 Slog.w(TAG, "Reusing pid " + startResult.pid
3992 this.mPidsSelfLocked.put(startResult.pid, app);
4302 "ACTIVITIES CHANGED pid=" + item.pid + " uid="
4304 observer.onForegroundActivitiesChanged(item.pid, item.uid,
4321 private void dispatchProcessDied(int pid, int uid) {
4328 observer.onProcessDied(pid, uid);
4649 String msg = "Permission Denial: startVoiceActivity() from pid="
4672 final String msg = "Permission Denial: startAssistantActivity() from pid="
5073 String msg = "Permission Denial: finishHeavyWeightApp() from pid="
5106 String msg = "Permission Denial: crashApplication() from pid="
5240 int pid = app.pid;
5245 if (pid > 0) {
5246 ProcessList.remove(pid);
5357 memInfos.add(new ProcessMemInfo(rec.processName, rec.pid, rec.setAdj,
5384 appDiedLocked(app, app.pid, app.thread, false);
5387 final void appDiedLocked(ProcessRecord app, int pid, IApplicationThread thread,
5389 // First check if this ProcessRecord is actually active for the pid.
5391 ProcessRecord curProc = mPidsSelfLocked.get(pid);
5393 Slog.w(TAG, "Spurious death for " + app + ", curProc for " + pid + ": " + curProc);
5400 stats.noteProcessDiedLocked(app.info.uid, pid);
5405 killProcessQuiet(pid);
5407 killProcessGroup(app.uid, pid);
5412 if (app.pid == pid && app.thread != null &&
5417 Slog.i(TAG, "Process " + app.processName + " (pid " + pid + ") has died: "
5427 EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName,
5430 "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder());
5439 } else if (app.pid != pid) {
5441 Slog.i(TAG, "Process " + app.processName + " (pid " + pid
5442 + ") has died and restarted (pid " + app.pid + ").");
5443 EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName);
5501 public long dumpWithTimeout(int pid, long timeout) {
5502 sendSignal(pid, SIGNAL_QUIT);
5522 Slog.w(TAG, "Didn't see close of " + mTracesPath + " for pid " + pid +
5528 Debug.dumpNativeBacktraceToFileTimeout(pid, mTracesPath,
5555 if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for pid "
5567 Slog.d(TAG, "Done with pid " + firstPids.get(i) + " in " + timeTaken + "ms");
5574 for (int pid : nativePids) {
5575 if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for native pid " + pid);
5581 pid, tracesPath, (int) (nativeDumpTimeoutMs / 1000));
5586 Slog.e(TAG, "Aborting stack trace dump (current native pid=" + pid +
5592 Slog.d(TAG, "Done with native pid " + pid + " in " + timeTaken + "ms");
5615 if (lastPids.indexOfKey(stats.pid) >= 0) {
5618 if (DEBUG_ANR) Slog.d(TAG, "Collecting stacks for extra pid " + stats.pid);
5620 final long timeTaken = observer.dumpWithTimeout(stats.pid, remainingTime);
5623 Slog.e(TAG, "Aborting stack trace dump (current extra pid=" + stats.pid +
5629 Slog.d(TAG, "Done with extra pid " + stats.pid + " in " + timeTaken + "ms");
5633 + stats.pid);
5684 firstPids.add(app.pid);
5740 int pid = Binder.getCallingPid();
5741 userId = mUserController.handleIncomingUser(pid, uid, userId, false,
5773 pid, uid, -1, true)
5777 throw new SecurityException("PID " + pid + " does not have permission "
5843 String msg = "Permission Denial: killBackgroundProcesses() from pid="
5879 final String msg = "Permission Denial: killAllBackgroundProcesses() from pid="
5936 final String msg = "Permission Denial: killAllBackgroundProcessesExcept() from pid="
5977 String msg = "Permission Denial: forceStopPackage() from pid="
6012 forceStopPackageLocked(packageName, pkgUid, "from pid " + callingPid);
6078 final int pid = Binder.getCallingPid();
6088 proc = mPidsSelfLocked.get(pid);
6625 if (app.pid > 0 && app.pid != MY_PID) {
6626 int pid = app.pid;
6628 mPidsSelfLocked.remove(pid);
6663 final int pid = app.pid;
6666 ProcessRecord knownApp = mPidsSelfLocked.get(pid);
6668 mPidsSelfLocked.remove(pid);
6676 pid, app.uid, app.processName);
6693 if (mBackupTarget != null && mBackupTarget.app.pid == pid) {
6708 if (isPendingBroadcastProcessLocked(pid)) {
6710 skipPendingBroadcastLocked(pid);
6713 Slog.w(TAG, "Spurious process start timeout - pid not known for " + app);
6718 int pid) {
6721 // the pid if we are running in multiple processes, or just pull the
6725 if (pid != MY_PID && pid >= 0) {
6727 app = mPidsSelfLocked.get(pid);
6734 Slog.w(TAG, "No pending application record for pid " + pid
6736 EventLog.writeEvent(EventLogTags.AM_DROP_PROCESS, pid);
6737 if (pid > 0 && pid != MY_PID) {
6738 killProcessQuiet(pid);
6739 //TODO: killProcessGroup(app.info.uid, pid);
6759 TAG, "Binding process pid " + pid + " to record " + app);
6764 app, pid, thread);
6773 EventLog.writeEvent(EventLogTags.AM_PROC_BOUND, app.userId, app.pid, app.processName);
6811 + " thread=" + thread.asBinder() + " pid=" + pid);
6979 if (!badApp && isPendingBroadcastProcessLocked(pid)) {
7452 String msg = "Permission Denial: getIntentSender() from pid="
7594 String msg = "Permission Denial: cancelIntentSender() from pid="
7784 = mImportantProcesses.get(token.pid);
7788 mImportantProcesses.remove(token.pid);
7789 ProcessRecord pr = mPidsSelfLocked.get(token.pid);
7801 public void setProcessImportant(IBinder token, int pid, boolean isForeground, String reason) {
7808 ProcessRecord pr = mPidsSelfLocked.get(pid);
7810 Slog.w(TAG, "setProcessForeground called on unknown pid: " + pid);
7813 ImportanceToken oldToken = mImportantProcesses.get(pid);
7816 mImportantProcesses.remove(pid);
7823 ImportanceToken newToken = new ImportanceToken(pid, token, reason) {
7831 mImportantProcesses.put(pid, newToken);
8151 public boolean checkPermission(String permission, int pid, int uid) {
8152 return mActivityManagerService.checkPermission(permission, pid,
8178 public int checkComponentPermission(String permission, int pid, int uid,
8180 return ActivityManagerService.this.checkComponentPermission(permission, pid, uid,
8193 int checkComponentPermission(String permission, int pid, int uid,
8195 if (pid == MY_PID) {
8212 public int checkPermission(String permission, int pid, int uid) {
8216 return checkComponentPermission(permission, pid, uid, -1, true);
8220 public int checkPermissionWithToken(String permission, int pid, int uid, IBinder callerToken) {
8230 Slog.d(TAG, "checkComponentPermission() adjusting {pid,uid} to {"
8231 + tlsIdentity.pid + "," + tlsIdentity.uid + "}");
8233 pid = tlsIdentity.pid;
8236 return checkComponentPermission(permission, pid, uid, -1, true);
8258 String msg = "Permission Denial: " + func + " from pid="
8580 public int checkUriPermission(Uri uri, int pid, int uid,
8589 pid = tlsIdentity.pid;
8593 if (pid == MY_PID) {
11063 final int callingPid = (r != null) ? r.pid : Binder.getCallingPid();
11129 + " from " + (r != null ? r : "(null)") + " (pid=" + callingPid
11261 proc.procStatFile = "/proc/" + proc.pid + "/stat";
11290 + " (pid=" + Binder.getCallingPid()
11792 + " (pid=" + Binder.getCallingPid()
11934 Slog.i(TAG, "Process " + proc.processName + " (pid " + proc.pid
12841 public long inputDispatchingTimedOut(int pid, final boolean aboveSystem, String reason) {
12851 proc = mPidsSelfLocked.get(pid);
13348 final int pid = Binder.getCallingPid();
13349 final ProcessRecord proc = mPidsSelfLocked.get(pid);
13350 mVrController.setVrThreadLocked(tid, pid, proc);
13358 final String msg = "Permission Denial: setPersistentVrThread() from pid="
13368 final int pid = Binder.getCallingPid();
13369 final ProcessRecord proc = mPidsSelfLocked.get(pid);
13370 mVrController.setPersistentVrThreadLocked(tid, pid, proc);
13429 int pid = Binder.getCallingPid();
13430 if (pid == Process.myPid()) {
13435 proc = mPidsSelfLocked.get(pid);
13438 if (!isThreadInProcess(pid, tid)) {
13444 Slog.d("UI_FIFO", "Set RenderThread tid " + tid + " for pid " + pid);
13459 "PID: " + pid + ", TID: " + tid + " FIFO: " +
13552 String msg = "Permission Denial: setHasTopUi() from pid="
13559 final int pid = Binder.getCallingPid();
13566 pr = mPidsSelfLocked.get(pid);
13568 Slog.w(TAG, "setHasTopUi called on unknown pid: " + pid);
13573 Slog.d(TAG, "Setting hasTopUi=" + hasTopUi + " for pid=" + pid);
13764 final int pid = mPidsSelfLocked.keyAt(i);
13804 Slog.i(TAG, "Hanging system process at request of pid " + Binder.getCallingPid());
14510 + " from pid=" + Binder.getCallingPid()
14537 sb.append("PID: ").append(process.pid).append("\n");
14561 if (process == null || process.pid == MY_PID) {
14620 if (parent != null && parent.app != null && parent.app.pid != process.pid) {
14761 outInfo.pid = app.pid;
14807 app.pid, app.getPackageList());
14810 currApp.importanceReasonPid = ((ProcessRecord)app.adjSource).pid;
14816 if (r.app != null) currApp.importanceReasonPid = r.app.pid;
15624 mImportantProcesses.valueAt(i).pid);
16167 pw.print(" pid=");
16168 if (r.app != null) pw.println(r.app.pid);
16651 r.pid, curRealtime);
16689 int pid = -1;
16691 pid = Integer.parseInt(args[start]);
16696 if (proc.pid == pid) {
16731 pw.println("\n** Graphics info for pid " + r.pid + " [" + r.processName + "] **");
16764 pw.println("\n** Database info for pid " + r.pid + " [" + r.processName + "] **");
17037 pw.println("pid of a specific process to dump.");
17065 if (st.pid == findPid || (st.baseName != null
17077 final int pid = r.pid;
17079 pw.println("\n** MEMINFO in pid " + pid + " [" + r.baseName + "] **");
17085 Debug.getMemoryInfo(pid, mi);
17087 mi.dalvikPss = (int)Debug.getPss(pid, tmpLong, null);
17091 dumpDalvik, dumpSummaryOnly, pid, r.baseName, 0, 0, 0, 0, 0, 0);
17142 final int pid;
17147 pid = r.pid;
17153 pw.println("\n** MEMINFO in pid " + pid + " [" + r.processName + "] **");
17159 Debug.getMemoryInfo(pid, mi);
17162 mi.dalvikPss = (int)Debug.getPss(pid, tmpLong, null);
17168 dumpDalvik, dumpSummaryOnly, pid, r.processName, 0, 0, 0, 0, 0, 0);
17212 MemItem pssItem = new MemItem(r.processName + " (pid " + pid +
17214 myTotalSwapPss, pid, hasActivities);
17216 procMemsMap.put(pid, pssItem);
17271 if (st.vsize > 0 && procMemsMap.indexOfKey(st.pid) < 0) {
17276 Debug.getMemoryInfo(st.pid, mi);
17278 mi.nativePss = (int)Debug.getPss(st.pid, tmpLong, null);
17287 MemItem pssItem = new MemItem(st.name + " (pid " + st.pid + ")",
17288 st.name, myTotalPss, mi.getSummaryTotalSwapPss(), st.pid, false);
17526 sb.append(" (pid ");
17527 sb.append(mi.pid);
17542 infoMap.put(mi.pid, mi);
17556 long pss = Debug.getPss(st.pid, null, memtrackTmp);
17558 if (infoMap.indexOfKey(st.pid) < 0) {
17559 ProcessMemInfo mi = new ProcessMemInfo(st.name, st.pid,
17573 mi.pss = Debug.getPss(mi.pid, null, memtrackTmp);
17842 && capp.pid != 0
17843 && capp.pid != MY_PID) {
17881 ProcessList.remove(app.pid);
17978 if (mBackupTarget != null && app.pid == mBackupTarget.app.pid) {
17997 if (item.pid == app.pid) {
18002 mUiHandler.obtainMessage(DISPATCH_PROCESS_DIED_UI_MSG, app.pid, app.info.uid,
18046 ProcessList.remove(app.pid);
18051 } else if (app.pid > 0 && app.pid != MY_PID) {
18055 mPidsSelfLocked.remove(app.pid);
18559 boolean isPendingBroadcastProcessLocked(int pid) {
18560 return mFgBroadcastQueue.isPendingBroadcastProcessLocked(pid)
18561 || mBgBroadcastQueue.isPendingBroadcastProcessLocked(pid);
18564 void skipPendingBroadcastLocked(int pid) {
18567 queue.skipPendingBroadcastLocked(pid);
18597 + " (pid=" + Binder.getCallingPid()
18607 callingPid = callerApp.pid;
18701 } else if (rl.pid != callingPid) {
18703 "Receiver requested to register for pid " + callingPid
18704 + " was previously registered for pid " + rl.pid
19022 + " broadcast from " + callerPackage + " (pid=" + callingPid
19062 + action + " from pid="
19121 + " broadcast from " + callerPackage + " (pid=" + callingPid
19354 String msg = "Permission Denial: broadcastIntent() requesting a sticky broadcast from pid="
19746 String msg = "Permission Denial: unbroadcastIntent() from pid="
19862 + className + " from pid="
20142 String msg = "Permission Denial: " + func + " from pid="
21491 //Slog.i(TAG, "OOM ADJ " + app + ": pid=" + app.pid +
21518 EventLogTags.writeAmPss(proc.pid, proc.uid, proc.processName, pss * 1024, uss * 1024,
21561 mMemWatchDumpPid = proc.pid;
21837 app.pid, curRealtime);
21903 ProcessList.setOomAdj(app.pid, app.info.uid, app.curAdj);
21905 "Set " + app.pid + " " + app.processName + " adj " + app.curAdj + ": "
21937 setProcessGroup(app.pid, processGroup);
21944 app.savedPriority = Process.getThreadPriority(app.pid);
21945 scheduleAsFifoPriority(app.pid, /* suppressLogs */true);
21960 setThreadPriority(app.pid, TOP_APP_PRIORITY_BOOST);
21976 setThreadScheduler(app.pid, SCHED_OTHER, 0);
21977 setThreadPriority(app.pid, app.savedPriority);
21985 setThreadPriority(app.pid, 0);
21993 Slog.w(TAG, "Failed setting process group of " + app.pid
22028 long pss = Debug.getPss(app.pid, mTmpLong, null);
22066 app.pid, nowElapsed);
22098 if (item.pid == app.pid) {
22118 item.pid = app.pid;
22843 String msg = "Permission Denial: makePackageIdle() from pid="
23074 Slog.w(TAG, "tempWhitelistForPendingIntentLocked() no ProcessRecord for pid "
23083 + ": pid " + callerPid + " is not allowed");
23173 if (app.pid > 0 && app.pid != MY_PID) {
23212 sendSignal(r.pid, sig);
23324 int pid = Integer.parseInt(process);
23326 proc = mPidsSelfLocked.get(pid);
23407 throw new SecurityException("No process found for calling pid "
23439 Slog.w(TAG, "dumpHeapFinished: Calling pid " + Binder.getCallingPid()
23440 + " does not match last pid " + mMemWatchDumpPid);
23560 String msg = "Permission Denial: isUserRunning() from pid="
23576 String msg = "Permission Denial: isUserRunning() from pid="
23947 * Sets if the given pid has an overlay UI or not.
23949 * @param pid The pid we are setting overlay UI for.
23954 public void setHasOverlayUi(int pid, boolean hasOverlayUi) {
23958 pr = mPidsSelfLocked.get(pid);
23960 Slog.w(TAG, "setHasOverlayUi called on unknown pid: " + pid);
23968 //Slog.i(TAG, "Setting hasOverlayUi=" + pr.hasOverlayUi + " for pid=" + pid);