dt_impl.h revision c9d6cd77e4180c3831afde367c7eb129e72f0b2c
17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
5ae115bcmrj * Common Development and Distribution License (the "License").
6ae115bcmrj * You may not use this file except in compliance with the License.
77c478bdstevel@tonic-gate *
87c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bdstevel@tonic-gate * See the License for the specific language governing permissions
117c478bdstevel@tonic-gate * and limitations under the License.
127c478bdstevel@tonic-gate *
137c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bdstevel@tonic-gate *
197c478bdstevel@tonic-gate * CDDL HEADER END
207c478bdstevel@tonic-gate */
217c478bdstevel@tonic-gate/*
221939740Sherry Moore * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bdstevel@tonic-gate * Use is subject to license terms.
240181461Keith M Wesolowski */
257c478bdstevel@tonic-gate
267c478bdstevel@tonic-gate#ifndef	_DT_IMPL_H
277c478bdstevel@tonic-gate#define	_DT_IMPL_H
287c478bdstevel@tonic-gate
297c478bdstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gate#include <sys/param.h>
327c478bdstevel@tonic-gate#include <sys/objfs.h>
337c478bdstevel@tonic-gate#include <setjmp.h>
347c478bdstevel@tonic-gate#include <libctf.h>
357c478bdstevel@tonic-gate#include <dtrace.h>
367c478bdstevel@tonic-gate#include <gelf.h>
377c478bdstevel@tonic-gate
38508de9fToomas Soome#ifdef	__cplusplus
397c478bdstevel@tonic-gateextern "C" {
407c478bdstevel@tonic-gate#endif
4145bf502Josef 'Jeff' Sipek
427c478bdstevel@tonic-gate#include <dt_parser.h>
437c478bdstevel@tonic-gate#include <dt_regset.h>
447c478bdstevel@tonic-gate#include <dt_inttab.h>
457c478bdstevel@tonic-gate#include <dt_strtab.h>
4645bf502Josef 'Jeff' Sipek#include <dt_ident.h>
4745bf502Josef 'Jeff' Sipek#include <dt_list.h>
4845bf502Josef 'Jeff' Sipek#include <dt_decl.h>
497c478bdstevel@tonic-gate#include <dt_as.h>
501939740Sherry Moore#include <dt_proc.h>
517c478bdstevel@tonic-gate#include <dt_dof.h>
527c478bdstevel@tonic-gate#include <dt_pcb.h>
537c478bdstevel@tonic-gate
540181461Keith M Wesolowskistruct dt_module;		/* see below */
550181461Keith M Wesolowskistruct dt_pfdict;		/* see <dt_printf.h> */
560181461Keith M Wesolowskistruct dt_arg;			/* see below */
570181461Keith M Wesolowskistruct dt_provider;		/* see <dt_provider.h> */
580181461Keith M Wesolowskistruct dt_xlator;		/* see <dt_xlator.h> */
590181461Keith M Wesolowski
600181461Keith M Wesolowskitypedef struct dt_intrinsic {
610181461Keith M Wesolowski	const char *din_name;	/* string name of the intrinsic type */
620181461Keith M Wesolowski	ctf_encoding_t din_data; /* integer or floating-point CTF encoding */
630181461Keith M Wesolowski	uint_t din_kind;	/* CTF type kind to instantiate */
640181461Keith M Wesolowski} dt_intrinsic_t;
650181461Keith M Wesolowski
660181461Keith M Wesolowskitypedef struct dt_typedef {
670181461Keith M Wesolowski	const char *dty_src;	/* string name of typedef source type */
680181461Keith M Wesolowski	const char *dty_dst;	/* string name of typedef destination type */
690181461Keith M Wesolowski} dt_typedef_t;
700181461Keith M Wesolowski
710181461Keith M Wesolowskitypedef struct dt_intdesc {
720181461Keith M Wesolowski	const char *did_name;	/* string name of the integer type */
730181461Keith M Wesolowski	ctf_file_t *did_ctfp;	/* CTF container for this type reference */
740181461Keith M Wesolowski	ctf_id_t did_type;	/* CTF type reference for this type */
750181461Keith M Wesolowski	uintmax_t did_limit;	/* maximum positive value held by type */
760181461Keith M Wesolowski} dt_intdesc_t;
770181461Keith M Wesolowski
780181461Keith M Wesolowskitypedef struct dt_modops {
790181461Keith M Wesolowski	uint_t (*do_syminit)(struct dt_module *);
800181461Keith M Wesolowski	void (*do_symsort)(struct dt_module *);
810181461Keith M Wesolowski	GElf_Sym *(*do_symname)(struct dt_module *,
820181461Keith M Wesolowski	    const char *, GElf_Sym *, uint_t *);
830181461Keith M Wesolowski	GElf_Sym *(*do_symaddr)(struct dt_module *,
840181461Keith M Wesolowski	    GElf_Addr, GElf_Sym *, uint_t *);
850181461Keith M Wesolowski} dt_modops_t;
860181461Keith M Wesolowski
870181461Keith M Wesolowskitypedef struct dt_arg {
880181461Keith M Wesolowski	int da_ndx;		/* index of this argument */
890181461Keith M Wesolowski	int da_mapping;		/* mapping of argument indices to arguments */
900181461Keith M Wesolowski	ctf_id_t da_type;	/* type of argument */
910181461Keith M Wesolowski	ctf_file_t *da_ctfp;	/* CTF container for type */
920181461Keith M Wesolowski	dt_ident_t *da_xlator;	/* translator, if any */
930181461Keith M Wesolowski	struct dt_arg *da_next;	/* next argument */
940181461Keith M Wesolowski} dt_arg_t;
950181461Keith M Wesolowski
960181461Keith M Wesolowskitypedef struct dt_sym {
970181461Keith M Wesolowski	uint_t ds_symid;	/* id of corresponding symbol */
980181461Keith M Wesolowski	uint_t ds_next;		/* index of next element in hash chain */
990181461Keith M Wesolowski} dt_sym_t;
1000181461Keith M Wesolowski
1010181461Keith M Wesolowskitypedef struct dt_module {
1020181461Keith M Wesolowski	dt_list_t dm_list;	/* list forward/back pointers */
1030181461Keith M Wesolowski	char dm_name[DTRACE_MODNAMELEN]; /* string name of module */
1040181461Keith M Wesolowski	char dm_file[MAXPATHLEN]; /* file path of module (if any) */
1050181461Keith M Wesolowski	struct dt_module *dm_next; /* pointer to next module in hash chain */
1060181461Keith M Wesolowski	const dt_modops_t *dm_ops; /* pointer to data model's ops vector */
1070181461Keith M Wesolowski	Elf *dm_elf;		/* libelf handle for module object */
1080181461Keith M Wesolowski	objfs_info_t dm_info;	/* object filesystem private info */
1090181461Keith M Wesolowski	ctf_sect_t dm_symtab;	/* symbol table for module */
1100181461Keith M Wesolowski	ctf_sect_t dm_strtab;	/* string table for module */
1110181461Keith M Wesolowski	ctf_sect_t dm_ctdata;	/* CTF data for module */
1120181461Keith M Wesolowski	ctf_file_t *dm_ctfp;	/* CTF container handle */
1130181461Keith M Wesolowski	uint_t *dm_symbuckets;	/* symbol table hash buckets (chain indices) */
1140181461Keith M Wesolowski	dt_sym_t *dm_symchains;	/* symbol table hash chains buffer */
1150181461Keith M Wesolowski	void *dm_asmap;		/* symbol pointers sorted by value */
1160181461Keith M Wesolowski	uint_t dm_symfree;	/* index of next free hash element */
1170181461Keith M Wesolowski	uint_t dm_nsymbuckets;	/* number of elements in bucket array */
1180181461Keith M Wesolowski	uint_t dm_nsymelems;	/* number of elements in hash table */
1190181461Keith M Wesolowski	uint_t dm_asrsv;	/* actual reserved size of dm_asmap */
1200181461Keith M Wesolowski	uint_t dm_aslen;	/* number of entries in dm_asmap */
1210181461Keith M Wesolowski	uint_t dm_flags;	/* module flags (see below) */
1220181461Keith M Wesolowski	int dm_modid;		/* modinfo(1M) module identifier */
1230181461Keith M Wesolowski	GElf_Addr dm_text_va;	/* virtual address of text section */
1240181461Keith M Wesolowski	GElf_Xword dm_text_size; /* size in bytes of text section */
1250181461Keith M Wesolowski	GElf_Addr dm_data_va;	/* virtual address of data section */
1260181461Keith M Wesolowski	GElf_Xword dm_data_size; /* size in bytes of data section */
1270181461Keith M Wesolowski	GElf_Addr dm_bss_va;	/* virtual address of BSS */
1280181461Keith M Wesolowski	GElf_Xword dm_bss_size;	/* size in bytes of BSS */
1290181461Keith M Wesolowski	dt_idhash_t *dm_extern;	/* external symbol definitions */
1300181461Keith M Wesolowski} dt_module_t;
1310181461Keith M Wesolowski
1327c478bdstevel@tonic-gate#define	DT_DM_LOADED	0x1	/* module symbol and type data is loaded */
1337c478bdstevel@tonic-gate#define	DT_DM_KERNEL	0x2	/* module is associated with a kernel object */
1347c478bdstevel@tonic-gate#define	DT_DM_PRIMARY	0x4	/* module is a krtld primary kernel object */
1357c478bdstevel@tonic-gate
1367c478bdstevel@tonic-gatetypedef struct dt_provmod {
1377c478bdstevel@tonic-gate	char *dp_name;				/* name of provider module */
1387c478bdstevel@tonic-gate	struct dt_provmod *dp_next;		/* next module */
1397c478bdstevel@tonic-gate} dt_provmod_t;
1407c478bdstevel@tonic-gate
1417c478bdstevel@tonic-gatetypedef struct dt_ahashent {
1427c478bdstevel@tonic-gate	struct dt_ahashent *dtahe_prev;		/* prev on hash chain */
1437c478bdstevel@tonic-gate	struct dt_ahashent *dtahe_next;		/* next on hash chain */
1447c478bdstevel@tonic-gate	struct dt_ahashent *dtahe_prevall;	/* prev on list of all */
1457c478bdstevel@tonic-gate	struct dt_ahashent *dtahe_nextall;	/* next on list of all */
1462269adcszhou	uint64_t dtahe_hashval;			/* hash value */
1472269adcszhou	size_t dtahe_size;			/* size of data */
1487c478bdstevel@tonic-gate	dtrace_aggdata_t dtahe_data;		/* data */
1497c478bdstevel@tonic-gate	void (*dtahe_aggregate)(int64_t *, int64_t *, size_t); /* function */
1507c478bdstevel@tonic-gate} dt_ahashent_t;
1517c478bdstevel@tonic-gate
1527c478bdstevel@tonic-gatetypedef struct dt_ahash {
1537c478bdstevel@tonic-gate	dt_ahashent_t	**dtah_hash;		/* hash table */
1547c478bdstevel@tonic-gate	dt_ahashent_t	*dtah_all;		/* list of all elements */
1557c478bdstevel@tonic-gate	size_t		dtah_size;		/* size of hash table */
1567c478bdstevel@tonic-gate} dt_ahash_t;
1577c478bdstevel@tonic-gate
1587c478bdstevel@tonic-gatetypedef struct dt_aggregate {
1597c478bdstevel@tonic-gate	dtrace_bufdesc_t dtat_buf; 	/* buf aggregation snapshot */
1607c478bdstevel@tonic-gate	int dtat_flags;			/* aggregate flags */
1617c478bdstevel@tonic-gate	processorid_t dtat_ncpus;	/* number of CPUs in aggregate */
1627c478bdstevel@tonic-gate	processorid_t *dtat_cpus;	/* CPUs in aggregate */
1637c478bdstevel@tonic-gate	processorid_t dtat_ncpu;	/* size of dtat_cpus array */
1647c478bdstevel@tonic-gate	processorid_t dtat_maxcpu;	/* maximum number of CPUs */
1657c478bdstevel@tonic-gate	dt_ahash_t dtat_hash;		/* aggregate hash table */
1667c478bdstevel@tonic-gate} dt_aggregate_t;
1677c478bdstevel@tonic-gate
1687c478bdstevel@tonic-gatetypedef struct dt_print_aggdata {
1697c478bdstevel@tonic-gate	dtrace_hdl_t *dtpa_dtp;		/* pointer to libdtrace handle */
1707c478bdstevel@tonic-gate	dtrace_aggvarid_t dtpa_id;	/* aggregation variable of interest */
1717c478bdstevel@tonic-gate	FILE *dtpa_fp;			/* file pointer */
1727c478bdstevel@tonic-gate	int dtpa_allunprint;		/* print only unprinted aggregations */
1737c478bdstevel@tonic-gate} dt_print_aggdata_t;
1747c478bdstevel@tonic-gate
1757c478bdstevel@tonic-gatetypedef struct dt_dirpath {
1767c478bdstevel@tonic-gate	dt_list_t dir_list;		/* linked-list forward/back pointers */
1777c478bdstevel@tonic-gate	char *dir_path;			/* directory pathname */
1787c478bdstevel@tonic-gate} dt_dirpath_t;
1797c478bdstevel@tonic-gate
1807c478bdstevel@tonic-gatetypedef struct dt_lib_depend {
1817c478bdstevel@tonic-gate	dt_list_t dtld_deplist;		/* linked-list forward/back pointers */
18245bf502Josef 'Jeff' Sipek	char *dtld_library;		/* library name */
18345bf502Josef 'Jeff' Sipek	char *dtld_libpath;		/* library pathname */
18445bf502Josef 'Jeff' Sipek	uint_t dtld_finish;		/* completion time in tsort for lib */
1857c478bdstevel@tonic-gate	uint_t dtld_start;		/* starting time in tsort for lib */
1867c478bdstevel@tonic-gate	dt_list_t dtld_dependencies;	/* linked-list of lib dependencies */
1877c478bdstevel@tonic-gate	dt_list_t dtld_dependents;	/* linked-list of lib dependents */
1887c478bdstevel@tonic-gate} dt_lib_depend_t;
1897c478bdstevel@tonic-gate
19045bf502Josef 'Jeff' Sipektypedef uint32_t dt_version_t;		/* encoded version (see below) */
1917c478bdstevel@tonic-gate
1927c478bdstevel@tonic-gatestruct dtrace_hdl {
1937c478bdstevel@tonic-gate	const dtrace_vector_t *dt_vector; /* library vector, if vectored open */
1947c478bdstevel@tonic-gate	void *dt_varg;	/* vector argument, if vectored open */
1957c478bdstevel@tonic-gate	dtrace_conf_t dt_conf;	/* DTrace driver configuration profile */
1967c478bdstevel@tonic-gate	char dt_errmsg[BUFSIZ];	/* buffer for formatted syntax error msgs */
1977c478bdstevel@tonic-gate	const char *dt_errtag;	/* tag used with last call to dt_set_errmsg() */
1987c478bdstevel@tonic-gate	dt_pcb_t *dt_pcb;	/* pointer to current parsing control block */
1997c478bdstevel@tonic-gate	ulong_t dt_gen;		/* compiler generation number */
200ae115bcmrj	dt_list_t dt_programs;	/* linked list of dtrace_prog_t's */
2017c478bdstevel@tonic-gate	dt_list_t dt_xlators;	/* linked list of dt_xlator_t's */
2027c478bdstevel@tonic-gate	struct dt_xlator **dt_xlatormap; /* dt_xlator_t's indexed by dx_id */
2037c478bdstevel@tonic-gate	id_t dt_xlatorid;	/* next dt_xlator_t id to assign */
2047c478bdstevel@tonic-gate	dt_ident_t *dt_externs;	/* linked list of external symbol identifiers */
2057c478bdstevel@tonic-gate	dt_idhash_t *dt_macros;	/* hash table of macro variable identifiers */
206ae115bcmrj	dt_idhash_t *dt_aggs;	/* hash table of aggregation identifiers */
207ae115bcmrj	dt_idhash_t *dt_globals; /* hash table of global identifiers */
208ae115bcmrj	dt_idhash_t *dt_tls;	/* hash table of thread-local identifiers */
209ae115bcmrj	dt_list_t dt_modlist;	/* linked list of dt_module_t's */
210ae115bcmrj	dt_module_t **dt_mods;	/* hash table of dt_module_t's */
2117c478bdstevel@tonic-gate	uint_t dt_modbuckets;	/* number of module hash buckets */
2127c478bdstevel@tonic-gate	uint_t dt_nmods;	/* number of modules in hash and list */
2137c478bdstevel@tonic-gate	dt_provmod_t *dt_provmod; /* linked list of provider modules */
2147c478bdstevel@tonic-gate	dt_module_t *dt_exec;	/* pointer to executable module */
2157c478bdstevel@tonic-gate	dt_module_t *dt_rtld;	/* pointer to run-time linker module */
2167c478bdstevel@tonic-gate	dt_module_t *dt_cdefs;	/* pointer to C dynamic type module */
2177c478bdstevel@tonic-gate	dt_module_t *dt_ddefs;	/* pointer to D dynamic type module */
2187c478bdstevel@tonic-gate	dt_list_t dt_provlist;	/* linked list of dt_provider_t's */
2197c478bdstevel@tonic-gate	struct dt_provider **dt_provs; /* hash table of dt_provider_t's */
220ae115bcmrj	uint_t dt_provbuckets;	/* number of provider hash buckets */
221ae115bcmrj	uint_t dt_nprovs;	/* number of providers in hash and list */
222ae115bcmrj	dt_proc_hash_t *dt_procs; /* hash table of grabbed process handles */
223ae115bcmrj	dt_intdesc_t dt_ints[6]; /* cached integer type descriptions */
2247c478bdstevel@tonic-gate	ctf_id_t dt_type_func;	/* cached CTF identifier for function type */
2252269adcszhou	ctf_id_t dt_type_fptr;	/* cached CTF identifier for function pointer */
2262269adcszhou	ctf_id_t dt_type_str;	/* cached CTF identifier for string type */
2277c478bdstevel@tonic-gate	ctf_id_t dt_type_dyn;	/* cached CTF identifier for <DYN> type */
2287c478bdstevel@tonic-gate	ctf_id_t dt_type_stack;	/* cached CTF identifier for stack type */
2297c478bdstevel@tonic-gate	ctf_id_t dt_type_symaddr; /* cached CTF identifier for _symaddr type */
2307c478bdstevel@tonic-gate	ctf_id_t dt_type_usymaddr; /* cached CTF ident. for _usymaddr type */
2317c478bdstevel@tonic-gate	size_t dt_maxprobe;	/* max enabled probe ID */
2327c478bdstevel@tonic-gate	dtrace_eprobedesc_t **dt_edesc; /* enabled probe descriptions */
2337c478bdstevel@tonic-gate	dtrace_probedesc_t **dt_pdesc; /* probe descriptions for enabled prbs */
2347c478bdstevel@tonic-gate	size_t dt_maxagg;	/* max aggregation ID */
235ae115bcmrj	dtrace_aggdesc_t **dt_aggdesc; /* aggregation descriptions */
2367c478bdstevel@tonic-gate	int dt_maxformat;	/* max format ID */
237ae115bcmrj	void **dt_formats;	/* pointer to format array */
2387c478bdstevel@tonic-gate	dt_aggregate_t dt_aggregate; /* aggregate */
2397c478bdstevel@tonic-gate	dtrace_bufdesc_t dt_buf; /* staging buffer */
2407c478bdstevel@tonic-gate	struct dt_pfdict *dt_pfdict; /* dictionary of printf conversions */
2417c478bdstevel@tonic-gate	dt_version_t dt_vmax;	/* optional ceiling on program API binding */
2427c478bdstevel@tonic-gate	dtrace_attribute_t dt_amin; /* optional floor on program attributes */
2437c478bdstevel@tonic-gate	char *dt_cpp_path;	/* pathname of cpp(1) to invoke if needed */
2447c478bdstevel@tonic-gate	char **dt_cpp_argv;	/* argument vector for exec'ing cpp(1) */
2457c478bdstevel@tonic-gate	int dt_cpp_argc;	/* count of initialized cpp(1) arguments */
2467c478bdstevel@tonic-gate	int dt_cpp_args;	/* size of dt_cpp_argv[] array */
2477c478bdstevel@tonic-gate	char *dt_ld_path;	/* pathname of ld(1) to invoke if needed */
248508de9fToomas Soome	dt_list_t dt_lib_path;	/* linked-list forming library search path */
2497c478bdstevel@tonic-gate	uint_t dt_lazyload;	/* boolean:  set via -xlazyload */
2507c478bdstevel@tonic-gate	uint_t dt_droptags;	/* boolean:  set via -xdroptags */
251	uint_t dt_active;	/* boolean:  set once tracing is active */
252	uint_t dt_stopped;	/* boolean:  set once tracing is stopped */
253	processorid_t dt_beganon; /* CPU that executed BEGIN probe (if any) */
254	processorid_t dt_endedon; /* CPU that executed END probe (if any) */
255	uint_t dt_oflags;	/* dtrace open-time options (see dtrace.h) */
256	uint_t dt_cflags;	/* dtrace compile-time options (see dtrace.h) */
257	uint_t dt_dflags;	/* dtrace link-time options (see dtrace.h) */
258	uint_t dt_prcmode;	/* dtrace process create mode (see dt_proc.h) */
259	uint_t dt_linkmode;	/* dtrace symbol linking mode (see below) */
260	uint_t dt_linktype;	/* dtrace link output file type (see below) */
261	uint_t dt_xlatemode;	/* dtrace translator linking mode (see below) */
262	uint_t dt_stdcmode;	/* dtrace stdc compatibility mode (see below) */
263	uint_t dt_treedump;	/* dtrace tree debug bitmap (see below) */
264	uint64_t dt_options[DTRACEOPT_MAX]; /* dtrace run-time options */
265	int dt_version;		/* library version requested by client */
266	int dt_ctferr;		/* error resulting from last CTF failure */
267	int dt_errno;		/* error resulting from last failed operation */
268	int dt_fd;		/* file descriptor for dtrace pseudo-device */
269	int dt_ftfd;		/* file descriptor for fasttrap pseudo-device */
270	int dt_fterr;		/* saved errno from failed open of dt_ftfd */
271	int dt_cdefs_fd;	/* file descriptor for C CTF debugging cache */
272	int dt_ddefs_fd;	/* file descriptor for D CTF debugging cache */
273	int dt_stdout_fd;	/* file descriptor for saved stdout */
274	dtrace_handle_err_f *dt_errhdlr; /* error handler, if any */
275	void *dt_errarg;	/* error handler argument */
276	dtrace_prog_t *dt_errprog; /* error handler program, if any */
277	dtrace_handle_drop_f *dt_drophdlr; /* drop handler, if any */
278	void *dt_droparg;	/* drop handler argument */
279	dtrace_handle_proc_f *dt_prochdlr; /* proc handler, if any */
280	void *dt_procarg;	/* proc handler argument */
281	dtrace_handle_setopt_f *dt_setopthdlr; /* setopt handler, if any */
282	void *dt_setoptarg;	/* setopt handler argument */
283	dtrace_status_t dt_status[2]; /* status cache */
284	int dt_statusgen;	/* current status generation */
285	hrtime_t dt_laststatus;	/* last status */
286	hrtime_t dt_lastswitch;	/* last switch of buffer data */
287	hrtime_t dt_lastagg;	/* last snapshot of aggregation data */
288	char *dt_sprintf_buf;	/* buffer for dtrace_sprintf() */
289	int dt_sprintf_buflen;	/* length of dtrace_sprintf() buffer */
290	const char *dt_filetag;	/* default filetag for dt_set_errmsg() */
291	char *dt_buffered_buf;	/* buffer for buffered output */
292	size_t dt_buffered_offs; /* current offset into buffered buffer */
293	size_t dt_buffered_size; /* size of buffered buffer */
294	dtrace_handle_buffered_f *dt_bufhdlr; /* buffered handler, if any */
295	void *dt_bufarg;	/* buffered handler argument */
296	dt_dof_t dt_dof;	/* DOF generation buffers (see dt_dof.c) */
297	struct utsname dt_uts;	/* uname(2) information for system */
298	dt_list_t dt_lib_dep;	/* scratch linked-list of lib dependencies */
299	dt_list_t dt_lib_dep_sorted;	/* dependency sorted library list */
300};
301
302/*
303 * Values for the user arg of the ECB.
304 */
305#define	DT_ECB_DEFAULT		0
306#define	DT_ECB_ERROR		1
307
308/*
309 * Values for the dt_linkmode property, which is used by the assembler when
310 * processing external symbol references.  User can set using -xlink=<mode>.
311 */
312#define	DT_LINK_KERNEL	0	/* kernel syms static, user syms dynamic */