/aosp12/system/unwinding/libunwindstack/tests/ |
H A D | MemoryRemoteTest.cpp | 44 pid_t pid; in TEST() local 49 ASSERT_LT(0, pid); in TEST() 72 pid_t pid; in TEST() local 78 ASSERT_LT(0, pid); in TEST() 102 pid_t pid; in TEST() local 147 pid_t pid; in TEST() local 178 pid_t pid; in TEST() local 199 pid_t pid; in TEST() local 226 pid_t pid; in TEST() local 261 pid_t pid; in TEST() local [all …]
|
H A D | UnwindTest.cpp | 259 pid_t pid; in TEST_F() local 264 ASSERT_NE(-1, pid); in TEST_F() 271 RemoteMaps maps(pid); in TEST_F() 283 pid_t pid; in TEST_F() local 288 ASSERT_NE(-1, pid); in TEST_F() 310 pid_t pid; in RemoteCheckForLeaks() local 315 ASSERT_NE(-1, pid); in RemoteCheckForLeaks() 331 RemoteMaps maps(*pid); in RemoteUnwind() 405 pid_t pid; in RemoteThroughSignal() local 416 ASSERT_NE(-1, pid); in RemoteThroughSignal() [all …]
|
/aosp12/system/unwinding/libbacktrace/ |
H A D | backtrace_read_benchmarks.cpp | 39 static void Attach(pid_t pid) { in Attach() argument 59 ScopedPidReaper(pid_t pid) : pid_(pid) {} in ScopedPidReaper() argument 125 if ((*pid = fork()) == 0) { in CreateRemoteProcess() 130 if (*pid < 0) { in CreateRemoteProcess() 134 Attach(*pid); in CreateRemoteProcess() 141 pid_t pid; in BM_read_with_ptrace() local 143 ScopedPidReaper reap(pid); in BM_read_with_ptrace() 159 pid_t pid; in BM_read_with_process_vm_read() local 161 ScopedPidReaper reap(pid); in BM_read_with_process_vm_read() 177 pid_t pid; in BM_read_with_backtrace_object() local [all …]
|
H A D | backtrace_test.cpp | 166 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); in FinishRemoteProcess() 425 pid_t pid; in TEST_F() local 435 ASSERT_EQ(waitpid(pid, &status, 0), pid); in TEST_F() 439 pid_t pid; in TEST_F() local 449 ASSERT_EQ(waitpid(pid, &status, 0), pid); in TEST_F() 469 pid_t pid; in TEST_F() local 479 ASSERT_EQ(waitpid(pid, &status, 0), pid); in TEST_F() 506 pid_t pid; in TEST_F() local 1184 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); in TEST_F() 1354 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); in TEST_F() [all …]
|
/aosp12/frameworks/base/media/java/android/media/session/ |
H A D | ISessionCallback.aidl | 32 void onMediaButtonFromController(String packageName, int pid, int uid, in onMediaButtonFromController() argument 36 void onPrepare(String packageName, int pid, int uid); in onPrepare() argument 41 void onPlay(String packageName, int pid, int uid); in onPlay() argument 45 void onSkipToTrack(String packageName, int pid, int uid, long id); in onSkipToTrack() argument 46 void onPause(String packageName, int pid, int uid); in onPause() argument 47 void onStop(String packageName, int pid, int uid); in onStop() argument 48 void onNext(String packageName, int pid, int uid); in onNext() argument 49 void onPrevious(String packageName, int pid, int uid); in onPrevious() argument 50 void onFastForward(String packageName, int pid, int uid); in onFastForward() argument 51 void onRewind(String packageName, int pid, int uid); in onRewind() argument [all …]
|
/aosp12/system/extras/ioshark/ |
H A D | compile-only.sh | 61 pid=${stracefile##*.} 63 if ! [ -s foo.$pid ]; then 64 rm foo.$pid 72 if [ -f fstrace.$pid ]; then 73 fgrep mmap foo.$pid > bar 93 mv foo.$pid parsed_input_trace.$pid 96 mv foo.$pid parsed_input_trace.$pid 100 mv foo.$pid parsed_input_trace.$pid 103 compile_ioshark parsed_input_trace.$pid $pid.wl 104 rm parsed_input_trace.$pid [all …]
|
H A D | collect-straces-ftraces.sh | 63 pid=${stracefile##*.} 65 if ! [ -s foo.$pid ]; then 66 rm foo.$pid 74 if [ -f fstrace.$pid ]; then 75 fgrep mmap foo.$pid > bar 95 mv foo.$pid parsed_input_trace.$pid 98 mv foo.$pid parsed_input_trace.$pid 102 mv foo.$pid parsed_input_trace.$pid 105 compile_ioshark parsed_input_trace.$pid $pid.wl 106 rm parsed_input_trace.$pid [all …]
|
/aosp12/frameworks/av/services/oboeservice/ |
H A D | AAudioClientTracker.cpp | 77 if (mNotificationClients.count(pid) == 0) { in registerClient() 80 mNotificationClients[pid] = notificationClient; in registerClient() 91 void AAudioClientTracker::unregisterClient(pid_t pid) { in unregisterClient() argument 94 mNotificationClients.erase(pid); in unregisterClient() 99 auto it = mNotificationClients.find(pid); in getStreamCount() 109 ALOGV("registerClientStream(%d,)\n", pid); in registerClientStream() 116 AAudioClientTracker::unregisterClientStream(pid_t pid, in unregisterClientStream() argument 118 ALOGV("unregisterClientStream(%d,)\n", pid); in unregisterClientStream() 120 auto it = mNotificationClients.find(pid); in unregisterClientStream() 131 ALOGD("%s(%d, %d)\n", __func__, pid, enabled); in setExclusiveEnabled() [all …]
|
/aosp12/system/unwinding/libunwindstack/benchmarks/ |
H A D | remote_unwind_benchmarks.cpp | 87 pid_t pid; in StartRemoteRun() local 88 if ((pid = fork()) == 0) { in StartRemoteRun() 92 if (pid == -1) { in StartRemoteRun() 96 if (!WaitForRemote(pid, &ready)) { in StartRemoteRun() 97 kill(pid, SIGKILL); in StartRemoteRun() 98 waitpid(pid, nullptr, 0); in StartRemoteRun() 102 return pid; in StartRemoteRun() 106 pid_t pid = StartRemoteRun(); in RemoteUnwind() local 107 if (pid == -1) { in RemoteUnwind() 118 unwindstack::RemoteMaps maps(pid); in RemoteUnwind() [all …]
|
/aosp12/system/memory/libmeminfo/libdmabufinfo/tools/ |
H A D | dmabuf_dump.cpp | 76 for (auto pid : pid_set) { in PrintDmaBufTable() local 77 printf("%16s:%-5d |", GetProcessComm(pid).c_str(), pid); in PrintDmaBufTable() 92 for (pid_t pid : pid_set) { in PrintDmaBufTable() local 122 for (auto pid : pid_set) { in PrintDmaBufTable() local 141 for (auto pid : buf.pids()) { in PrintDmaBufPerProcess() local 160 printf("%16s:%-5d\n", GetProcessComm(pid).c_str(), pid); in PrintDmaBufPerProcess() 201 if (pid == 0) { in ReadDmaBufs() 274 pid_t pid = -1; in main() local 284 pid = atoi(argv[optind]); in main() 285 if (pid == 0) { in main() [all …]
|
/aosp12/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
H A D | PermissionUtils.java | 101 return (context.checkPermission(BACKUP, pid, uid) == PERMISSION_GRANTED) in checkPermissionDelegator() 154 return checkAppOpAllowingLegacy(context, OPSTR_READ_MEDIA_AUDIO, pid, in checkPermissionReadAudio() 162 context, WRITE_EXTERNAL_STORAGE, pid, uid, packageName)) { in checkPermissionWriteAudio() 165 return checkAppOpAllowingLegacy(context, OPSTR_WRITE_MEDIA_AUDIO, pid, in checkPermissionWriteAudio() 175 return checkAppOpAllowingLegacy(context, OPSTR_READ_MEDIA_VIDEO, pid, in checkPermissionReadVideo() 183 context, WRITE_EXTERNAL_STORAGE, pid, uid, packageName)) { in checkPermissionWriteVideo() 186 return checkAppOpAllowingLegacy(context, OPSTR_WRITE_MEDIA_VIDEO, pid, in checkPermissionWriteVideo() 196 return checkAppOpAllowingLegacy(context, OPSTR_READ_MEDIA_IMAGES, pid, in checkPermissionReadImages() 204 context, WRITE_EXTERNAL_STORAGE, pid, uid, packageName)) { in checkPermissionWriteImages() 214 return checkPermissionForDataDelivery(context, INSTALL_PACKAGES, pid, in checkPermissionInstallPackages() [all …]
|
/aosp12/packages/services/Car/tests/obd2_test/src/com/android/car/obd2/test/ |
H A D | Obd2CommandTest.java | 50 String[] commandToSend = new String[] {String.format("01%02X\r", pid)}; in checkLiveFrameIntCommand() 65 Obd2Command.getLiveFrameCommand(Obd2Command.getIntegerCommand(pid)); in checkLiveFrameIntCommand() 78 String[] commandToSend = new String[] {String.format("01%02X\r", pid)}; in checkLiveFrameFloatCommand() 93 Obd2Command.getLiveFrameCommand(Obd2Command.getFloatCommand(pid)); in checkLiveFrameFloatCommand() 106 String[] commandToSend = new String[] {String.format("02%02X 01\r", pid)}; in checkFreezeFrameIntCommand() 161 void checkCommand(int pid, String responseBytes, int expectedResponse) { in checkCommand() argument 162 checkLiveFrameIntCommand(pid, responseBytes, expectedResponse); in checkCommand() 163 checkFreezeFrameIntCommand(pid, responseBytes, expectedResponse); in checkCommand() 166 void checkCommand(int pid, String responseBytes, float expectedResponse) { in checkCommand() argument 167 checkLiveFrameFloatCommand(pid, responseBytes, expectedResponse); in checkCommand() [all …]
|
/aosp12/art/tools/runtime_memusage/ |
H A D | sanitizer_logcat_analysis.sh | 190 pid_dir=$OUT_DIR/$pid 193 DO_REDO[$pid]=true 203 DO_REDO[$pid]=true 209 DO_REDO[$pid]=true 218 DO_REDO[$pid]=true 230 DO_REDO[$pid]=true 248 DO_REDO[$pid]=true 261 DO_REDO[$pid]=true 281 DO_REDO[$pid]=true 326 DO_REDO[$pid]=true [all …]
|
/aosp12/system/unwinding/libunwindstack/tools/ |
H A D | unwind.cpp | 37 static bool Attach(pid_t pid) { in Attach() argument 38 if (ptrace(PTRACE_SEIZE, pid, 0, 0) == -1) { in Attach() 42 if (ptrace(PTRACE_INTERRUPT, pid, 0, 0) == -1) { in Attach() 43 ptrace(PTRACE_DETACH, pid, 0, 0); in Attach() 55 printf("%d: Failed to stop.\n", pid); in Attach() 59 void DoUnwind(pid_t pid) { in DoUnwind() argument 92 unwindstack::UnwinderFromPid unwinder(1024, pid); in DoUnwind() 108 pid_t pid = atoi(argv[1]); in main() local 109 if (!Attach(pid)) { in main() 114 DoUnwind(pid); in main() [all …]
|
/aosp12/system/core/init/ |
H A D | lmkd_service.cpp | 37 static LmkdRegistrationResult RegisterProcess(uid_t uid, pid_t pid, int oom_score_adjust) { in RegisterProcess() argument 48 params.pid = pid; in RegisterProcess() 62 static bool UnregisterProcess(pid_t pid) { in UnregisterProcess() argument 70 params.pid = pid; in UnregisterProcess() 86 if (svc->pid() == exclude_pid || svc->pid() == 0) { in RegisterServices() 89 if (RegisterProcess(svc->uid(), svc->pid(), svc->oom_score_adjust()) != in RegisterServices() 102 result = RegisterProcess(uid, pid, oom_score_adjust); in LmkdRegister() 105 result = RegisterProcess(uid, pid, oom_score_adjust); in LmkdRegister() 112 RegisterServices(pid); in LmkdRegister() 124 void LmkdUnregister(const std::string& name, pid_t pid) { in LmkdUnregister() argument [all …]
|
H A D | sigchld_handler.cpp | 54 auto pid = siginfo.si_pid; in ReapOneProcess() local 55 if (pid == 0) return 0; in ReapOneProcess() 61 auto reaper = make_scope_guard([pid] { TEMP_FAILURE_RETRY(waitpid(pid, nullptr, WNOHANG)); }); in ReapOneProcess() 67 if (SubcontextChildReap(pid)) { in ReapOneProcess() 70 service = ServiceList::GetInstance().FindService(pid, &Service::pid); in ReapOneProcess() 88 name = StringPrintf("Untracked pid %d", pid); in ReapOneProcess() 98 if (!service) return pid; in ReapOneProcess() 106 return pid; in ReapOneProcess() 118 pid_t pid; in WaitToBeReaped() local 119 while ((pid = ReapOneProcess()) != 0) { in WaitToBeReaped() [all …]
|
/aosp12/frameworks/av/services/mediaresourcemanager/ |
H A D | ResourceManagerService.cpp | 106 int pid) : DeathNotifier(service, pid, 0) {} in OverrideProcessInfoDeathNotifier() argument 152 int pid, in getResourceInfosForEdit() argument 415 int32_t pid, in addResource() argument 430 pid = callingPid; in addResource() 488 pid = callingPid; in removeResource() 556 pid = callingPid; in removeResource() 767 int pid, in overrideProcessInfo() argument 907 int newPid = pid; in getPriority_l() 979 int pid = -1; in getLowestPriorityPid_l() local 1003 if (pid != -1) { in getLowestPriorityPid_l() [all …]
|
/aosp12/bionic/libc/malloc_debug/tests/ |
H A D | malloc_debug_system_tests.cpp | 98 ASSERT_NE(-1, *pid); in Exec() 121 kill(*pid, SIGINT); in Exec() 141 kill(*pid, SIGKILL); in Exec() 181 ASSERT_EQ(msg.entry.pid, pid); in GetLogStr() 231 pid_t pid; in TEST() local 433 pid_t pid; in VerifyLeak() local 483 pid_t pid; in TEST() local 534 pid_t pid; in TEST() local 575 pid_t pid; in TEST() local 584 pid_t pid; in TEST() local [all …]
|
/aosp12/frameworks/av/media/utils/ |
H A D | ProcessInfo.cpp | 35 bool ProcessInfo::getPriority(int pid, int* priority) { in getPriority() argument 47 ALOGV("pid %d state %d score %d", pid, state, score); in getPriority() 52 auto it = mOverrideMap.find(pid); in getPriority() 57 ALOGE("pid %d invalid OOM score %d", pid, score); in getPriority() 67 bool ProcessInfo::isValidPid(int pid) { in isValidPid() argument 71 return (callingPid == getpid()) || (callingPid == pid) || (callingUid == AID_MEDIA); in isValidPid() 74 bool ProcessInfo::overrideProcessInfo(int pid, int procState, int oomScore) { in overrideProcessInfo() argument 77 mOverrideMap.erase(pid); in overrideProcessInfo() 84 mOverrideMap.emplace(pid, ProcessInfoOverride{procState, oomScore}); in overrideProcessInfo() 88 void ProcessInfo::removeProcessInfoOverride(int pid) { in removeProcessInfoOverride() argument [all …]
|
/aosp12/frameworks/native/cmds/rss_hwm_reset/ |
H A 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()
|
/aosp12/system/memory/libmeminfo/libdmabufinfo/ |
H A D | dmabufinfo_test.cpp | 69 pid_t pid() const { return child_pid; } in pid() function in fd_sharer 352 int pid = 10; member in DmaBufProcessStatsTest 574 pid_t pid = getpid(); in TEST_F() local 590 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F() 598 pid_t pid = getpid(); in TEST_F() local 630 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F() 640 pid_t pid = getpid(); in TEST_F() local 673 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F() 683 pid_t pid = getpid(); in TEST_F() local 704 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F() [all …]
|
/aosp12/packages/services/Car/service/src/com/android/car/cluster/ |
H A D | ClusterNavigationService.java | 132 changeNavContextOwner(appType, uid, pid, true); in onFocusAcquired() 137 changeNavContextOwner(appType, uid, pid, false); in onFocusAbandoned() 142 int pid = Binder.getCallingPid(); in assertNavigationFocus() local 144 if (uid == mNavContextOwner.uid && pid == mNavContextOwner.pid) { in assertNavigationFocus() 150 if (afs != null && afs.isFocusOwner(uid, pid, in assertNavigationFocus() 185 final int pid; field in ClusterNavigationService.ContextOwner 187 ContextOwner(int uid, int pid) { in ContextOwner() argument 189 this.pid = pid; in ContextOwner() 194 return "uid: " + uid + ", pid: " + pid; in toString() 202 return uid == that.uid && pid == that.pid; in equals() [all …]
|
/aosp12/frameworks/base/cmds/incidentd/tests/ |
H A D | FdBuffer_test.cpp | 128 if (pid == 0) { in TEST_F() 154 if (pid == 0) { in TEST_F() 172 wait(&pid); in TEST_F() 184 if (pid == 0) { in TEST_F() 205 wait(&pid); in TEST_F() 215 if (pid == 0) { in TEST_F() 231 wait(&pid); in TEST_F() 243 if (pid == 0) { in TEST_F() 260 wait(&pid); in TEST_F() 277 if (pid == 0) { in TEST_F() [all …]
|
/aosp12/system/memory/lmkd/ |
H A D | statslog.cpp | 46 int pid; member 55 static struct proc* pid_lookup(int pid) { in pid_lookup() argument 60 for (procp = pidhash[pid_hashfn(pid)]; procp && procp->pid != pid; procp = procp->pidhash_next) in pid_lookup() 170 int hval = pid_hashfn(procp->pid); in proc_insert() 175 void stats_remove_taskname(int pid) { in stats_remove_taskname() argument 180 int hval = pid_hashfn(pid); in stats_remove_taskname() 184 for (procp = pidhash[hval], prevp = NULL; procp && procp->pid != pid; in stats_remove_taskname() 204 struct proc* procp = pid_lookup(pid); in stats_store_taskname() 209 stats_remove_taskname(pid); in stats_store_taskname() 212 procp->pid = pid; in stats_store_taskname() [all …]
|
/aosp12/frameworks/base/services/core/jni/ |
H A D | com_android_server_am_CachedAppOptimizer.cpp | 68 std::string reclaim_path = StringPrintf("/proc/%d/reclaim", pid); in compactProcessProcfs() 84 unique_fd pidfd(pidfd_open(pid, 0)); in compactMemory() 142 static int64_t compactProcess(int pid, VmaToAdviseFunc vmaToAdviseFunc) { in compactProcess() argument 143 ProcMemInfo meminfo(pid); in compactProcess() 164 int64_t coldBytes = compactMemory(coldVmas, pid, MADV_COLD); in compactProcess() 175 static void compactProcessOrFallback(int pid, int compactionFlags) { in compactProcessOrFallback() argument 202 compactProcessProcfs(pid, compactionType); in compactProcessOrFallback() 239 int pid = atoi(current->d_name); in com_android_server_am_CachedAppOptimizer_compactSystem() local 253 compactProcessOrFallback(pid, compactionFlags); in com_android_server_am_CachedAppOptimizer_compactProcess() 257 JNIEnv *env, jobject clazz, jint pid, jboolean freeze) { in com_android_server_am_CachedAppOptimizer_freezeBinder() argument [all …]
|