/art/tools/runtime_memusage/ |
D | sanitizer_logcat_analysis.sh | 185 for pid in "${unique_pids[@]}" 188 echo "Current pid: $pid" 190 pid_dir=$OUT_DIR/$pid 193 DO_REDO[$pid]=true 201 [[ "${DO_REDO[$pid]}" = true ]] || \ 203 DO_REDO[$pid]=true 204 awk "{if(\$3 == $pid) print \$0}" "$LOGCAT_FILE" > "$logcat_pid_file" 209 DO_REDO[$pid]=true 216 [[ "${DO_REDO[$pid]}" = true ]] || \ 218 DO_REDO[$pid]=true [all …]
|
/art/runtime/ |
D | exec_utils.cc | 78 pid_t pid = fork(); in ExecWithoutWait() local 79 if (pid == 0) { in ExecWithoutWait() 97 } else if (pid == -1) { in ExecWithoutWait() 103 return pid; in ExecWithoutWait() 107 ExecResult WaitChild(pid_t pid, in WaitChild() argument 114 if (TEMP_FAILURE_RETRY(waitid(P_PID, pid, &info, options)) != 0) { in WaitChild() 117 pid, in WaitChild() 121 if (info.si_pid != pid) { in WaitChild() 124 pid, in WaitChild() 141 ExecResult WaitChildWithTimeoutFallback(pid_t pid, in WaitChildWithTimeoutFallback() argument [all …]
|
D | exec_utils.h | 43 std::function<void(pid_t pid)> on_start = [](pid_t) {}; 46 std::function<void(pid_t pid)> on_end = [](pid_t) {}; 111 virtual android::base::unique_fd PidfdOpen(pid_t pid) const; 114 virtual std::string GetProcStat(pid_t pid) const; 121 bool GetStat(pid_t pid, /*out*/ ProcessStat* stat, /*out*/ std::string* error_msg) const;
|
D | exec_utils_test.cc | 75 MOCK_METHOD(std::string, GetProcStat, (pid_t pid), (const, override)); 98 android::base::unique_fd PidfdOpen(pid_t pid) const override { in PidfdOpen() 99 android::base::unique_fd pidfd = ExecUtils::PidfdOpen(pid); in PidfdOpen() 350 auto on_end = [](pid_t pid) { in TEST_P() argument 351 pid_t pgid = getpgid(pid); in TEST_P() 353 ASSERT_EQ(pgid, pid); in TEST_P() 371 auto on_end = [](pid_t pid) { in TEST_P() argument 372 pid_t pgid = getpgid(pid); in TEST_P()
|
D | native_stack_dump.cc | 97 Addr2linePipe(int in_fd, int out_fd, const std::string& file_name, pid_t pid) in Addr2linePipe() 98 : in(in_fd, false), out(out_fd, false), file(file_name), child_pid(pid), odd(true) {} in Addr2linePipe() 126 pid_t pid = fork(); in Connect() local 127 if (pid == -1) { in Connect() 135 if (pid == 0) { in Connect() 152 pid); in Connect()
|
/art/test/137-cfi/ |
D | cfi.cc | 85 pid_t pid = fork(); in Java_Main_startSecondaryProcess() local 86 if (pid < 0) { in Java_Main_startSecondaryProcess() 88 } else if (pid == 0) { in Java_Main_startSecondaryProcess() 92 return pid; in Java_Main_startSecondaryProcess() 160 static void MoreErrorInfo(pid_t pid, bool sig_quit_on_fail) { in MoreErrorInfo() argument 161 PrintFileToLog(android::base::StringPrintf("/proc/%d/maps", pid), ::android::base::ERROR); in MoreErrorInfo() 164 int res = kill(pid, SIGQUIT); in MoreErrorInfo() 247 pid_t pid = static_cast<pid_t>(pid_int); in Java_Main_unwindOtherProcess() local 254 int signal = wait_for_sigstop(pid, &total_sleep_time_usec, &detach_failed); in Java_Main_unwindOtherProcess() 261 if (ptrace(PTRACE_SEIZE, pid, 0, 0)) { in Java_Main_unwindOtherProcess() [all …]
|
/art/tools/jvmti-agents/field-null-percent/ |
D | check-null-fields.py | 90 if len(out.pid) == 0: 97 ppe.submit(kill_it, p.pid).result() 98 out.pid = p.communicate()[0].strip().split() 100 print(out.pid) 105 for p in out.pid: 117 def check_single_process(pid, device, bit32, bit64): argument 120 device.shell(['am', 'attach-agent', str(pid), bit32]) 121 device.shell(['am', 'attach-agent', str(pid), bit64]) 123 device.shell('kill -3 {}'.format(pid).split()) 127 lc_cmd = "logcat -d -b main --pid={} -e '^\\t.*\\t[0-9]*\\t[0-9]*$'".format(pid).split(' ') [all …]
|
/art/libarttools/ |
D | testing.h | 65 pid_t pid = fork(); in ScopedExec() local 66 if (pid == 0) { in ScopedExec() 69 } else if (pid > 0) { in ScopedExec() 72 CHECK_EQ(TEMP_FAILURE_RETRY(waitid(P_PID, pid, &info, WEXITED | WNOWAIT)), 0); in ScopedExec() 79 CHECK_EQ(kill(pid, SIGKILL), 0); in ScopedExec() 81 CHECK_EQ(TEMP_FAILURE_RETRY(waitid(P_PID, pid, &info, WEXITED)), 0); in ScopedExec() 83 return std::make_pair(pid, make_scope_guard(std::move(cleanup))); in ScopedExec()
|
D | tools.cc | 225 for (pid_t pid : AllPids()) { in EnsureNoProcessInDir() local 227 if (!Readlink(ART_FORMAT("/proc/{}/exe", pid), &exe)) { in EnsureNoProcessInDir() 234 unique_fd pidfd = PidfdOpen(pid, /*flags=*/0); in EnsureNoProcessInDir() 240 return ErrnoErrorf("Failed to pidfd_open {}", pid); in EnsureNoProcessInDir() 244 if (!ReadFileToString(ART_FORMAT("/proc/{}/comm", pid), &name)) { in EnsureNoProcessInDir() 245 PLOG(WARNING) << "Failed to get process name for pid " << pid; in EnsureNoProcessInDir() 252 "Process '{}' (pid: {}) is still running. Waiting for it to exit", name, pid); in EnsureNoProcessInDir() 258 running_processes[pidfd.get()] = std::make_pair(pid, std::move(name)); in EnsureNoProcessInDir() 281 const auto& [pid, name] = running_processes[pollfd.fd]; in EnsureNoProcessInDir() 283 "Process '{}' (pid: {}) exited in {}ms", name, pid, elapsed_time_ms); in EnsureNoProcessInDir() [all …]
|
D | art_exec_test.cc | 64 bool GetCap(pid_t pid, cap_flag_t flag, cap_value_t value) { in GetCap() argument 65 ScopedCap cap(cap_get_pid(pid)); in GetCap() 112 auto [pid, scope_guard] = ScopedExec(args, /*wait=*/true); in TEST_F() 120 auto [pid, scope_guard] = ScopedExec(args, /*wait=*/true); in TEST_F() 121 EXPECT_EQ(getpriority(PRIO_PROCESS, pid), ANDROID_PRIORITY_BACKGROUND); in TEST_F() 136 auto [pid, scope_guard] = ScopedExec(args, /*wait=*/true); in TEST_F() 137 ASSERT_TRUE(GetCap(pid, CAP_EFFECTIVE, CAP_FOWNER)); in TEST_F() 142 auto [pid, scope_guard] = ScopedExec(args, /*wait=*/true); in TEST_F() 143 EXPECT_FALSE(GetCap(pid, CAP_EFFECTIVE, CAP_FOWNER)); in TEST_F()
|
/art/tools/jvmti-agents/field-counts/ |
D | count-fields.py | 90 if len(out.pid) == 0: 97 ppe.submit(kill_it, p.pid).result() 98 out.pid = p.communicate()[0].strip().split() 100 print(out.pid) 105 for p in out.pid: 117 def check_single_process(pid, device, mkcmd, bit32, bit64): argument 120 name = device.shell('cat /proc/{}/cmdline'.format(pid).split())[0].strip('\0') 133 device.shell(['am', 'attach-agent', str(pid), mkcmd(target32)]) 134 device.shell(['am', 'attach-agent', str(pid), mkcmd(target64)]) 136 device.shell('kill -3 {}'.format(pid).split()) [all …]
|
/art/tools/ |
D | buildbot-teardown-device.sh | 50 local pid=$(basename "$dir") 52 $action "$pid" "$cmdline" 60 local pid=$1 62 echo "$cmdline (PID: $pid)" 141 local pid=$1 143 echo "Killing $cmdline (PID: $pid)" 144 adb shell kill -9 "$pid"
|
/art/runtime/jit/ |
D | jit_memory_region_test.cc | 158 pid_t pid = fork(); in TestUnmapWritableAfterFork() local 159 if (pid == 0) { in TestUnmapWritableAfterFork() 196 CHECK_EQ(waitpid(pid, &status, 0), pid); in TestUnmapWritableAfterFork() 256 pid_t pid = fork(); in TestMadviseDontFork() local 257 if (pid == 0) { in TestMadviseDontFork() 285 CHECK_EQ(waitpid(pid, &status, 0), pid); in TestMadviseDontFork() 343 pid_t pid = fork(); in TestFromSharedToPrivate() local 344 if (pid == 0) { in TestFromSharedToPrivate() 351 CHECK_EQ(waitpid(pid, &status, 0), pid); in TestFromSharedToPrivate() 360 pid = fork(); in TestFromSharedToPrivate() [all …]
|
/art/libartbase/base/ |
D | pidfd.h | 31 [[maybe_unused]] static android::base::unique_fd PidfdOpen(pid_t pid, uint32_t flags) { in PidfdOpen() argument 33 return android::base::unique_fd(pidfd_open(pid, flags)); in PidfdOpen() 39 return android::base::unique_fd(syscall(SYS_pidfd_open, pid, flags)); in PidfdOpen()
|
D | common_art_test.cc | 631 pid_t pid = fork(); in ForkAndExec() local 632 if (pid == -1) { in ForkAndExec() 636 if (pid == 0) { in ForkAndExec() 667 if (waitpid(pid, &result.status_code, 0) == -1) { in ForkAndExec() 685 for (pid_t pid : android::base::AllPids{}) { in GetPidByName() local 687 if (!android::base::ReadFileToString(StringPrintf("/proc/%d/cmdline", pid), &cmdline)) { in GetPidByName() 696 results.push_back(pid); in GetPidByName()
|
/art/tools/signal_dumper/ |
D | signal_dumper.cc | 133 Addr2linePipe(int in_fd, int out_fd, const std::string& file_name, pid_t pid) in Addr2linePipe() 134 : in(in_fd), out(out_fd), file(file_name), child_pid(pid), odd(true) {} in Addr2linePipe() 162 pid_t pid = fork(); in Connect() local 163 if (pid == -1) { in Connect() 171 if (pid == 0) { in Connect() 188 pid); in Connect() 331 std::set<pid_t> PtraceSiblings(pid_t pid) { in PtraceSiblings() argument 333 std::string task_path = android::base::StringPrintf("/proc/%d/task", pid); in PtraceSiblings() 356 if (tid == pid) { in PtraceSiblings() 473 bool WaitForSigStopped(pid_t pid, uint32_t max_wait_micros) { in WaitForSigStopped() argument [all …]
|
/art/imgdiag/ |
D | run_imgdiag.py | 111 pid, ppid, cmd, name, *etc_args = line.split(' ') 112 entry = ProcEntry(int(pid), int(ppid), cmd, name, etc_args) 116 zygote_children = [e for e in proc_entries if e.ppid == zygote_entry.pid] 121 print('\n'.join(str(e.pid) + ' ' + e.name for e in zygote_children)) 131 target_pid=entry.pid,
|
D | page_info.cc | 65 bool OpenProcFiles(pid_t pid, /*out*/ ProcFiles& files, /*out*/ std::string& error_msg) { in OpenProcFiles() argument 73 StringPrintf("/proc/%ld/mem", static_cast<long>(pid)); // NOLINT [runtime/int] in OpenProcFiles() 78 StringPrintf("/proc/%ld/pagemap", static_cast<long>(pid)); // NOLINT [runtime/int] in OpenProcFiles() 206 void CountZeroPages(pid_t pid, ProcFiles& proc_files, std::ostream& os, size_t page_size) { in CountZeroPages() argument 208 if (!android::procinfo::ReadProcessMaps(pid, &proc_maps)) { in CountZeroPages() 209 os << "Could not read process maps for " << pid; in CountZeroPages() 307 pid_t pid, in PageInfo() argument 313 if (!OpenProcFiles(pid, proc_files, error_msg)) { in PageInfo() 321 CountZeroPages(pid, proc_files, os, page_size); in PageInfo()
|
/art/tools/hiddenapi/ |
D | find_api_violations.pl | 108 my ($pid, $tid, $class, $tag, $msg) = ($1, $2, $3, $4, $5); 121 my $package = $procmap->{$pid} || "unknown($pid)";
|
/art/test/676-resolve-field-type/src-ex/ |
D | ChildClass.java | 42 private final static int pid; field in ChildClass.SigQuit 63 pid = pidTemp; 69 kill.invoke(null, pid, sigquit); in doKill()
|
/art/test/144-static-field-sigquit/src/ |
D | SigQuit.java | 22 private final static int pid; field in SigQuit 45 pid = pidTemp; 52 kill.invoke(null, pid, sigquit); in perform()
|
/art/test/678-quickening/src-art/ |
D | Main.java | 49 private final static int pid; field in Main.SigQuit 70 pid = pidTemp; 76 kill.invoke(null, pid, sigquit); in doKill()
|
/art/test/137-cfi/src/ |
D | Main.java | 79 int pid = startSecondaryProcess(); in unwind() local 81 System.out.println(unwindOtherProcess(pid) ? "PASS" : "FAIL"); in unwind() 88 public static native boolean unwindOtherProcess(int pid); in unwindOtherProcess() argument
|
/art/test/testrunner/ |
D | testrunner.py | 179 self.procs[proc.pid] = proc 181 os.killpg(proc.pid, signal.SIGKILL) # kill_all has already been called. 189 del self.procs[proc.pid] 194 for pid in self.procs: 195 os.killpg(pid, signal.SIGKILL) 690 for pid in pidof.stdout.decode("ascii").split(): 692 print_text("Backtrace of %s at %s\n" % (pid, time.monotonic())) 693 subprocess.run(["adb", "shell", "debuggerd", pid]) 695 task_dir = "/proc/%s/task" % pid 705 os.killpg(proc.pid, signal.SIGKILL)
|
/art/test/dexpreopt/ |
D | dexpreopt_test.cc | 168 android::base::Result<std::vector<std::string>> GetMappedFiles(pid_t pid, in GetMappedFiles() argument 172 if (!android::procinfo::ReadProcessMaps(pid, &maps)) { in GetMappedFiles() 173 return ErrnoErrorf("Failed to get mapped memory regions of pid {}", pid); in GetMappedFiles()
|