/system/vold/ |
H A 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 max); 31 static void getProcessName(int pid, char *buffer, size_t max);
|
H A D | Process.cpp | 66 void Process::getProcessName(int pid, char *buffer, size_t max) { argument 68 snprintf(buffer, max, "/proc/%d/cmdline", pid); 79 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint) { argument 80 return checkFileDescriptorSymLinks(pid, mountPoint, NULL, 0); 83 int Process::checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max) { argument 88 sprintf(path, "/proc/%d/fd", pid); 124 int Process::checkFileMaps(int pid, const char *mountPoint) { argument 125 return checkFileMaps(pid, mountPoint, NULL, 0); 128 int Process::checkFileMaps(int pid, const char *mountPoint, char *openFilename, size_t max) { argument 132 sprintf(buffer, "/proc/%d/maps", pid); 154 checkSymLink(int pid, const char *mountPoint, const char *name) argument 191 int pid = getPid(de->d_name); local [all...] |
/system/core/include/cutils/ |
H A D | iosched_policy.h | 31 extern int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio); 32 extern int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio);
|
/system/netd/server/ |
H A D | ClatdController.cpp | 52 pid_t pid = getClatdPid(interface); local 54 if (pid != 0) { 55 ALOGE("clatd pid=%d already started on %s", pid, interface); 85 if ((pid = fork()) < 0) { 90 if (!pid) { 109 mClatdPids[interface] = pid; 117 pid_t pid = getClatdPid(interface); local 119 if (pid == 0) { 124 ALOGD("Stopping clatd pid 137 pid_t pid = getClatdPid(interface); local [all...] |
/system/core/toolbox/ |
H A D | renice.c | 44 fprintf(stderr, "USAGE: %s [[-r] [-t TYPE] priority pids ...] [-g pid]\n", s); 48 void print_prio(pid_t pid) argument 53 printf("pid %d's priority: %d\n", pid, getpriority(PRIO_PROCESS, pid)); 56 sched = sched_getscheduler(pid); 74 sched_getparam(pid, &sp); 134 pid_t pid; local 136 pid = atoi(argv[0]); 144 ret = sched_setscheduler(pid, sche [all...] |
H A D | prlimit.c | 41 fprintf(stderr, "usage: %s pid resource cur max\n", s); 47 pid_t pid; local 55 if (sscanf(argv[1], "%d", &pid) != 1) 67 printf("setting resource %d of pid %d to [%llu,%llu]\n", resource, pid, 69 rc = prlimit64(pid, resource, &rl, NULL);
|
H A D | ionice.c | 15 int pid; local 18 fprintf(stderr, "usage: ionice <pid> [none|rt|be|idle] [prio]\n"); 22 if (!(pid = atoi(argv[1]))) { 23 fprintf(stderr, "Invalid pid specified\n"); 28 if (android_get_ioprio(pid, &clazz, &ioprio)) { 32 fprintf(stdout, "Pid %d, class %s (%d), prio %d\n", pid, classes[clazz], clazz, ioprio); 51 printf("Setting pid %d i/o class to %d, prio %d\n", pid, clazz, ioprio); 52 if (android_set_ioprio(pid, clazz, ioprio)) {
|
H A D | ps.c | 42 static void print_exe_abi(int pid); 44 static int ps_line(int pid, int tid, char *namefilter) argument 60 sprintf(statline, "/proc/%d", pid); 64 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); 66 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid); 68 sprintf(statline, "/proc/%d/stat", pid); 69 sprintf(cmdline, "/proc/%d/cmdline", pid); 70 snprintf(macline, sizeof(macline), "/proc/%d/attr/current", pid); 90 nexttok(&ptr); // skip pid 146 ppid = pid; 209 print_exe_abi(int pid) argument 243 ps_threads(int pid, char *namefilter) argument 316 int pid = atoi(de->d_name); local [all...] |
/system/extras/tests/cpueater/ |
H A D | cpueater.c | 30 pid_t pid; local 45 switch(pid = fork()) { 69 printf("%d\n", pid);
|
H A D | daemonize.c | 33 int pid, fd, mode; local 84 switch(pid = fork()) { 104 switch(pid = fork()) { 117 waitpid(pid, &status, 0);
|
/system/core/libcutils/ |
H A D | iosched_policy.c | 34 int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_unused, int ioprio __android_unused) { 36 if (syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, ioprio | (clazz << IOPRIO_CLASS_SHIFT))) { 43 int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *ioprio) { 47 if ((rc = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, pid)) < 0) {
|
/system/core/libbacktrace/ |
H A D | Backtrace.cpp | 42 Backtrace::Backtrace(pid_t pid, pid_t tid, BacktraceMap* map) argument 43 : pid_(pid), tid_(tid), map_(map), map_shared_(true) { 45 map_ = BacktraceMap::Create(pid); 127 Backtrace* Backtrace::Create(pid_t pid, pid_t tid, BacktraceMap* map) { argument 128 if (pid == BACKTRACE_CURRENT_PROCESS) { 129 pid = getpid(); 134 tid = pid; 137 if (pid == getpid()) { 138 return new UnwindCurrent(pid, tid, map); 140 return new UnwindPtrace(pid, ti [all...] |
H A D | BacktracePtrace.h | 29 BacktracePtrace(pid_t pid, pid_t tid, BacktraceMap* map) : Backtrace(pid, tid, map) {} argument
|
/system/core/fs_mgr/ |
H A D | fs_mgr_format.c | 67 int pid; local 74 pid = fork(); 75 if (pid < 0) { 76 return pid; 78 if (!pid) { 84 pid_t p = waitpid(pid, &rc, 0); 85 if (p != pid) {
|
/system/core/logd/ |
H A D | LogWhiteBlackList.cpp | 25 Prune::Prune(uid_t uid, pid_t pid) : mUid(uid), mPid(pid) { argument 28 int Prune::cmp(uid_t uid, pid_t pid) const { 33 return pid - mPid; 117 pid_t pid = Prune::pid_all; local 121 pid = 0; 123 pid = pid * 10 + *str++ - '0'; 128 if ((uid == Prune::uid_all) && (pid == Prune::pid_all)) { 145 if ((pid [all...] |
H A D | libaudit.h | 43 pid_t pid; member in struct:audit_sig_info 85 * Sets a pid to recieve audit netlink events from the kernel 88 * @param pid 89 * The pid whom to set as the reciever of audit messages 93 extern int audit_setup(int fd, uint32_t pid);
|
H A D | LogBuffer.h | 58 uid_t uid, pid_t pid, pid_t tid, 81 char *pidToName(pid_t pid) { return stats.pidToName(pid); } argument 82 uid_t pidToUid(pid_t pid) { return stats.pidToUid(pid); } argument
|
/system/core/libprocessgroup/ |
H A D | processgroup.cpp | 56 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) argument 63 pid); 66 static int initCtx(uid_t uid, int pid, struct ctx *ctx) argument 70 convertUidPidToPath(path, sizeof(path), uid, pid); 135 long pid = strtol(ctx->buf_ptr, &pid_eptr, 10); local 146 return (pid_t)pid; 149 static int removeProcessGroup(uid_t uid, int pid) argument 154 convertUidPidToPath(path, sizeof(path), uid, pid); 220 pid_t pid; local 224 while ((pid 330 char pid[PROCESSGROUP_MAX_PID_LEN + 1] = {0}; local [all...] |
/system/core/liblog/tests/ |
H A D | libc_test.cpp | 39 pid_t pid = getpid(); local 42 LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid))); 59 ASSERT_EQ(log_msg.entry.pid, pid); 99 pid_t pid = getpid(); local 102 (log_id_t)LOG_ID_CRASH, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid))); 120 ASSERT_EQ(log_msg.entry.pid, pid);
|
/system/core/debuggerd/ |
H A D | backtrace.h | 28 void dump_backtrace(int fd, int amfd, pid_t pid, pid_t tid, bool* detach_failed,
|
H A D | tombstone.h | 26 char* engrave_tombstone(pid_t pid, pid_t tid, int signal, int original_si_code,
|
/system/extras/perfprofd/quipper/kernel-headers/tools/perf/util/ |
H A D | target.h | 23 const char * pid; member in struct:perf_target
|
/system/extras/simpleperf/ |
H A D | event_fd.h | 40 static std::unique_ptr<EventFd> OpenEventFileForProcess(const perf_event_attr& attr, pid_t pid); 42 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t pid, int cpu); 46 // Give information about this perf_event_file, like (event_name, pid, cpu). 75 EventFd(int perf_event_fd, const std::string& event_name, pid_t pid, int cpu) argument 79 pid_(pid),
|
/system/core/libmemtrack/ |
H A D | memtrack_test.c | 28 static int getprocname(pid_t pid, char *buf, int len) { argument 38 if (asprintf(&filename, "/proc/%d/cmdline", pid) < 0) { 111 pid_t pid = pids[i]; local 120 getprocname(pid, cmdline, (int)sizeof(cmdline)); 122 ret = memtrack_proc_get(p, pid); 124 fprintf(stderr, "failed to get memory info for pid %d: %s (%d)\n", 125 pid, strerror(-ret), ret); 137 printf("%5d %6zu %6zu %6zu %6zu %6zu %6zu %s\n", pid,
|
/system/core/init/ |
H A D | signal_handler.cpp | 55 pid_t pid = TEMP_FAILURE_RETRY(waitpid(-1, &status, WNOHANG)); local 56 if (pid == 0) { 58 } else if (pid == -1) { 63 service* svc = service_find_by_pid(pid); 67 name = android::base::StringPrintf("Service '%s' (pid %d)", svc->name, pid); 69 name = android::base::StringPrintf("Untracked pid %d", pid); 81 NOTICE("Service '%s' (pid %d) killing any children in process group\n", svc->name, pid); [all...] |