16ff6d951SJohn Birrell /* 26ff6d951SJohn Birrell * CDDL HEADER START 36ff6d951SJohn Birrell * 46ff6d951SJohn Birrell * The contents of this file are subject to the terms of the 56ff6d951SJohn Birrell * Common Development and Distribution License, Version 1.0 only 66ff6d951SJohn Birrell * (the "License"). You may not use this file except in compliance 76ff6d951SJohn Birrell * with the License. 86ff6d951SJohn Birrell * 96ff6d951SJohn Birrell * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 106ff6d951SJohn Birrell * or http://www.opensolaris.org/os/licensing. 116ff6d951SJohn Birrell * See the License for the specific language governing permissions 126ff6d951SJohn Birrell * and limitations under the License. 136ff6d951SJohn Birrell * 146ff6d951SJohn Birrell * When distributing Covered Code, include this CDDL HEADER in each 156ff6d951SJohn Birrell * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 166ff6d951SJohn Birrell * If applicable, add the following below this CDDL HEADER, with the 176ff6d951SJohn Birrell * fields enclosed by brackets "[]" replaced with your own identifying 186ff6d951SJohn Birrell * information: Portions Copyright [yyyy] [name of copyright owner] 196ff6d951SJohn Birrell * 206ff6d951SJohn Birrell * CDDL HEADER END 216ff6d951SJohn Birrell */ 226ff6d951SJohn Birrell 236ff6d951SJohn Birrell /* 246ff6d951SJohn Birrell * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 256ff6d951SJohn Birrell * Use is subject to license terms. 266ff6d951SJohn Birrell */ 27*8e648814SRui Paulo /* 28*8e648814SRui Paulo * Copyright (c) 2013, Joyent, Inc. All rights reserved. 29*8e648814SRui Paulo */ 306ff6d951SJohn Birrell 316ff6d951SJohn Birrell #ifndef _DT_PID_H 326ff6d951SJohn Birrell #define _DT_PID_H 336ff6d951SJohn Birrell 346ff6d951SJohn Birrell #include <libproc.h> 356ff6d951SJohn Birrell #include <sys/fasttrap.h> 366ff6d951SJohn Birrell #include <dt_impl.h> 376ff6d951SJohn Birrell 386ff6d951SJohn Birrell #ifdef __cplusplus 396ff6d951SJohn Birrell extern "C" { 406ff6d951SJohn Birrell #endif 416ff6d951SJohn Birrell 426ff6d951SJohn Birrell #define DT_PROC_ERR (-1) 436ff6d951SJohn Birrell #define DT_PROC_ALIGN (-2) 446ff6d951SJohn Birrell 456ff6d951SJohn Birrell extern int dt_pid_create_probes(dtrace_probedesc_t *, dtrace_hdl_t *, 466ff6d951SJohn Birrell dt_pcb_t *pcb); 476ff6d951SJohn Birrell extern int dt_pid_create_probes_module(dtrace_hdl_t *, dt_proc_t *); 486ff6d951SJohn Birrell 496ff6d951SJohn Birrell extern int dt_pid_create_entry_probe(struct ps_prochandle *, dtrace_hdl_t *, 506ff6d951SJohn Birrell fasttrap_probe_spec_t *, const GElf_Sym *); 516ff6d951SJohn Birrell 526ff6d951SJohn Birrell extern int dt_pid_create_return_probe(struct ps_prochandle *, dtrace_hdl_t *, 536ff6d951SJohn Birrell fasttrap_probe_spec_t *, const GElf_Sym *, uint64_t *); 546ff6d951SJohn Birrell 556ff6d951SJohn Birrell extern int dt_pid_create_offset_probe(struct ps_prochandle *, dtrace_hdl_t *, 566ff6d951SJohn Birrell fasttrap_probe_spec_t *, const GElf_Sym *, ulong_t); 576ff6d951SJohn Birrell 586ff6d951SJohn Birrell extern int dt_pid_create_glob_offset_probes(struct ps_prochandle *, 596ff6d951SJohn Birrell dtrace_hdl_t *, fasttrap_probe_spec_t *, const GElf_Sym *, const char *); 606ff6d951SJohn Birrell 61*8e648814SRui Paulo extern void dt_pid_get_types(dtrace_hdl_t *, const dtrace_probedesc_t *, 62*8e648814SRui Paulo dtrace_argdesc_t *, int *); 63*8e648814SRui Paulo 646ff6d951SJohn Birrell #ifdef __cplusplus 656ff6d951SJohn Birrell } 666ff6d951SJohn Birrell #endif 676ff6d951SJohn Birrell 686ff6d951SJohn Birrell #endif /* _DT_PID_H */ 69