/system/connectivity/shill/ |
D | process_manager.cc | 113 pid_t pid = process->pid(); in StartProcess() local 116 pid, in StartProcess() 119 pid))); in StartProcess() 125 watched_processes_.emplace(pid, exit_callback); in StartProcess() 126 return pid; in StartProcess() 162 pid_t pid; in StartProcessInMinijailWithPipes() local 164 jail, args, &pid, stdin_fd, stdout_fd, stderr_fd)) { in StartProcessInMinijailWithPipes() 171 pid, in StartProcessInMinijailWithPipes() 174 pid))); in StartProcessInMinijailWithPipes() 176 watched_processes_.emplace(pid, exit_callback); in StartProcessInMinijailWithPipes() [all …]
|
D | process_manager.h | 112 virtual bool StopProcess(pid_t pid); 115 virtual bool StopProcessAndBlock(pid_t pid); 119 pid_t pid, 132 void OnProcessExited(pid_t pid, const siginfo_t& info); 138 void ProcessTerminationTimeoutHandler(pid_t pid, bool kill_signal); 144 bool TerminateProcess(pid_t pid, bool kill_signal); 152 bool KillProcessWithTimeout(pid_t pid, bool kill_signal); 159 bool KillProcess(pid_t pid, int signal, bool* killed); 164 bool WaitpidWithTimeout(pid_t pid,
|
/system/vold/ |
D | Process.cpp | 66 void Process::getProcessName(int pid, char *buffer, size_t max) { in getProcessName() argument 68 snprintf(buffer, max, "/proc/%d/cmdline", pid); in getProcessName() 79 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint) { in checkFileDescriptorSymLinks() argument 80 return checkFileDescriptorSymLinks(pid, mountPoint, NULL, 0); in checkFileDescriptorSymLinks() 83 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_… in checkFileDescriptorSymLinks() argument 88 sprintf(path, "/proc/%d/fd", pid); in checkFileDescriptorSymLinks() 124 int Process::checkFileMaps(int pid, const char *mountPoint) { in checkFileMaps() argument 125 return checkFileMaps(pid, mountPoint, NULL, 0); in checkFileMaps() 128 int Process::checkFileMaps(int pid, const char *mountPoint, char *openFilename, size_t max) { in checkFileMaps() argument 132 sprintf(buffer, "/proc/%d/maps", pid); in checkFileMaps() [all …]
|
D | Process.h | 26 static int checkSymLink(int pid, const char *path, const char *name); 27 static int checkFileMaps(int pid, const char *path); 28 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max); 29 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint); 30 …static int checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t… 31 static void getProcessName(int pid, char *buffer, size_t max);
|
/system/netd/server/ |
D | ClatdController.cpp | 52 pid_t pid = getClatdPid(interface); in startClatd() local 54 if (pid != 0) { in startClatd() 55 ALOGE("clatd pid=%d already started on %s", pid, interface); in startClatd() 85 if ((pid = fork()) < 0) { in startClatd() 90 if (!pid) { in startClatd() 109 mClatdPids[interface] = pid; in startClatd() 117 pid_t pid = getClatdPid(interface); in stopClatd() local 119 if (pid == 0) { in stopClatd() 124 ALOGD("Stopping clatd pid=%d on %s", pid, interface); in stopClatd() 126 kill(pid, SIGTERM); in stopClatd() [all …]
|
/system/connectivity/shill/dhcp/ |
D | dhcp_provider.cc | 93 base::Process process = base::Process::Open(entry->pid()); in Init() 130 DHCPConfigRefPtr DHCPProvider::GetConfig(int pid) { in GetConfig() argument 131 SLOG(this, 2) << __func__ << " pid: " << pid; in GetConfig() 132 PIDConfigMap::const_iterator it = configs_.find(pid); in GetConfig() 139 void DHCPProvider::BindPID(int pid, const DHCPConfigRefPtr& config) { in BindPID() argument 140 SLOG(this, 2) << __func__ << " pid: " << pid; in BindPID() 141 configs_[pid] = config; in BindPID() 144 void DHCPProvider::UnbindPID(int pid) { in UnbindPID() argument 145 SLOG(this, 2) << __func__ << " pid: " << pid; in UnbindPID() 146 configs_.erase(pid); in UnbindPID() [all …]
|
/system/connectivity/shill/dbus/ |
D | chromeos_dhcpcd_listener.cc | 117 uint32_t pid; in HandleMessage() local 123 &pid, in HandleMessage() 129 sender, pid, reason, configurations)); in HandleMessage() 132 uint32_t pid; in HandleMessage() local 137 &pid, in HandleMessage() 142 sender, pid, status)); in HandleMessage() 153 uint32_t pid, in EventSignal() argument 156 DHCPConfigRefPtr config = provider_->GetConfig(pid); in EventSignal() 158 if (provider_->IsRecentlyUnbound(pid)) { in EventSignal() 160 << __func__ << ": ignoring message from recently unbound PID " << pid; in EventSignal() [all …]
|
/system/core/toolbox/ |
D | ps.c | 42 static void print_exe_abi(int pid); 44 static int ps_line(int pid, int tid) in ps_line() argument 60 sprintf(statline, "/proc/%d", tid ? tid : pid); in ps_line() 64 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); in ps_line() 66 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid); in ps_line() 68 sprintf(statline, "/proc/%d/stat", pid); in ps_line() 69 sprintf(cmdline, "/proc/%d/cmdline", pid); in ps_line() 70 snprintf(macline, sizeof(macline), "/proc/%d/attr/current", pid); in ps_line() 146 ppid = pid; in ps_line() 147 pid = tid; in ps_line() [all …]
|
D | top.c | 56 pid_t pid; member 98 static void read_policy(int pid, struct proc_info *proc); 103 static struct proc_info *find_old_proc(pid_t pid, pid_t tid); 231 pid_t pid, tid; in read_procs() local 252 pid = atoi(pid_dir->d_name); in read_procs() 259 proc->pid = proc->tid = pid; in read_procs() 261 sprintf(filename, "/proc/%d/stat", pid); in read_procs() 264 sprintf(filename, "/proc/%d/cmdline", pid); in read_procs() 267 sprintf(filename, "/proc/%d/status", pid); in read_procs() 270 read_policy(pid, proc); in read_procs() [all …]
|
/system/core/logd/ |
D | LogStatistics.h | 50 std::unique_ptr<const TEntry *[]> sort(uid_t uid, pid_t pid, in sort() argument 66 if (pid && entry.getPid() && (pid != entry.getPid())) { in sort() 130 pid_t pid, 135 std::unique_ptr<const TEntry *[]> sorted = sort(uid, pid, 227 pid_t pid; member 232 pid(element->getPid()) { in UidEntry() 237 inline const pid_t&getPid() const { return pid; } in getPid() 240 if (pid != element->getPid()) { in add() 241 pid = -1; in add() 251 uid_t pidToUid(pid_t pid); [all …]
|
D | LogWhiteBlackList.cpp | 26 Prune::Prune(uid_t uid, pid_t pid) : mUid(uid), mPid(pid) { in Prune() argument 29 int Prune::cmp(uid_t uid, pid_t pid) const { in cmp() 34 return pid - mPid; in cmp() 165 pid_t pid = Prune::pid_all; in init() local 169 pid = 0; in init() 171 pid = pid * 10 + *str++ - '0'; in init() 176 if ((uid == Prune::uid_all) && (pid == Prune::pid_all)) { in init() 193 if ((pid == p.pid_all) && (p.mPid != p.pid_all)) { in init() 197 m = pid - p.mPid; in init() 201 list->insert(it, Prune(uid,pid)); in init() [all …]
|
/system/core/debuggerd/ |
D | backtrace.cpp | 42 static void dump_process_header(log_t* log, pid_t pid) { in dump_process_header() argument 48 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); in dump_process_header() 59 _LOG(log, logtype::BACKTRACE, "\n\n----- pid %d at %s -----\n", pid, timestr); in dump_process_header() 67 static void dump_process_footer(log_t* log, pid_t pid) { in dump_process_footer() argument 68 _LOG(log, logtype::BACKTRACE, "\n----- end %d -----\n", pid); in dump_process_footer() 71 static void dump_thread(log_t* log, BacktraceMap* map, pid_t pid, pid_t tid) { in dump_thread() argument 91 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map)); in dump_thread() 100 void dump_backtrace(int fd, BacktraceMap* map, pid_t pid, pid_t tid, in dump_backtrace() argument 106 dump_process_header(&log, pid); in dump_backtrace() 107 dump_thread(&log, map, pid, tid); in dump_backtrace() [all …]
|
D | debuggerd.cpp | 71 pid_t pid, tid; member 88 request.pid, request.tid); in wait_for_user_action() 100 ALOGI("debuggerd resuming process %d", request.pid); in wait_for_user_action() 150 snprintf(buf, len, "pid=%d uid=%d gid=%d", req->pid, req->uid, req->gid); in audit_callback() 204 ALOGE("timed out reading tid (from pid=%d uid=%d)\n", cr.pid, cr.uid); in read_request() 212 ALOGE("read failure? %s (pid=%d uid=%d)\n", strerror(errno), cr.pid, cr.uid); in read_request() 216 ALOGE("invalid crash request of size %d (from pid=%d uid=%d)\n", status, cr.pid, cr.uid); in read_request() 222 out_request->pid = cr.pid; in read_request() 232 snprintf(buf, sizeof buf, "/proc/%d/task/%d", out_request->pid, out_request->tid); in read_request() 235 out_request->tid, out_request->pid); in read_request() [all …]
|
/system/core/libbacktrace/ |
D | backtrace_test.cpp | 106 void WaitForStop(pid_t pid) { in WaitForStop() argument 110 while (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) < 0 && (errno == EINTR || errno == ESRCH)) { in WaitForStop() 299 void VerifyProcTest(pid_t pid, pid_t tid, bool share_map, in VerifyProcTest() argument 304 ptrace_tid = pid; in VerifyProcTest() 319 map.reset(BacktraceMap::Create(pid)); in VerifyProcTest() 321 std::unique_ptr<Backtrace> backtrace(Backtrace::Create(pid, tid, map.get())); in VerifyProcTest() 340 pid_t pid; in TEST() local 341 if ((pid = fork()) == 0) { in TEST() 345 VerifyProcTest(pid, BACKTRACE_CURRENT_THREAD, false, ReadyLevelBacktrace, VerifyLevelDump); in TEST() 347 kill(pid, SIGKILL); in TEST() [all …]
|
D | Backtrace.cpp | 40 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) in Backtrace() argument 41 : pid_(pid), tid_(tid), map_(map), map_shared_(true) { in Backtrace() 43 map_ = BacktraceMap::Create(pid); in Backtrace() 119 Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { in Create() argument 120 if (pid == BACKTRACE_CURRENT_PROCESS) { in Create() 121 pid = getpid(); in Create() 126 tid = pid; in Create() 129 if (pid == getpid()) { in Create() 130 return new UnwindCurrent(pid, tid, map); in Create() 132 return new UnwindPtrace(pid, tid, map); in Create()
|
D | UnwindMap.cpp | 35 UnwindMap::UnwindMap(pid_t pid) : BacktraceMap(pid) { in UnwindMap() argument 39 UnwindMapRemote::UnwindMapRemote(pid_t pid) : UnwindMap(pid) { in UnwindMapRemote() argument 141 BacktraceMap* BacktraceMap::Create(pid_t pid, bool uncached) { in Create() argument 146 map = new BacktraceMap(pid); in Create() 147 } else if (pid == getpid()) { in Create() 150 map = new UnwindMapRemote(pid); in Create()
|
/system/core/libprocessgroup/ |
D | processgroup.cpp | 95 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) in convertUidPidToPath() argument 102 pid); in convertUidPidToPath() 105 static int initCtx(uid_t uid, int pid, struct ctx *ctx) in initCtx() argument 109 convertUidPidToPath(path, sizeof(path), uid, pid); in initCtx() 174 long pid = strtol(ctx->buf_ptr, &pid_eptr, 10); in getOneAppProcess() local 185 return (pid_t)pid; in getOneAppProcess() 188 static int removeProcessGroup(uid_t uid, int pid) in removeProcessGroup() argument 193 convertUidPidToPath(path, sizeof(path), uid, pid); in removeProcessGroup() 260 pid_t pid; in killProcessGroupOnce() local 264 while ((pid = getOneAppProcess(uid, initialPid, &ctx)) >= 0) { in killProcessGroupOnce() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_format.c | 67 int pid; in format_f2fs() local 74 pid = fork(); in format_f2fs() 75 if (pid < 0) { in format_f2fs() 76 return pid; in format_f2fs() 78 if (!pid) { in format_f2fs() 84 pid_t p = waitpid(pid, &rc, 0); in format_f2fs() 85 if (p != pid) { in format_f2fs()
|
/system/core/liblog/tests/ |
D | libc_test.cpp | 37 pid_t pid = getpid(); in TEST() local 40 LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid))); in TEST() 57 ASSERT_EQ(log_msg.entry.pid, pid); in TEST() 97 pid_t pid = getpid(); in TEST() local 100 (log_id_t)LOG_ID_CRASH, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid))); in TEST() 118 ASSERT_EQ(log_msg.entry.pid, pid); in TEST()
|
/system/extras/perfprofd/quipper/ |
D | perf_parser.cc | 192 << " -> " << event.fork.pid << ":" << event.fork.tid; in ProcessEvents() 202 VLOG(1) << "COMM: " << event.comm.pid << ":" << event.comm.tid << ": " in ProcessEvents() 207 pidtid_to_comm_map_[std::make_pair(event.comm.pid, event.comm.tid)] = in ProcessEvents() 257 PidTid pidtid = std::make_pair(sample_info.pid, sample_info.tid); in MapSampleEvent() 267 sample_info.pid, in MapSampleEvent() 275 sample_info.pid, in MapSampleEvent() 283 !MapBranchStack(sample_info.pid, in MapSampleEvent() 301 const uint32_t pid, in MapCallchain() argument 332 pid, in MapCallchain() 345 bool PerfParser::MapBranchStack(const uint32_t pid, in MapBranchStack() argument [all …]
|
/system/core/lmkd/ |
D | lmkd.c | 102 int pid; member 146 static struct proc *pid_lookup(int pid) { in pid_lookup() argument 149 for (procp = pidhash[pid_hashfn(pid)]; procp && procp->pid != pid; in pid_lookup() 190 int hval = pid_hashfn(procp->pid); in proc_insert() 197 static int pid_remove(int pid) { in pid_remove() argument 198 int hval = pid_hashfn(pid); in pid_remove() 202 for (procp = pidhash[hval], prevp = NULL; procp && procp->pid != pid; in pid_remove() 239 static void cmd_procprio(int pid, int uid, int oomadj) { in cmd_procprio() argument 249 snprintf(path, sizeof(path), "/proc/%d/oom_score_adj", pid); in cmd_procprio() 256 procp = pid_lookup(pid); in cmd_procprio() [all …]
|
/system/extras/tests/kernel.config/ |
D | sysvipc_test.cpp | 33 pid_t pid = getpid(); in TEST() local 34 int ret = kcmp(pid, pid, KCMP_SYSVSEM, 0, 0); in TEST() 36 EXPECT_EQ(-1, kcmp(pid, pid, KCMP_SYSVSEM, 0, 0)); in TEST()
|
/system/extras/latencytop/ |
D | latencytop.c | 45 static struct latency_entry *read_process_stats(struct latency_entry *list, int erase, int pid); 46 static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int … 72 int pid, tid; in main() local 78 pid = tid = 0; in main() 106 pid = atoi(argv[++i]); in main() 122 if (tid && !pid) { in main() 146 if (pid) { in main() 148 e = read_thread_stats(e, erase, pid, tid, 1); in main() 150 e = read_process_stats(e, erase, pid); in main() 158 if (pid) { in main() [all …]
|
/system/core/crash_reporter/ |
D | user_collector.cc | 178 void UserCollector::EnqueueCollectionErrorLog(pid_t pid, in EnqueueCollectionErrorLog() argument 189 std::string dump_basename = FormatDumpBasename(exec, time(nullptr), pid); in EnqueueCollectionErrorLog() 214 bool UserCollector::CopyOffProcFiles(pid_t pid, in CopyOffProcFiles() argument 232 FilePath process_path = GetProcessPath(pid); in CopyOffProcFiles() 304 bool UserCollector::GetCreatedCrashDirectory(pid_t pid, uid_t supplied_ruid, in GetCreatedCrashDirectory() argument 307 FilePath process_path = GetProcessPath(pid); in GetCreatedCrashDirectory() 324 LOG(INFO) << "State of crashed process [" << pid << "]: " << process_state; in GetCreatedCrashDirectory() 335 << " for crashed process [" << pid in GetCreatedCrashDirectory() 402 pid_t pid, in ConvertCoreToMinidump() argument 410 CopyOffProcFiles(pid, container_dir) && ValidateProcFiles(container_dir); in ConvertCoreToMinidump() [all …]
|
/system/core/libmemtrack/ |
D | memtrack_test.c | 28 static int getprocname(pid_t pid, char *buf, int len) { in getprocname() argument 38 if (asprintf(&filename, "/proc/%d/cmdline", pid) < 0) { in getprocname() 111 pid_t pid = pids[i]; in main() local 120 getprocname(pid, cmdline, (int)sizeof(cmdline)); in main() 122 ret = memtrack_proc_get(p, pid); in main() 125 pid, strerror(-ret), ret); in main() 137 printf("%5d %6zu %6zu %6zu %6zu %6zu %6zu %s\n", pid, in main()
|