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()
126 idle_add_mapping(struct ps_prochandle *P, GElf_Phdr *php, file_info_t *fp) in idle_add_mapping() argument
151 return (Padd_mapping(P, php->p_offset, fp, &pmap)); in idle_add_mapping()
157 struct ps_prochandle *P = NULL; in Pgrab_file() local
178 if ((P = calloc(1, sizeof (struct ps_prochandle))) == NULL) { in Pgrab_file()
183 (void) mutex_init(&P->proc_lock, USYNC_THREAD, NULL); in Pgrab_file()
184 P->state = PS_IDLE; in Pgrab_file()
185 P->pid = (pid_t)-1; in Pgrab_file()
186 P->asfd = fd; in Pgrab_file()
187 P->ctlfd = -1; in Pgrab_file()
188 P->statfd = -1; in Pgrab_file()
189 P->agentctlfd = -1; in Pgrab_file()
190 P->agentstatfd = -1; in Pgrab_file()
191 P->info_valid = -1; in Pgrab_file()
192 Pinit_ops(&P->ops, &P_idle_ops); in Pgrab_file()
193 Pinitsym(P); in Pgrab_file()
194 Pinitfd(P); in Pgrab_file()
239 if ((P->execname = strdup(fp->file_pname)) == NULL) { in Pgrab_file()
244 P->num_files++; in Pgrab_file()
245 list_insert_head(&P->file_head, fp); in Pgrab_file()
273 if (idle_add_mapping(P, php, fp) != 0) { in Pgrab_file()
278 Psort_mappings(P); in Pgrab_file()
282 P->map_exec = fp->file_map; in Pgrab_file()
284 P->status.pr_flags = PR_STOPPED; in Pgrab_file()
285 P->status.pr_nlwp = 0; in Pgrab_file()
286 P->status.pr_pid = (pid_t)-1; in Pgrab_file()
287 P->status.pr_ppid = (pid_t)-1; in Pgrab_file()
288 P->status.pr_pgid = (pid_t)-1; in Pgrab_file()
289 P->status.pr_sid = (pid_t)-1; in Pgrab_file()
290 P->status.pr_taskid = (taskid_t)-1; in Pgrab_file()
291 P->status.pr_projid = (projid_t)-1; in Pgrab_file()
292 P->status.pr_zoneid = (zoneid_t)-1; in Pgrab_file()
295 P->status.pr_dmodel = PR_MODEL_ILP32; in Pgrab_file()
298 P->status.pr_dmodel = PR_MODEL_LP64; in Pgrab_file()
310 if (Pfindobj(P, fp->file_lname, buf, sizeof (buf)) != NULL) { in Pgrab_file()
311 free(P->execname); in Pgrab_file()
312 P->execname = strdup(buf); in Pgrab_file()
321 P->info_valid = 1; in Pgrab_file()
323 return (P); in Pgrab_file()
326 if (P != NULL) in Pgrab_file()
327 Pfree(P); in Pgrab_file()