xref: /titanic_50/usr/src/lib/libdtrace/common/dt_program.h (revision ac448965596bc1c42f7accb3023f48d5fa9b8180)
11a7c1b72Smws /*
21a7c1b72Smws  * CDDL HEADER START
31a7c1b72Smws  *
41a7c1b72Smws  * The contents of this file are subject to the terms of the
5*ac448965Sahl  * Common Development and Distribution License (the "License").
6*ac448965Sahl  * You may not use this file except in compliance with the License.
71a7c1b72Smws  *
81a7c1b72Smws  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91a7c1b72Smws  * or http://www.opensolaris.org/os/licensing.
101a7c1b72Smws  * See the License for the specific language governing permissions
111a7c1b72Smws  * and limitations under the License.
121a7c1b72Smws  *
131a7c1b72Smws  * When distributing Covered Code, include this CDDL HEADER in each
141a7c1b72Smws  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151a7c1b72Smws  * If applicable, add the following below this CDDL HEADER, with the
161a7c1b72Smws  * fields enclosed by brackets "[]" replaced with your own identifying
171a7c1b72Smws  * information: Portions Copyright [yyyy] [name of copyright owner]
181a7c1b72Smws  *
191a7c1b72Smws  * CDDL HEADER END
201a7c1b72Smws  */
21*ac448965Sahl 
221a7c1b72Smws /*
23*ac448965Sahl  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
241a7c1b72Smws  * Use is subject to license terms.
251a7c1b72Smws  */
261a7c1b72Smws 
271a7c1b72Smws #ifndef	_DT_PROGRAM_H
281a7c1b72Smws #define	_DT_PROGRAM_H
291a7c1b72Smws 
301a7c1b72Smws #pragma ident	"%Z%%M%	%I%	%E% SMI"
311a7c1b72Smws 
321a7c1b72Smws #ifdef	__cplusplus
331a7c1b72Smws extern "C" {
341a7c1b72Smws #endif
351a7c1b72Smws 
361a7c1b72Smws #include <dtrace.h>
371a7c1b72Smws #include <dt_list.h>
381a7c1b72Smws 
391a7c1b72Smws typedef struct dt_stmt {
401a7c1b72Smws 	dt_list_t ds_list;	/* list forward/back pointers */
411a7c1b72Smws 	dtrace_stmtdesc_t *ds_desc; /* pointer to statement description */
421a7c1b72Smws } dt_stmt_t;
431a7c1b72Smws 
441a7c1b72Smws struct dtrace_prog {
451a7c1b72Smws 	dt_list_t dp_list;	/* list forward/back pointers */
461a7c1b72Smws 	dt_list_t dp_stmts;	/* linked list of dt_stmt_t's */
471a7c1b72Smws 	ulong_t **dp_xrefs;	/* array of translator reference bitmaps */
481a7c1b72Smws 	uint_t dp_xrefslen;	/* length of dp_xrefs array */
49*ac448965Sahl 	uint8_t dp_dofversion;	/* DOF version this program requires */
501a7c1b72Smws };
511a7c1b72Smws 
521a7c1b72Smws extern dtrace_prog_t *dt_program_create(dtrace_hdl_t *);
531a7c1b72Smws extern void dt_program_destroy(dtrace_hdl_t *, dtrace_prog_t *);
541a7c1b72Smws 
551a7c1b72Smws extern dtrace_ecbdesc_t *dt_ecbdesc_create(dtrace_hdl_t *,
561a7c1b72Smws     const dtrace_probedesc_t *);
571a7c1b72Smws extern void dt_ecbdesc_release(dtrace_hdl_t *, dtrace_ecbdesc_t *);
581a7c1b72Smws 
591a7c1b72Smws #ifdef	__cplusplus
601a7c1b72Smws }
611a7c1b72Smws #endif
621a7c1b72Smws 
631a7c1b72Smws #endif	/* _DT_PROGRAM_H */
64