/system/vold/ |
H A D | Process.h | 24 static int checkSymLink(int pid, const char *path, const char *name); 25 static int checkFileMaps(int pid, const char *path); 26 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max); 27 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint); 28 static int checkFileDescriptorSymLinks(int pid, const char *mountPoint, char *openFilename, size_t max); 29 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/core/toolbox/ |
H A D | ionice.c | 14 int pid; local 17 fprintf(stderr, "usage: ionice <pid> [none|rt|be|idle] [prio]\n"); 21 if (!(pid = atoi(argv[1]))) { 22 fprintf(stderr, "Invalid pid specified\n"); 27 if (android_get_ioprio(pid, &clazz, &ioprio)) { 31 fprintf(stdout, "Pid %d, class %s (%d), prio %d\n", pid, classes[clazz], clazz, ioprio); 50 printf("Setting pid %d i/o class to %d, prio %d\n", pid, clazz, ioprio); 51 if (android_set_ioprio(pid, clazz, ioprio)) {
|
H A D | renice.c | 42 fprintf(stderr, "USAGE: %s [[-r] priority pids ...] [-g pid]\n", s); 46 void print_prio(pid_t pid) argument 51 printf("pid %d's priority: %d\n", pid, getpriority(PRIO_PROCESS, pid)); 54 sched = sched_getscheduler(pid); 72 sched_getparam(pid, &sp); 115 pid_t pid; local 117 pid = atoi(argv[0]); 125 ret = sched_setscheduler(pid, SCHED_R [all...] |
H A D | ps.c | 34 static int ps_line(int pid, int tid, char *namefilter) argument 49 sprintf(statline, "/proc/%d", pid); 53 sprintf(statline, "/proc/%d/task/%d/stat", pid, tid); 55 snprintf(macline, sizeof(macline), "/proc/%d/task/%d/attr/current", pid, tid); 57 sprintf(statline, "/proc/%d/stat", pid); 58 sprintf(cmdline, "/proc/%d/cmdline", pid); 59 snprintf(macline, sizeof(macline), "/proc/%d/attr/current", pid); 79 nexttok(&ptr); // skip pid 136 ppid = pid; 137 pid 183 ps_threads(int pid, char *namefilter) argument 246 int pid = atoi(de->d_name); local [all...] |
H A D | schedtop.c | 18 int pid; member in struct:thread_info 94 static void add_thread(int pid, int tid, struct thread_info *proc_info) argument 104 info->pid = pid; 108 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid); 110 sprintf(line, "/proc/%d/schedstat", pid); 123 sprintf(line, "/proc/%d/cmdline", pid); 131 sprintf(line, "/proc/%d/task/%d/stat", pid, tid); 133 sprintf(line, "/proc/%d/stat", pid); 155 static void add_threads(int pid, struc argument 172 print_threads(int pid, uint32_t flags) argument 203 int pid = atoi(de->d_name); local 231 int pid = last_processes.data[i].pid; local [all...] |
H A D | lsof.c | 48 pid_t pid; member in struct:pid_info_t 91 info->cmdline, info->pid, info->user, type, 123 info->cmdline, info->pid, info->user, "mem", 147 info->cmdline, info->pid, info->user, "FDS", 166 void lsof_dumpinfo(pid_t pid) argument 173 info.pid = pid; 174 snprintf(info.path, sizeof(info.path), "/proc/%d/", pid); 177 // Get the UID by calling stat on the proc/pid directory. 222 long int pid local [all...] |
/system/core/libcorkscrew/arch-arm/ |
H A D | ptrace-arm.c | 29 static void load_exidx_header(pid_t pid, map_info_t* mi, argument 33 if (try_get_word_ptrace(pid, mi->start + offsetof(Elf32_Ehdr, e_phoff), &elf_phoff) 34 && try_get_word_ptrace(pid, mi->start + offsetof(Elf32_Ehdr, e_phnum), 41 if (!try_get_word_ptrace(pid, elf_phdr + offsetof(Elf32_Phdr, p_type), &elf_phdr_type)) { 47 if (!try_get_word_ptrace(pid, elf_phdr + offsetof(Elf32_Phdr, p_offset), 49 || !try_get_word_ptrace(pid, elf_phdr + offsetof(Elf32_Phdr, p_filesz), 65 void load_ptrace_map_info_data_arch(pid_t pid, map_info_t* mi, map_info_data_t* data) { argument 66 load_exidx_header(pid, mi, &data->exidx_start, &data->exidx_size);
|
/system/extras/tests/bionic/libc/common/ |
H A D | test_clone.c | 62 int pid,child; local 65 pid = clone (clone_child, clone_stack + 3 * PAGE_SIZE, 67 if (pid < 0) 72 printf ("child pid %d\n", pid); 75 child = waitpid (pid, &status, 0);
|
H A D | test_executable_destructor.c | 61 pid_t pid; local 80 pid = fork(); 81 if (pid < 0) { 86 if (pid == 0) {
|
/system/core/adb/ |
H A D | backup_service.c | 26 pid_t pid; member in struct:__anon272 44 waitpid(params->pid, &status, 0); 52 pid_t pid; local 80 pid = fork(); 81 if (pid < 0) { 91 if (pid == 0) { 138 D("fork() returned pid %d\n", pid); 143 params->pid = pid; [all...] |
H A D | jdwp_service.c | 23 | hello I'm in process <pid> | 36 equivalent to "adb forward tcp:<hostport> jdwp:<pid>" 38 "jdwp:<pid>" is a new forward destination format used to target 94 ** for each JDWP process, we record its pid and its connected socket 108 int pid; member in struct:JdwpProcess 132 if (proc->pid < 0) 135 len = snprintf(p, end-p, "%d\n", proc->pid); 177 proc->pid = -1; 205 proc->pid = -1; 240 if (proc->pid < 390 create_jdwp_connection_fd(int pid) argument [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/debuggerd/ |
H A D | backtrace.h | 28 void dump_backtrace(int fd, pid_t pid, pid_t tid, bool* detach_failed,
|
H A D | tombstone.h | 28 char* engrave_tombstone(pid_t pid, pid_t tid, int signal,
|
H A D | backtrace.c | 37 static void dump_process_header(log_t* log, pid_t pid) { argument 43 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); 54 _LOG(log, false, "\n\n----- pid %d at %s -----\n", pid, timestr); 61 static void dump_process_footer(log_t* log, pid_t pid) { argument 62 _LOG(log, false, "\n----- end %d -----\n", pid); 115 void dump_backtrace(int fd, pid_t pid, pid_t tid, bool* detach_failed, argument 122 dump_process_header(&log, pid); 126 snprintf(task_path, sizeof(task_path), "/proc/%d/task", pid); 147 dump_process_footer(&log, pid); [all...] |
/system/core/libcorkscrew/arch-mips/ |
H A D | ptrace-mips.c | 24 void load_ptrace_map_info_data_arch(pid_t pid, map_info_t* mi, map_info_data_t* data) { argument
|
/system/core/libcutils/ |
H A D | iosched_policy.c | 41 int android_set_ioprio(int pid, IoSchedClass clazz, int ioprio) { argument 43 if (ioprio_set(WHO_PROCESS, pid, ioprio | (clazz << CLASS_SHIFT))) { 50 int android_get_ioprio(int pid, IoSchedClass *clazz, int *ioprio) { argument 54 if ((rc = ioprio_get(WHO_PROCESS, pid)) < 0) {
|
H A D | zygote.c | 52 uint32_t pid; 137 // Read the pid, as a 4-byte network-order integer 139 ivs[0].iov_base = &pid; 140 ivs[0].iov_len = sizeof(pid); 156 pid = ntohl(pid); 158 return pid; 165 int pid; local 181 pid = send_request(fd, 1, argc + 1, newargv); 183 if (pid > 222 int pid; local [all...] |
/system/core/init/ |
H A D | signal_handler.c | 46 pid_t pid; local 54 while ( (pid = waitpid(-1, &status, block ? 0 : WNOHANG)) == -1 && errno == EINTR ); 55 if (pid <= 0) return -1; 56 INFO("waitpid returned pid %d, status = %08x\n", pid, status); 58 svc = service_find_by_pid(pid); 60 ERROR("untracked pid %d exited\n", pid); 64 NOTICE("process '%s', pid %d exited\n", svc->name, pid); [all...] |
/system/core/libcorkscrew/arch-x86/ |
H A D | ptrace-x86.c | 24 void load_ptrace_map_info_data_arch(pid_t pid __attribute__((unused)),
|
/system/netd/ |
H A D | logwrapper.c | 108 pid_t pid; local 128 pid = fork(); 129 if (pid < 0) { 133 } else if (pid == 0) { 205 pid_t pid; local 213 switch (pid = vfork()) { 225 pid = waitpid(pid, (int *)&pstat, 0); 229 return (pid == -1 ? -1 : pstat);
|
/system/extras/latencytop/ |
H A D | latencytop.c | 44 static struct latency_entry *read_process_stats(struct latency_entry *list, int erase, int pid); 45 static struct latency_entry *read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal); 71 int pid, tid; local 77 pid = tid = 0; 105 pid = atoi(argv[++i]); 121 if (tid && !pid) { 145 if (pid) { 147 e = read_thread_stats(e, erase, pid, tid, 1); 149 e = read_process_stats(e, erase, pid); 157 if (pid) { 201 read_process_stats(struct latency_entry *list, int erase, int pid) argument 231 read_thread_stats(struct latency_entry *list, int erase, int pid, int tid, int fatal) argument [all...] |