/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/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/native/libs/binder/ |
D | UtilsHost.cpp | 31 if (!pid.has_value()) return; in ~CommandResult() 32 if (*pid == 0) { in ~CommandResult() 37 ALOGE_IF(kill(*pid, SIGKILL) != 0, "kill(%d): %s", *pid, strerror(errno)); in ~CommandResult() 39 while (pid.has_value()) { in ~CommandResult() 41 LOG_HOST("%s: Waiting for PID %d to exit.", __PRETTY_FUNCTION__, *pid); in ~CommandResult() 42 int waitres = waitpid(*pid, &status, 0); in ~CommandResult() 44 ALOGE("%s: waitpid(%d): %s", __PRETTY_FUNCTION__, *pid, strerror(errno)); in ~CommandResult() 48 LOG_HOST("%s: PID %d exited.", __PRETTY_FUNCTION__, *pid); in ~CommandResult() 49 pid.reset(); in ~CommandResult() 51 LOG_HOST("%s: PID %d terminated by signal %d.", __PRETTY_FUNCTION__, *pid, in ~CommandResult() [all …]
|
/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 …]
|
/frameworks/av/services/mediaresourcemanager/ |
D | ResourceManagerMetrics.cpp | 119 [this] (int32_t pid, uid_t uid) { in ResourceManagerMetrics() argument 120 onProcessTerminated(pid, uid); in ResourceManagerMetrics() 129 void ResourceManagerMetrics::addPid(int pid, uid_t uid) { in addPid() argument 132 mUidObserver->add(pid, uid); in addPid() 184 int pid = clientConfig.clientInfo.pid; in notifyClientConfigChanged() local 186 updatePixelCount(pid, clientConfig.width * (long)clientConfig.height, in notifyClientConfigChanged() 196 int pid = clientConfig.clientInfo.pid; in notifyClientStarted() local 198 mUidObserver->add(pid, clientConfig.clientInfo.uid); in notifyClientStarted() 207 increaseConcurrentCodecs(pid, codecBucket); in notifyClientStarted() 212 increasePixelCount(pid, clientConfig.width * (long)clientConfig.height); in notifyClientStarted() [all …]
|
D | ResourceManagerService.cpp | 99 service->overridePid(mClientInfo.pid, -1); in binderDied() 123 service->removeProcessInfoOverride(mClientInfo.pid); in binderDied() 176 static ResourceInfos& getResourceInfosForEdit(int pid, PidResourceInfosMap& map) { in getResourceInfosForEdit() argument 177 ssize_t index = map.indexOfKey(pid); in getResourceInfosForEdit() 181 map.add(pid, infosForPid); in getResourceInfosForEdit() 184 return map.editValueFor(pid); in getResourceInfosForEdit() 211 static void notifyResourceGranted(int pid, const std::vector<MediaResourceParcel> &resources) { in notifyResourceGranted() argument 219 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC); in notifyResourceGranted() 222 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC); in notifyResourceGranted() 225 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_IMAGE_CODEC); in notifyResourceGranted() [all …]
|
D | ResourceManagerMetrics.h | 142 void addPid(int pid, uid_t uid = 0); 145 long getPeakConcurrentPixelCount(int pid) const; 147 long getCurrentConcurrentPixelCount(int pid) const; 156 void increaseConcurrentCodecs(int32_t pid, CodecBucket codecBucket); 157 void decreaseConcurrentCodecs(int32_t pid, CodecBucket codecBucket); 160 void increasePixelCount(int32_t pid, long pixels); 161 void updatePixelCount(int32_t pid, long newPixels, long lastPixels); 162 void decreasePixelCount(int32_t pid, long pixels); 165 void onProcessTerminated(int32_t pid, uid_t uid); 168 void pushConcurrentUsageReport(int32_t pid, uid_t uid);
|
/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/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/base/core/java/com/android/internal/os/ |
D | ProcLocksReader.java | 74 int pid = -1; // the PID of the process being blocked in handleBlockingFileLocks() local 92 pid = mReader.nextInt(); // pid in handleBlockingFileLocks() 93 if (pid > 0) { in handleBlockingFileLocks() 94 mPids.add(pid); in handleBlockingFileLocks() 110 pid = mReader.nextInt(); // pid in handleBlockingFileLocks() 111 if (pid > 0) { in handleBlockingFileLocks() 113 mPids.add(pid); in handleBlockingFileLocks() 115 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/jni/ |
D | com_android_server_am_CachedAppOptimizer.cpp | 271 static inline void compactProcessProcfs(int pid, const std::string& compactionType) { in compactProcessProcfs() argument 272 std::string reclaim_path = StringPrintf("/proc/%d/reclaim", pid); in compactProcessProcfs() 281 static int64_t compactMemory(const std::vector<Vma>& vmas, int pid, int madviseType, in compactMemory() argument 287 unique_fd pidfd(pidfd_open(pid, 0)); in compactMemory() 307 LOG(DEBUG) << "Cancelled running compaction for " << pid; in compactMemory() 309 StringPrintf("Cancelled compaction for %d", pid).c_str()); in compactMemory() 359 static int64_t compactProcess(int pid, VmaToAdviseFunc vmaToAdviseFunc) { in compactProcess() argument 363 ProcMemInfo meminfo(pid); in compactProcess() 395 int64_t pageoutBytes = compactMemory(pageoutVmas, pid, MADV_PAGEOUT, pageoutVmaIndex); in compactProcess() 402 int64_t coldBytes = compactMemory(coldVmas, pid, MADV_COLD, coldVmaIndex); in compactProcess() [all …]
|
/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 …]
|
/frameworks/base/services/flags/java/com/android/server/flags/ |
D | DynamicFlagBinderDelegate.java | 98 for (Integer pid : mCallbacks.keySet()) { 99 if (data.containsPid(pid)) { 100 cbCopy.addAll(mCallbacks.get(pid)); 121 SyncableFlag syncDynamicFlag(int pid, SyncableFlag sf) { in syncDynamicFlag() argument 142 data.addClientPid(pid); in syncDynamicFlag() 152 void registerCallback(int pid, IFeatureFlagsCallback callback) { in registerCallback() argument 161 callbacks = mCallbacks.computeIfAbsent(pid, NEW_CALLBACK_SET); in registerCallback() 165 callback.asBinder().linkToDeath(new BinderGriever(pid), 0); in registerCallback() 176 void unregisterCallback(int pid, IFeatureFlagsCallback callback) { in unregisterCallback() argument 181 mCallbacks.computeIfAbsent(pid, NEW_CALLBACK_SET); in unregisterCallback() [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/android/net/ |
D | Credentials.java | 25 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/services/core/java/com/android/server/stats/pull/ |
D | ProcfsMemoryUtil.java | 45 public static MemorySnapshot readMemorySnapshotFromProcfs(int pid) { in readMemorySnapshotFromProcfs() argument 51 Process.readProcLines("/proc/" + pid + "/status", STATUS_KEYS, output); in readMemorySnapshotFromProcfs() 72 public static String readCmdlineFromProcfs(int pid) { in readCmdlineFromProcfs() argument 74 if (!Process.readProcFile("/proc/" + pid + "/cmdline", CMDLINE_OUT, cmdline, null, null)) { in readCmdlineFromProcfs() 88 for (int pid : pids) { in getProcessCmdlines() 89 if (pid < 0) { in getProcessCmdlines() 92 String cmdline = readCmdlineFromProcfs(pid); in getProcessCmdlines() 96 cmdlines.append(pid, cmdline); in getProcessCmdlines()
|