Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 206) sorted by relevance

123456789

/frameworks/av/services/mediaresourcemanager/
DResourceManagerService.cpp65 int pid, in getResourceInfosForEdit() argument
67 ssize_t index = map.indexOfKey(pid); in getResourceInfosForEdit()
71 map.add(pid, infosForPid); in getResourceInfosForEdit()
74 return map.editValueFor(pid); in getResourceInfosForEdit()
93 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) { in notifyResourceGranted() argument
100 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC); in notifyResourceGranted()
102 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC); in notifyResourceGranted()
200 int pid, in addResource() argument
205 pid, (long long) clientId, getString(resources).string()); in addResource()
209 if (!mProcessInfo->isValidPid(pid)) { in addResource()
[all …]
DResourceManagerService.h61 int pid,
66 virtual void removeResource(int pid, int64_t clientId);
93 bool getLowestPriorityPid_l(MediaResource::Type type, int *pid, int *priority);
97 bool getBiggestClient_l(int pid, MediaResource::Type type, sp<IResourceManagerClient> *client);
99 bool isCallingPriorityHigher_l(int callingPid, int pid);
/frameworks/native/cmds/dumpstate/
Dutils.cpp135 int pid; in __for_each_pid() local
140 if (!(pid = atoi(de->d_name))) { in __for_each_pid()
146 snprintf(cmdpath, sizeof(cmdpath), "/proc/%d/cmdline", pid); in __for_each_pid()
151 helper(pid, cmdline, arg); in __for_each_pid()
157 snprintf(cmdpath, sizeof(cmdpath), "/proc/%d/comm", pid); in __for_each_pid()
171 helper(pid, cmdline, arg); in __for_each_pid()
177 static void for_each_pid_helper(int pid, const char *cmdline, void *arg) { in for_each_pid_helper() argument
179 func(pid, cmdline); in for_each_pid_helper()
187 static void for_each_tid_helper(int pid, const char *cmdline, void *arg) { in for_each_tid_helper() argument
193 snprintf(taskpath, sizeof(taskpath), "/proc/%d/task", pid); in for_each_tid_helper()
[all …]
/frameworks/av/drm/libmediadrm/
DDrmSessionManager.cpp68 int pid, sp<DrmSessionClientInterface> drm, const Vector<uint8_t> &sessionId) { in addSession() argument
69 ALOGV("addSession(pid %d, drm %p, sessionId %s)", pid, drm.get(), in addSession()
77 ssize_t index = mSessionMap.indexOfKey(pid); in addSession()
82 mSessionMap.add(pid, infosForPid); in addSession()
181 int pid = -1; in getLowestPriority_l() local
194 if (pid == -1) { in getLowestPriority_l()
195 pid = tempPid; in getLowestPriority_l()
199 pid = tempPid; in getLowestPriority_l()
204 if (pid != -1) { in getLowestPriority_l()
205 *lowestPriorityPid = pid; in getLowestPriority_l()
[all …]
/frameworks/av/media/libstagefright/
DProcessInfo.cpp31 bool ProcessInfo::getPriority(int pid, int* priority) { in getPriority() argument
40 status_t err = service->getProcessStatesAndOomScoresFromPids(length, &pid, &state, &score); in getPriority()
45 ALOGV("pid %d state %d score %d", pid, state, score); in getPriority()
47 ALOGE("pid %d invalid OOM adjustments value %d", pid, score); in getPriority()
56 bool ProcessInfo::isValidPid(int pid) { in isValidPid() argument
59 return (callingPid == getpid()) || (callingPid == pid); in isValidPid()
/frameworks/base/core/java/android/net/
DCredentials.java25 private final int pid; field in Credentials
31 public Credentials (int pid, int uid, int gid) { in Credentials() argument
32 this.pid = pid; in Credentials()
38 return pid; in getPid()
/frameworks/base/core/java/android/app/
DAppImportanceMonitor.java48 public void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities) {
52 public void onProcessStateChanged(int pid, int uid, int procState) {
54 updateImportanceLocked(pid, uid,
61 public void onProcessDied(int pid, int uid) {
63 updateImportanceLocked(pid, uid,
96 updateImportanceLocked(app.uid, app.pid, app.importance, false); in AppImportanceMonitor()
115 void updateImportanceLocked(int uid, int pid, int importance, boolean repChange) { in updateImportanceLocked() argument
122 ent.procs.remove(pid); in updateImportanceLocked()
124 ent.procs.put(pid, importance); in updateImportanceLocked()
DIProcessObserver.aidl22 void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities); in onForegroundActivitiesChanged() argument
23 void onProcessStateChanged(int pid, int uid, int procState); in onProcessStateChanged() argument
24 void onProcessDied(int pid, int uid); in onProcessDied() argument
DIActivityController.aidl46 boolean appCrashed(String processName, int pid, in appCrashed() argument
53 int appEarlyNotResponding(String processName, int pid, String annotation); in appEarlyNotResponding() argument
60 int appNotResponding(String processName, int pid, String processStats); in appNotResponding() argument
/frameworks/base/core/jni/
Dandroid_util_Process.cpp180 void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jint grp) in android_os_Process_setProcessGroup() argument
182 ALOGV("%s pid=%d grp=%" PRId32, __func__, pid, grp); in android_os_Process_setProcessGroup()
188 signalExceptionForGroupError(env, EINVAL, pid); in android_os_Process_setProcessGroup()
205 sprintf(proc_path, "/proc/%d/cmdline", pid); in android_os_Process_setProcessGroup()
214 ALOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline); in android_os_Process_setProcessGroup()
216 ALOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline); in android_os_Process_setProcessGroup()
220 sprintf(proc_path, "/proc/%d/task", pid); in android_os_Process_setProcessGroup()
224 signalExceptionForGroupError(env, errno, pid); in android_os_Process_setProcessGroup()
286 jint android_os_Process_getProcessGroup(JNIEnv* env, jobject clazz, jint pid) in android_os_Process_getProcessGroup() argument
289 if (get_sched_policy(pid, &sp) != 0) { in android_os_Process_getProcessGroup()
[all …]
Dcom_android_internal_os_Zygote.cpp87 pid_t pid; in SigChldHandler() local
98 while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { in SigChldHandler()
108 ALOGI("Process %d exited cleanly (%d)", pid, WEXITSTATUS(status)); in SigChldHandler()
112 ALOGI("Process %d exited due to signal (%d)", pid, WTERMSIG(status)); in SigChldHandler()
115 ALOGI("Process %d dumped core.", pid); in SigChldHandler()
122 if (pid == gSystemServerPid) { in SigChldHandler()
123 ALOGE("Exit zygote because system server (%d) has terminated", pid); in SigChldHandler()
130 if (pid < 0 && errno != ECHILD) { in SigChldHandler()
245 capheader.pid = 0; in SetCapabilities()
487 pid_t pid = fork(); in ForkAndSpecializeCommon() local
[all …]
/frameworks/base/core/java/android/os/
DProcess.java609 result.pid = inputStream.readInt(); in zygoteSendArgsAndGetResult()
612 if (result.pid < 0) { in zygoteSendArgsAndGetResult()
909 public static final int getUidForPid(int pid) { in getUidForPid() argument
913 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getUidForPid()
923 public static final int getParentPid(int pid) { in getParentPid() argument
927 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getParentPid()
1011 public static final native void setProcessGroup(int pid, int group) in setProcessGroup() argument
1019 public static final native int getProcessGroup(int pid) in getProcessGroup() argument
1141 public static final native boolean setSwappiness(int pid, boolean is_increased); in setSwappiness() argument
1164 public static final void killProcess(int pid) { in killProcess() argument
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DBinderUtilTest.java59 final int pid = Binder.getCallingPid(); in setUid() local
65 assertEquals(pid, Binder.getCallingPid()); in setUid()
71 assertEquals(pid, Binder.getCallingPid()); in setUid()
81 final int pid = Binder.getCallingPid(); in setUidAndRestoreCallingIdentity() local
87 assertEquals(pid, Binder.getCallingPid()); in setUidAndRestoreCallingIdentity()
92 assertEquals(pid, Binder.getCallingPid()); in setUidAndRestoreCallingIdentity()
/frameworks/base/core/java/com/android/internal/os/
DProcessCpuTracker.java187 public final int pid; field in ProcessCpuTracker.Stats
248 pid = _pid; in Stats()
250 final File procDir = new File("/proc", Integer.toString(pid)); in Stats()
265 new File(procDir, "task"), Integer.toString(pid)); in Stats()
421 int pid = pids[i]; in collectStats() local
422 if (pid < 0) { in collectStats()
423 NP = pid; in collectStats()
428 if (st != null && st.pid == pid) { in collectStats()
435 + " pid " + pid + ": " + st); in collectStats()
469 mCurThreadPids = collectStats(st.threadsDir, pid, false, in collectStats()
[all …]
DZygote.java95 int pid = nativeForkAndSpecialize( in forkAndSpecialize() local
99 if (pid == 0) { in forkAndSpecialize()
106 return pid; in forkAndSpecialize()
139 int pid = nativeForkSystemServer( in forkSystemServer() local
142 if (pid == 0) { in forkSystemServer()
146 return pid; in forkSystemServer()
DZygoteConnection.java161 int pid = -1; in runOnce() local
225 pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids, in runOnce()
239 if (pid == 0) { in runOnce()
252 return handleParentProc(pid, descriptors, serverPipeFd, parsedArgs); in runOnce()
774 private boolean handleParentProc(int pid, in handleParentProc() argument
777 if (pid > 0) { in handleParentProc()
778 setChildPgid(pid); in handleParentProc()
788 if (pipeFd != null && pid > 0) { in handleParentProc()
806 while (parentPid > 0 && parentPid != pid) { in handleParentProc()
811 pid = innerPid; in handleParentProc()
[all …]
/frameworks/native/libs/binder/
DIServiceManager.cpp61 pid_t pid = ipcState->getCallingPid(); in checkCallingPermission() local
63 if (outPid) *outPid = pid; in checkCallingPermission()
65 return checkPermission(permission, pid, uid); in checkCallingPermission()
68 bool checkPermission(const String16& permission, pid_t pid, uid_t uid) in checkPermission() argument
84 bool res = pc->checkPermission(permission, pid, uid); in checkPermission()
89 String8(permission).string(), uid, pid); in checkPermission()
97 String8(permission).string(), uid, pid); in checkPermission()
116 String8(permission).string(), uid, pid); in checkPermission()
DPermissionCache.cpp84 pid_t pid = ipcState->getCallingPid(); in checkCallingPermission() local
86 if (outPid) *outPid = pid; in checkCallingPermission()
88 return PermissionCache::checkPermission(permission, pid, uid); in checkCallingPermission()
92 const String16& permission, pid_t pid, uid_t uid) { in checkPermission() argument
93 if ((uid == 0) || (pid == getpid())) { in checkPermission()
102 granted = android::checkPermission(permission, pid, uid); in checkPermission()
DIMediaResourceMonitor.cpp31 virtual void notifyResourceGranted(/*in*/ int32_t pid, /*in*/ const int32_t type) in notifyResourceGranted() argument
35 data.writeInt32(pid); in notifyResourceGranted()
50 int32_t pid = data.readInt32(); in onTransact() local
52 notifyResourceGranted(/*in*/ pid, /*in*/ type); in onTransact()
/frameworks/base/services/core/java/com/android/server/media/
DMediaResourceMonitorService.java55 public void notifyResourceGranted(int pid, int type) in notifyResourceGranted() argument
58 Slog.d(TAG, "notifyResourceGranted(pid=" + pid + ", type=" + type + ")"); in notifyResourceGranted()
62 String pkgNames[] = getPackageNamesFromPid(pid); in notifyResourceGranted()
84 private String[] getPackageNamesFromPid(int pid) { in getPackageNamesFromPid() argument
88 if (proc.pid == pid) { in getPackageNamesFromPid()
/frameworks/av/media/libmedia/
DIResourceManagerService.cpp74 int pid, in addResource() argument
80 data.writeInt32(pid); in addResource()
88 virtual void removeResource(int pid, int64_t clientId) { in removeResource() argument
91 data.writeInt32(pid); in removeResource()
131 int pid = data.readInt32(); in onTransact() local
140 addResource(pid, clientId, client, resources); in onTransact()
146 int pid = data.readInt32(); in onTransact() local
148 removeResource(pid, clientId); in onTransact()
/frameworks/base/services/core/java/com/android/server/am/
DAppErrors.java254 if (app.pid > 0 && app.pid != MY_PID) { in killAppAtUserRequestLocked()
275 if (p.pid == initialPid) { in scheduleAppCrashLocked()
439 int pid = r != null ? r.pid : Binder.getCallingPid(); in handleAppCrashInActivityController() local
441 if (!mService.mController.appCrashed(name, pid, in handleAppCrashInActivityController()
446 + "(" + pid + ") during testing"); in handleAppCrashInActivityController()
457 Process.killProcess(pid); in handleAppCrashInActivityController()
458 ActivityManagerService.killProcessGroup(uid, pid); in handleAppCrashInActivityController()
515 report.pid = app.pid; in generateProcessError()
694 && proc.pid != MY_PID); in handleShowAppErrorUi()
739 app.processName, app.pid, annotation); in appNotResponding()
[all …]
/frameworks/base/services/core/java/com/android/server/
DGraphicsStatsService.java82 int pid = Binder.getCallingPid(); in requestBufferForProcess() local
88 pfd = requestBufferForProcessLocked(token, uid, pid, packageName); in requestBufferForProcess()
105 int uid, int pid, String packageName) throws RemoteException { in requestBufferForProcessLocked() argument
106 ActiveBuffer buffer = fetchActiveBuffersLocked(token, uid, pid, packageName); in requestBufferForProcessLocked()
130 private ActiveBuffer fetchActiveBuffersLocked(IBinder token, int uid, int pid, in fetchActiveBuffersLocked() argument
135 if (buffers.mPid == pid in fetchActiveBuffersLocked()
142 ActiveBuffer buffers = new ActiveBuffer(token, uid, pid, packageName); in fetchActiveBuffersLocked()
203 ActiveBuffer(IBinder token, int uid, int pid, String packageName) in ActiveBuffer() argument
206 mPid = pid; in ActiveBuffer()
/frameworks/compile/libbcc/gdb_plugin/
Dandroid-commands.py312 pid = line[1]
315 return (pid, user)
317 ret.append((pid, user))
325 def kill_by_pid(self, pid): argument
326 self._shell(*["kill", "-9", pid])
329 (pid, user) = self.get_process_info(process_name)
330 while pid != None:
331 self.kill_by_pid(pid)
332 (pid, user) = self.get_process_info(process_name)
346 (self.pid, self.owner_user) = \
[all …]
/frameworks/base/core/java/android/database/
DCursorWindow.java722 private void recordNewWindow(int pid, long window) { in recordNewWindow() argument
724 sWindowToPidMap.put(window, pid); in recordNewWindow()
753 int pid = sWindowToPidMap.valueAt(indx); in printStats() local
754 int value = pidCounts.get(pid); in printStats()
755 pidCounts.put(pid, ++value); in printStats()
761 int pid = pidCounts.keyAt(i); in printStats() local
762 if (pid == myPid) { in printStats()
765 buff.append("pid " + pid + "="); in printStats()
767 int num = pidCounts.get(pid); in printStats()

123456789