Lines Matching refs:P
42 Pread_idle(struct ps_prochandle *P, void *buf, size_t n, uintptr_t addr, in Pread_idle() argument
53 if ((mp = Paddr2mptr(P, addr)) == NULL) in Pread_idle()
60 if ((len = pread64(P->asfd, buf, len, off)) <= 0) in Pread_idle()
73 Pwrite_idle(struct ps_prochandle *P, const void *buf, size_t n, uintptr_t addr, in Pwrite_idle() argument
82 Ppriv_idle(struct ps_prochandle *P, prpriv_t **pprv, void *data) in Ppriv_idle() argument
86 pp = proc_get_priv(P->pid); in Ppriv_idle()
125 idle_add_mapping(struct ps_prochandle *P, GElf_Phdr *php, file_info_t *fp) in idle_add_mapping() argument
150 return (Padd_mapping(P, php->p_offset, fp, &pmap)); in idle_add_mapping()
156 struct ps_prochandle *P = NULL; in Pgrab_file() local
177 if ((P = calloc(1, sizeof (struct ps_prochandle))) == NULL) { in Pgrab_file()
182 (void) mutex_init(&P->proc_lock, USYNC_THREAD, NULL); in Pgrab_file()
183 P->state = PS_IDLE; in Pgrab_file()
184 P->pid = (pid_t)-1; in Pgrab_file()
185 P->asfd = fd; in Pgrab_file()
186 P->ctlfd = -1; in Pgrab_file()
187 P->statfd = -1; in Pgrab_file()
188 P->agentctlfd = -1; in Pgrab_file()
189 P->agentstatfd = -1; in Pgrab_file()
190 P->info_valid = -1; in Pgrab_file()
191 Pinit_ops(&P->ops, &P_idle_ops); in Pgrab_file()
192 Pinitsym(P); in Pgrab_file()
236 if ((P->execname = strdup(fp->file_pname)) == NULL) { in Pgrab_file()
241 P->num_files++; in Pgrab_file()
242 list_link(fp, &P->file_head); in Pgrab_file()
270 if (idle_add_mapping(P, php, fp) != 0) { in Pgrab_file()
275 Psort_mappings(P); in Pgrab_file()
279 P->map_exec = fp->file_map; in Pgrab_file()
281 P->status.pr_flags = PR_STOPPED; in Pgrab_file()
282 P->status.pr_nlwp = 0; in Pgrab_file()
283 P->status.pr_pid = (pid_t)-1; in Pgrab_file()
284 P->status.pr_ppid = (pid_t)-1; in Pgrab_file()
285 P->status.pr_pgid = (pid_t)-1; in Pgrab_file()
286 P->status.pr_sid = (pid_t)-1; in Pgrab_file()
287 P->status.pr_taskid = (taskid_t)-1; in Pgrab_file()
288 P->status.pr_projid = (projid_t)-1; in Pgrab_file()
289 P->status.pr_zoneid = (zoneid_t)-1; in Pgrab_file()
292 P->status.pr_dmodel = PR_MODEL_ILP32; in Pgrab_file()
295 P->status.pr_dmodel = PR_MODEL_LP64; in Pgrab_file()
307 if (Pfindobj(P, fp->file_lname, buf, sizeof (buf)) != NULL) { in Pgrab_file()
308 free(P->execname); in Pgrab_file()
309 P->execname = strdup(buf); in Pgrab_file()
318 P->info_valid = 1; in Pgrab_file()
320 return (P); in Pgrab_file()
323 if (P != NULL) in Pgrab_file()
324 Pfree(P); in Pgrab_file()