dt_program.h revision 178479
1178479Sjb/* 2178479Sjb * CDDL HEADER START 3178479Sjb * 4178479Sjb * The contents of this file are subject to the terms of the 5178479Sjb * Common Development and Distribution License (the "License"). 6178479Sjb * You may not use this file except in compliance with the License. 7178479Sjb * 8178479Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9178479Sjb * or http://www.opensolaris.org/os/licensing. 10178479Sjb * See the License for the specific language governing permissions 11178479Sjb * and limitations under the License. 12178479Sjb * 13178479Sjb * When distributing Covered Code, include this CDDL HEADER in each 14178479Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15178479Sjb * If applicable, add the following below this CDDL HEADER, with the 16178479Sjb * fields enclosed by brackets "[]" replaced with your own identifying 17178479Sjb * information: Portions Copyright [yyyy] [name of copyright owner] 18178479Sjb * 19178479Sjb * CDDL HEADER END 20178479Sjb */ 21178479Sjb 22178479Sjb/* 23178479Sjb * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24178479Sjb * Use is subject to license terms. 25178479Sjb */ 26178479Sjb 27178479Sjb#ifndef _DT_PROGRAM_H 28178479Sjb#define _DT_PROGRAM_H 29178479Sjb 30178479Sjb#pragma ident "%Z%%M% %I% %E% SMI" 31178479Sjb 32178479Sjb#ifdef __cplusplus 33178479Sjbextern "C" { 34178479Sjb#endif 35178479Sjb 36178479Sjb#include <dtrace.h> 37178479Sjb#include <dt_list.h> 38178479Sjb 39178479Sjbtypedef struct dt_stmt { 40178479Sjb dt_list_t ds_list; /* list forward/back pointers */ 41178479Sjb dtrace_stmtdesc_t *ds_desc; /* pointer to statement description */ 42178479Sjb} dt_stmt_t; 43178479Sjb 44178479Sjbstruct dtrace_prog { 45178479Sjb dt_list_t dp_list; /* list forward/back pointers */ 46178479Sjb dt_list_t dp_stmts; /* linked list of dt_stmt_t's */ 47178479Sjb ulong_t **dp_xrefs; /* array of translator reference bitmaps */ 48178479Sjb uint_t dp_xrefslen; /* length of dp_xrefs array */ 49178479Sjb uint8_t dp_dofversion; /* DOF version this program requires */ 50178479Sjb}; 51178479Sjb 52178479Sjbextern dtrace_prog_t *dt_program_create(dtrace_hdl_t *); 53178479Sjbextern void dt_program_destroy(dtrace_hdl_t *, dtrace_prog_t *); 54178479Sjb 55178479Sjbextern dtrace_ecbdesc_t *dt_ecbdesc_create(dtrace_hdl_t *, 56178479Sjb const dtrace_probedesc_t *); 57178479Sjbextern void dt_ecbdesc_release(dtrace_hdl_t *, dtrace_ecbdesc_t *); 58178479Sjb 59178479Sjb#ifdef __cplusplus 60178479Sjb} 61178479Sjb#endif 62178479Sjb 63178479Sjb#endif /* _DT_PROGRAM_H */ 64