/frameworks/base/media/java/android/media/session/ |
D | ISessionCallback.aidl | 28 void onCommand(String packageName, int pid, int uid, String command, in Bundle args, in onCommand() argument 30 void onMediaButton(String packageName, int pid, int uid, in Intent mediaButtonIntent, in onMediaButton() argument 32 void onMediaButtonFromController(String packageName, int pid, int uid, in onMediaButtonFromController() argument 36 void onPrepare(String packageName, int pid, int uid); in onPrepare() argument 37 void onPrepareFromMediaId(String packageName, int pid, int uid, String mediaId, in onPrepareFromMediaId() argument 39 void onPrepareFromSearch(String packageName, int pid, int uid, String query, in Bundle extras); in onPrepareFromSearch() argument 40 void onPrepareFromUri(String packageName, int pid, int uid, in Uri uri, in Bundle extras); in onPrepareFromUri() argument 41 void onPlay(String packageName, int pid, int uid); in onPlay() argument 42 void onPlayFromMediaId(String packageName, int pid, int uid, String mediaId, in Bundle extras); in onPlayFromMediaId() argument 43 void onPlayFromSearch(String packageName, int pid, int uid, String query, in Bundle extras); in onPlayFromSearch() argument [all …]
|
/frameworks/native/libs/binder/ |
D | UtilsHost.cpp | 36 if (!pid.has_value()) return; in ~CommandResult() 37 if (*pid == 0) { in ~CommandResult() 42 ALOGE_IF(kill(*pid, SIGKILL) != 0, "kill(%d): %s", *pid, strerror(errno)); in ~CommandResult() 44 while (pid.has_value()) { in ~CommandResult() 46 LOG_HOST("%s: Waiting for PID %d to exit.", __PRETTY_FUNCTION__, *pid); in ~CommandResult() 47 int waitres = waitpid(*pid, &status, 0); in ~CommandResult() 49 ALOGE("%s: waitpid(%d): %s", __PRETTY_FUNCTION__, *pid, strerror(errno)); in ~CommandResult() 53 LOG_HOST("%s: PID %d exited.", __PRETTY_FUNCTION__, *pid); in ~CommandResult() 54 pid.reset(); in ~CommandResult() 56 LOG_HOST("%s: PID %d terminated by signal %d.", __PRETTY_FUNCTION__, *pid, in ~CommandResult() [all …]
|
/frameworks/av/services/oboeservice/ |
D | AAudioClientTracker.cpp | 66 aaudio_result_t AAudioClientTracker::registerClient(pid_t pid, in registerClient() argument 68 ALOGV("registerClient(), calling pid = %d, getpid() = %d\n", pid, getpid()); in registerClient() 77 if (mNotificationClients.count(pid) == 0) { in registerClient() 79 const sp<NotificationClient> notificationClient = new NotificationClient(pid, binder); in registerClient() 80 mNotificationClients[pid] = notificationClient; in registerClient() 86 ALOGW("registerClient(%d) already registered!", pid); in registerClient() 91 void AAudioClientTracker::unregisterClient(pid_t pid) { in unregisterClient() argument 92 ALOGV("unregisterClient(), calling pid = %d, getpid() = %d\n", pid, getpid()); in unregisterClient() 94 mNotificationClients.erase(pid); in unregisterClient() 97 int32_t AAudioClientTracker::getStreamCount(pid_t pid) { in getStreamCount() argument [all …]
|
D | AAudioClientTracker.h | 50 aaudio_result_t registerClient(pid_t pid, const android::sp<IAAudioClient>& client); 52 void unregisterClient(pid_t pid); 54 int32_t getStreamCount(pid_t pid); 56 aaudio_result_t registerClientStream(pid_t pid, 60 pid_t pid, const android::sp<AAudioServiceStreamBase>& serviceStream); 67 void setExclusiveEnabled(pid_t pid, bool enabled); 69 bool isExclusiveEnabled(pid_t pid); 86 NotificationClient(pid_t pid, const android::sp<IBinder>& binder); 120 android::sp<NotificationClient> getNotificationClient_l(pid_t pid)
|
/frameworks/av/services/mediaresourcemanager/ |
D | ResourceTracker.cpp | 83 ResourceInfos& ResourceTracker::getResourceInfosForEdit(int pid) { in getResourceInfosForEdit() argument 84 std::map<int, ResourceInfos>::iterator found = mMap.find(pid); in getResourceInfosForEdit() 88 auto [it, inserted] = mMap.emplace(pid, infosForPid); in getResourceInfosForEdit() 98 int32_t pid = clientInfo.pid; in addResource() local 101 if (!mProcessInfo->isPidUidTrusted(pid, uid)) { in addResource() 105 __func__, pid, uid, callingPid, callingUid); in addResource() 106 pid = callingPid; in addResource() 109 ResourceInfos& infos = getResourceInfosForEdit(pid); in addResource() 133 mObserverService->onResourceAdded(uid, pid, resourceAdded); in addResource() 140 ResourceInfos& infos = getResourceInfosForEdit(clientInfo.pid); in updateResource() [all …]
|
D | ResourceManagerService.cpp | 55 for (const auto& [pid, infos] : mapCopy) { in getResourceDump() 56 snprintf(buffer, SIZE, " Pid: %d\n", pid); in getResourceDump() 59 if (getPriority_l(pid, &priority)) { in getResourceDump() 305 int32_t pid = clientInfo.pid; in addResource() local 309 pid, uid, (long long) clientId, getString(resources).c_str()); in addResource() 313 if (!mProcessInfo->isPidUidTrusted(pid, uid)) { in addResource() 317 __FUNCTION__, pid, uid, callingPid, callingUid); in addResource() 318 pid = callingPid; in addResource() 321 ResourceInfos& infos = getResourceInfosForEdit(pid, mMap); in addResource() 348 mObserverService->onResourceAdded(uid, pid, resourceAdded); in addResource() [all …]
|
D | ResourceManagerServiceNew.cpp | 88 int32_t pid = clientInfo.pid; in addResource() local 92 pid, uid, (long long) clientId, getString(resources).c_str()); in addResource() 97 notifyResourceGranted(pid, resources); in addResource() 105 int32_t pid = clientInfo.pid; in removeResource() local 109 pid, uid, (long long) clientId, getString(resources).c_str()); in removeResource() 124 int32_t pid = clientInfo.pid; in removeResource() local 128 pid, uid, (long long) clientId); in removeResource() 155 int pid, in overrideProcessInfo_l() argument 158 return mResourceTracker->overrideProcessInfo(client, pid, procState, oomScore); in overrideProcessInfo_l() 163 int pid, in overrideProcessInfo() argument [all …]
|
D | ResourceManagerMetrics.cpp | 128 [this] (int32_t pid, uid_t uid) { in ResourceManagerMetrics() argument 129 onProcessTerminated(pid, uid); in ResourceManagerMetrics() 138 void ResourceManagerMetrics::addPid(int pid, uid_t uid) { in addPid() argument 141 mUidObserver->add(pid, uid); in addPid() 195 int pid = clientConfig.clientInfo.pid; in notifyClientConfigChanged() local 197 updatePixelCount(pid, clientConfig.width * (long)clientConfig.height, in notifyClientConfigChanged() 207 int pid = clientConfig.clientInfo.pid; in notifyClientStarted() local 209 mUidObserver->add(pid, clientConfig.clientInfo.uid); in notifyClientStarted() 216 increaseConcurrentCodecs(pid, codecBucket); in notifyClientStarted() 223 increasePixelCount(pid, clientConfig.width * (long)clientConfig.height); in notifyClientStarted() [all …]
|
D | ResourceManagerMetrics.h | 167 void addPid(int pid, uid_t uid = 0); 170 long getPeakConcurrentPixelCount(int pid) const; 172 long getCurrentConcurrentPixelCount(int pid) const; 184 void increaseConcurrentCodecs(int32_t pid, CodecBucket codecBucket); 185 void decreaseConcurrentCodecs(int32_t pid, CodecBucket codecBucket); 188 void increasePixelCount(int32_t pid, long pixels); 189 void updatePixelCount(int32_t pid, long newPixels, long lastPixels); 190 void decreasePixelCount(int32_t pid, long pixels); 193 void onProcessTerminated(int32_t pid, uid_t uid); 196 void pushConcurrentUsageReport(int32_t pid, uid_t uid);
|
/frameworks/native/cmds/rss_hwm_reset/ |
D | rss_hwm_reset.cc | 41 void reset_rss_hwm(const char* pid) { in reset_rss_hwm() argument 43 ::android::base::StringPrintf("/proc/%s/clear_refs", pid); in reset_rss_hwm() 60 const char* pid = entry->d_name; in main() local 61 while (*pid) { in main() 62 if (*pid < '0' || *pid > '9') break; in main() 63 pid++; in main() 65 if (*pid != 0) continue; in main() 67 pid = entry->d_name; in main() 68 reset_rss_hwm(pid); in main()
|
/frameworks/base/core/jni/ |
D | com_android_internal_os_KernelAllocationStats.cpp | 56 for (auto pid : buf.pids()) { in KernelAllocationStats_getDmabufAllocations() local 57 pidToInodes[pid].insert(buf.inode()); in KernelAllocationStats_getDmabufAllocations() 75 pid_t pid = pidToInodeEntry.first; in KernelAllocationStats_getDmabufAllocations() local 78 if (!android::procinfo::GetProcessInfo(pid, &processInfo)) { in KernelAllocationStats_getDmabufAllocations() 83 if (!ReadFileToString(StringPrintf("/proc/%d/cmdline", pid), &cmdline)) { in KernelAllocationStats_getDmabufAllocations() 90 surfaceFlingerPid = pid; in KernelAllocationStats_getDmabufAllocations() 91 surfaceFlingerBufferInodes = pidToInodes[pid]; in KernelAllocationStats_getDmabufAllocations() 93 LOG(ERROR) << "getDmabufAllocations found multiple SF processes; pid1: " << pid in KernelAllocationStats_getDmabufAllocations() 98 otherProcessBufferInodes.insert(pidToInodes[pid].begin(), pidToInodes[pid].end()); in KernelAllocationStats_getDmabufAllocations() 102 if (!ReadFileToString(StringPrintf("/proc/%d/oom_score_adj", pid), &oomScoreAdjStr)) { in KernelAllocationStats_getDmabufAllocations() [all …]
|
D | android_util_Process.cpp | 238 static int uid_from_pid(int pid) in uid_from_pid() argument 242 int res = snprintf(path.data(), path.size(), "/proc/%d/status", pid); in uid_from_pid() 261 void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jint grp) in android_os_Process_setProcessGroup() argument 263 ALOGV("%s pid=%d grp=%" PRId32, __func__, pid, grp); in android_os_Process_setProcessGroup() 271 signalExceptionForGroupError(env, EINVAL, pid); in android_os_Process_setProcessGroup() 285 sprintf(proc_path, "/proc/%d/cmdline", pid); in android_os_Process_setProcessGroup() 290 ALOGE("read /proc/%d/cmdline (%s)", pid, strerror(errno)); in android_os_Process_setProcessGroup() 298 ALOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline); in android_os_Process_setProcessGroup() 300 ALOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline); in android_os_Process_setProcessGroup() 304 const int uid = uid_from_pid(pid); in android_os_Process_setProcessGroup() [all …]
|
/frameworks/av/media/utils/ |
D | ProcessInfo.cpp | 89 bool ProcessInfo::getPriority(int pid, int* priority) { in getPriority() argument 96 status_t err = service->getProcessStatesAndOomScoresFromPids(length, &pid, &state, &score); in getPriority() 97 ALOGV("%s: pid:%d state:%d score:%d err:%d", __FUNCTION__, pid, state, score, err); in getPriority() 106 auto it = mOverrideMap.find(pid); in getPriority() 108 ALOGI("pid %d invalid OOM score %d, override to %d", pid, score, it->second.oomScore); in getPriority() 111 ALOGE("pid %d invalid OOM score %d", pid, score); in getPriority() 121 bool ProcessInfo::isPidTrusted(int pid) { in isPidTrusted() argument 122 return isPidUidTrusted(pid, -1); in isPidTrusted() 125 bool ProcessInfo::isPidUidTrusted(int pid, int uid) { in isPidUidTrusted() argument 129 if (pid == callingPid && (uid == callingUid || uid == -1)) { // UID can be optional in isPidUidTrusted() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/ |
D | JobNotificationCoordinatorTest.java | 95 final int pid = 42; in testParameterValidation() local 99 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, null, in testParameterValidation() 109 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation() 119 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation() 128 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, in testParameterValidation() 143 final int pid = 42; in testSingleJob_DetachOnStop() local 146 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, notification, in testSingleJob_DetachOnStop() 149 .enqueueNotification(eq(TEST_PACKAGE), eq(TEST_PACKAGE), eq(uid), eq(pid), any(), in testSingleJob_DetachOnStop() 165 final int pid = 42; in testSingleJob_RemoveOnStop() local 168 coordinator.enqueueNotification(jsc, TEST_PACKAGE, pid, uid, notificationId, notification, in testSingleJob_RemoveOnStop() [all …]
|
/frameworks/native/services/vr/virtual_touchpad/ |
D | VirtualTouchpadService.cpp | 29 pid_t pid; in attach() local 30 if (!CheckTouchPermission(&pid)) { in attach() 33 if (client_pid_ == pid) { in attach() 38 ALOGE("pid=%ld attached twice", static_cast<long>(pid)); in attach() 46 ALOGE("pid=%ld replaces %ld", static_cast<long>(pid), in attach() 48 client_pid_ = pid; in attach() 51 client_pid_ = pid; in attach() 104 const pid_t pid = ipc->getCallingPid(); in dump() local 107 !PermissionCache::checkPermission(kDumpPermission, pid, uid)) { in dump() 110 static_cast<long>(pid), static_cast<long>(uid)); in dump() [all …]
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | StickyModifierStateController.java | 63 int pid) { in registerStickyModifierStateListener() argument 65 if (mStickyModifierStateListenerRecords.get(pid) != null) { in registerStickyModifierStateListener() 69 StickyModifierStateListenerRecord record = new StickyModifierStateListenerRecord(pid, in registerStickyModifierStateListener() 76 mStickyModifierStateListenerRecords.put(pid, record); in registerStickyModifierStateListener() 83 int pid) { in unregisterStickyModifierStateListener() argument 85 StickyModifierStateListenerRecord record = mStickyModifierStateListenerRecords.get(pid); in unregisterStickyModifierStateListener() 95 mStickyModifierStateListenerRecords.remove(pid); in unregisterStickyModifierStateListener() 99 private void onStickyModifierStateListenerDied(int pid) { in onStickyModifierStateListenerDied() argument 101 mStickyModifierStateListenerRecords.remove(pid); in onStickyModifierStateListenerDied() 110 StickyModifierStateListenerRecord(int pid, IStickyModifierStateListener listener) { in StickyModifierStateListenerRecord() argument [all …]
|
/frameworks/native/cmds/lshal/libprocpartition/ |
D | procpartition.cpp | 35 std::string getExe(pid_t pid) { in getExe() argument 38 if (!android::base::Readlink("/proc/" + std::to_string(pid) + "/exe", &exe)) { in getExe() 47 std::string getCmdline(pid_t pid) { in getCmdline() argument 49 if (!android::base::ReadFileToString("/proc/" + std::to_string(pid) + "/cmdline", &content, in getCmdline() 81 Partition getPartitionFromCmdline(pid_t pid) { in getPartitionFromCmdline() argument 82 const auto& cmdline = getCmdline(pid); in getPartitionFromCmdline() 92 Partition getPartitionFromExe(pid_t pid) { in getPartitionFromExe() argument 93 const auto& real = getExe(pid); in getPartitionFromExe() 101 Partition getPartition(pid_t pid) { in getPartition() argument 102 Partition partition = getPartitionFromExe(pid); in getPartition() [all …]
|
/frameworks/base/cmds/incidentd/tests/ |
D | FdBuffer_test.cpp | 125 int pid = fork(); in TEST_F() local 126 ASSERT_TRUE(pid != -1); in TEST_F() 128 if (pid == 0) { in TEST_F() 142 kill(pid, SIGKILL); // reap the child process in TEST_F() 151 int pid = fork(); in TEST_F() local 152 ASSERT_TRUE(pid != -1); in TEST_F() 154 if (pid == 0) { in TEST_F() 172 wait(&pid); in TEST_F() 181 int pid = fork(); in TEST_F() local 182 ASSERT_TRUE(pid != -1); in TEST_F() [all …]
|
/frameworks/base/cmds/incidentd/src/ |
D | incidentd_util.cpp | 110 pid_t pid = vfork(); in fork_execute_cmd() local 111 if (pid < 0) { in fork_execute_cmd() 115 if (pid == 0) { in fork_execute_cmd() 134 kill_child(pid); in fork_execute_cmd() 137 return pid; in fork_execute_cmd() 182 static bool waitpid_with_timeout(pid_t pid, int timeout_ms, int* status) { in waitpid_with_timeout() argument 194 pid_t child_pid = waitpid(pid, status, WNOHANG); in waitpid_with_timeout() 195 if (child_pid != pid) { in waitpid_with_timeout() 197 ALOGW("*** Waiting for pid %d, got pid %d instead\n", pid, child_pid); in waitpid_with_timeout() 230 child_pid = waitpid(pid, status, WNOHANG); in waitpid_with_timeout() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | PhantomProcessList.java | 175 int pid = 0; in lookForPhantomProcessesLocked() local 186 addChildPidLocked(app, pid, appPid); in lookForPhantomProcessesLocked() 187 pid = 0; in lookForPhantomProcessesLocked() 189 pid = pid * 10 + (b - '0'); in lookForPhantomProcessesLocked() 198 if (pid != 0) { in lookForPhantomProcessesLocked() 199 addChildPidLocked(app, pid, appPid); in lookForPhantomProcessesLocked() 220 String getCgroupFilePath(int uid, int pid) { in getCgroupFilePath() argument 221 return CGROUP_PATH_PREFIXES[mCgroupVersion] + uid + CGROUP_PID_PREFIX + pid + CGROUP_PROCS; in getCgroupFilePath() 224 static String getProcessName(int pid) { in getProcessName() argument 226 "/proc/" + pid + "/cmdline", (byte) '\0'); in getProcessName() [all …]
|
D | StackTracesDumpHelper.java | 245 final int pid = firstPids.get(i); in dumpStackTraces() local 247 final boolean firstPid = i == 0 && ActivityManagerService.MY_PID != pid; in dumpStackTraces() 248 Slog.i(TAG, "Collecting stacks for pid " + pid); in dumpStackTraces() 249 final long timeTaken = dumpJavaTracesTombstoned(pid, tracesFile, remainingTime, in dumpStackTraces() 253 Slog.e(TAG, "Aborting stack trace dump (current firstPid=" + pid in dumpStackTraces() 284 for (int pid : nativePids) { in dumpStackTraces() 285 Slog.i(TAG, "Collecting stacks for native pid " + pid); in dumpStackTraces() 289 latencyTracker.dumpingPidStarted(pid); in dumpStackTraces() 293 pid, tracesFile, (int) (nativeDumpTimeoutMs / 1000)); in dumpStackTraces() 300 Slog.e(TAG, "Aborting stack trace dump (current native pid=" + pid in dumpStackTraces() [all …]
|
/frameworks/native/libs/binderdebug/ |
D | BinderDebug.cpp | 42 static status_t scanBinderContext(pid_t pid, const std::string& contextName, in scanBinderContext() argument 44 std::ifstream ifs("/dev/binderfs/binder_logs/proc/" + std::to_string(pid)); in scanBinderContext() 46 ifs.open("/d/binder/proc/" + std::to_string(pid)); in scanBinderContext() 70 status_t getBinderPidInfo(BinderDebugContext context, pid_t pid, BinderPidInfo* pidInfo) { in getBinderPidInfo() argument 75 status_t ret = scanBinderContext(pid, contextStr, [&](const std::string& line) { in getBinderPidInfo() 92 int32_t pid; in getBinderPidInfo() local 93 if (!::android::base::ParseInt(token, &pid)) { in getBinderPidInfo() 101 pidInfo->refPids[ptr].push_back(pid); in getBinderPidInfo() 133 status_t getBinderClientPids(BinderDebugContext context, pid_t pid, pid_t servicePid, in getBinderClientPids() argument 139 status_t ret = scanBinderContext(pid, contextStr, [&](const std::string& line) { in getBinderClientPids() [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | ProcLocksReader.java | 75 int pid = -1; // the PID of the process being blocked in handleBlockingFileLocks() local 93 pid = mReader.nextInt(); // pid in handleBlockingFileLocks() 94 if (pid > 0) { in handleBlockingFileLocks() 95 mPids.add(pid); in handleBlockingFileLocks() 111 pid = mReader.nextInt(); // pid in handleBlockingFileLocks() 112 if (pid > 0) { in handleBlockingFileLocks() 114 mPids.add(pid); in handleBlockingFileLocks() 116 mPids.set(0, pid); in handleBlockingFileLocks()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | WindowProcessControllerMap.java | 33 WindowProcessController getProcess(int pid) { in getProcess() argument 34 return mPidMap.get(pid); in getProcess() 46 void put(int pid, WindowProcessController proc) { in put() argument 49 final WindowProcessController prevProc = mPidMap.get(pid); in put() 54 mPidMap.put(pid, proc); in put() 63 void remove(int pid) { in remove() argument 64 final WindowProcessController proc = mPidMap.get(pid); in remove() 67 mPidMap.remove(pid); in remove()
|
/frameworks/base/services/core/java/com/android/server/os/ |
D | SchedulingPolicyService.java | 82 public int requestPriority(int pid, int tid, int prio, boolean isForApp) { in requestPriority() argument 92 prio > PRIORITY_MAX || Process.getThreadGroupLeader(tid) != pid) { in requestPriority() 145 private int enableCpusetBoost(int pid, IBinder client) { in enableCpusetBoost() argument 146 if (mBoostedPid == pid) { in enableCpusetBoost() 166 Log.i(TAG, "Moving " + pid + " to group " + Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost() 167 Process.setProcessGroup(pid, Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost() 169 mBoostedPid = pid; in enableCpusetBoost() 184 private int disableCpusetBoost(int pid) { in disableCpusetBoost() argument 200 if (boostedPid == pid) { in disableCpusetBoost() 202 Log.i(TAG, "Moving " + pid + " back to group default"); in disableCpusetBoost() [all …]
|