003 File Manager
Current Path:
/usr/include
usr
/
include
/
📁
..
📄
Block.h
(1.96 KB)
📄
Block_private.h
(5.94 KB)
📄
FlexLexer.h
(6.73 KB)
📄
_ctype.h
(5.98 KB)
📄
_semaphore.h
(2.05 KB)
📄
a.out.h
(1.88 KB)
📄
aio.h
(7.69 KB)
📄
alias.h
(8.51 KB)
📄
ar.h
(2.69 KB)
📄
archive.h
(51.93 KB)
📄
archive_entry.h
(32.79 KB)
📁
arpa
📄
asn1-common.h
(2.06 KB)
📄
asn1_err.h
(1.07 KB)
📄
assert.h
(2.93 KB)
📁
atf-c
📁
atf-c++
📄
atf-c++.hpp
(1.49 KB)
📄
atf-c.h
(1.5 KB)
📄
base64.h
(1.99 KB)
📄
be.h
(5.32 KB)
📄
bitstring.h
(1.53 KB)
📄
blacklist.h
(2.2 KB)
📄
bluetooth.h
(6.65 KB)
📄
bsdxml.h
(40.5 KB)
📄
bsdxml_external.h
(5.4 KB)
📁
bsm
📁
bsnmp
📄
bzlib.h
(6.09 KB)
📁
c++
📄
calendar.h
(1.83 KB)
📁
cam
📄
camlib.h
(7.39 KB)
📄
capsicum_helpers.h
(4.33 KB)
📁
casper
📄
cms_asn1.h
(27.2 KB)
📄
com_err.h
(2.62 KB)
📄
com_right.h
(2.8 KB)
📄
complex.h
(4.68 KB)
📄
cpio.h
(2.4 KB)
📄
crmf_asn1.h
(13.31 KB)
📁
crypto
📄
ctype.h
(4.59 KB)
📄
curses.h
(97.92 KB)
📄
cuse.h
(3.26 KB)
📄
db.h
(7.49 KB)
📄
der-private.h
(1.29 KB)
📄
der-protos.h
(10.5 KB)
📄
der.h
(3.08 KB)
📁
dev
📄
devctl.h
(2.02 KB)
📁
devdctl
📄
devinfo.h
(4.52 KB)
📄
devstat.h
(5.2 KB)
📄
dialog.h
(37.7 KB)
📄
digest_asn1.h
(17.01 KB)
📄
dirent.h
(4.13 KB)
📄
dlfcn.h
(5.04 KB)
📄
dlg_colors.h
(6.87 KB)
📄
dlg_config.h
(2.64 KB)
📄
dlg_keys.h
(5.23 KB)
📄
dpv.h
(5.76 KB)
📄
dtrace.h
(23.64 KB)
📄
dwarf.h
(20.09 KB)
📁
edit
📄
efivar-dp.h
(2.58 KB)
📄
efivar.h
(3.75 KB)
📄
elf-hints.h
(1.96 KB)
📄
elf.h
(1.59 KB)
📄
err.h
(2.98 KB)
📄
errno.h
(8.29 KB)
📄
eti.h
(2.9 KB)
📄
execinfo.h
(1.92 KB)
📄
fcntl.h
(12.02 KB)
📄
fenv.h
(8.19 KB)
📄
fetch.h
(4.87 KB)
📄
figpar.h
(3.84 KB)
📄
float.h
(86 B)
📄
floatingpoint.h
(2.01 KB)
📄
fmtmsg.h
(2.76 KB)
📄
fmtutils.h
(2.19 KB)
📄
fnmatch.h
(2.32 KB)
📄
form.h
(18.37 KB)
📁
fs
📄
fstab.h
(3.03 KB)
📄
fts.h
(5.47 KB)
📄
ftw.h
(2.26 KB)
📁
gcc
📄
gelf.h
(5 KB)
📁
geom
📄
getarg.h
(3.15 KB)
📄
getopt.h
(2.73 KB)
📄
glob.h
(4.21 KB)
📄
grp.h
(3.21 KB)
📁
gssapi
📄
gssapi.h
(158 B)
📄
hdb-protos.h
(7.24 KB)
📄
hdb.h
(9.85 KB)
📄
hdb_asn1.h
(16.72 KB)
📄
hdb_err.h
(944 B)
📄
heim_asn1.h
(2.33 KB)
📄
heim_err.h
(1.46 KB)
📄
heim_threads.h
(6.91 KB)
📄
heimbase.h
(5.1 KB)
📄
heimntlm-protos.h
(3.78 KB)
📄
heimntlm.h
(4.85 KB)
📄
hex.h
(2.08 KB)
📄
histedit.h
(9.16 KB)
📄
hx509-private.h
(9.39 KB)
📄
hx509-protos.h
(22.53 KB)
📄
hx509.h
(5.88 KB)
📄
hx509_err.h
(3.04 KB)
📄
iconv.h
(4.23 KB)
📄
ieeefp.h
(261 B)
📄
ifaddrs.h
(2.09 KB)
📁
infiniband
📄
inttypes.h
(2.2 KB)
📄
iso646.h
(1.67 KB)
📁
isofs
📄
jail.h
(2.46 KB)
📄
k524_err.h
(724 B)
📁
kadm5
📄
kafs.h
(7.09 KB)
📄
kdc-protos.h
(2.25 KB)
📄
kdc.h
(3.5 KB)
📄
kenv.h
(1.58 KB)
📁
krb5
📄
krb5-private.h
(12.91 KB)
📄
krb5-protos.h
(113.43 KB)
📄
krb5-types.h
(1.48 KB)
📄
krb5.h
(29.75 KB)
📄
krb5_asn1.h
(70.51 KB)
📄
krb5_ccapi.h
(7.52 KB)
📄
krb5_err.h
(7.37 KB)
📄
kvm.h
(4.11 KB)
📄
kx509_asn1.h
(4.61 KB)
📄
langinfo.h
(3.95 KB)
📁
lib80211
📁
lib9p
📄
libcasper.h
(6.53 KB)
📄
libcasper_service.h
(2.5 KB)
📄
libdwarf.h
(32.98 KB)
📄
libelf.h
(7.72 KB)
📄
libgen.h
(2.65 KB)
📄
libgeom.h
(4.47 KB)
📄
libgpio.h
(3.48 KB)
📁
libipt
📁
libmilter
📄
libnetmap.h
(24.54 KB)
📄
libproc.h
(5.51 KB)
📄
libprocstat.h
(7.57 KB)
📄
librss.h
(2.96 KB)
📄
libufs.h
(5.08 KB)
📄
libusb.h
(22.05 KB)
📄
libusb20.h
(12.45 KB)
📄
libusb20_desc.h
(17.6 KB)
📄
libutil.h
(8.04 KB)
📁
libxo
📄
libzfs.h
(32.8 KB)
📄
libzfs_core.h
(5.1 KB)
📄
libzfsbootenv.h
(1.22 KB)
📄
limits.h
(4.7 KB)
📄
link.h
(1.71 KB)
📄
linker_set.h
(3.85 KB)
📄
locale.h
(2.64 KB)
📄
login_cap.h
(6.25 KB)
📁
lzma
📄
lzma.h
(9.63 KB)
📁
machine
📄
magic.h
(5.64 KB)
📄
malloc.h
(102 B)
📄
malloc_np.h
(5.04 KB)
📄
math.h
(13.92 KB)
📄
md4.h
(2.31 KB)
📄
md5.h
(810 B)
📄
memory.h
(1.68 KB)
📄
memstat.h
(7.26 KB)
📄
menu.h
(11.99 KB)
📄
monetary.h
(1.88 KB)
📄
mp.h
(857 B)
📄
mpool.h
(4.16 KB)
📄
mqueue.h
(2.22 KB)
📄
mtlib.h
(4.22 KB)
📄
ncurses.h
(97.92 KB)
📄
ncurses_dll.h
(4.42 KB)
📄
ndbm.h
(2.67 KB)
📁
net
📁
net80211
📄
netconfig.h
(3.71 KB)
📄
netdb.h
(10.78 KB)
📁
netgraph
📄
netgraph.h
(3.02 KB)
📁
netinet
📁
netinet6
📁
netipsec
📁
netnatm
📁
netpfil
📁
netsmb
📁
nfs
📁
nfsclient
📁
nfsserver
📄
nl_types.h
(2.94 KB)
📄
nlist.h
(2.13 KB)
📄
nss.h
(2.32 KB)
📄
nsswitch.h
(7.16 KB)
📄
ntlm_err.h
(970 B)
📄
ocsp_asn1.h
(14.58 KB)
📄
omp.h
(15.76 KB)
📁
opencsd
📁
openssl
📄
opie.h
(5.57 KB)
📄
osreldate.h
(1.51 KB)
📄
panel.h
(4.1 KB)
📄
parse_bytes.h
(2.13 KB)
📄
parse_time.h
(2.19 KB)
📄
parse_units.h
(2.73 KB)
📄
pathconv.h
(1.64 KB)
📄
paths.h
(5.16 KB)
📁
pcap
📄
pcap-bpf.h
(2.24 KB)
📄
pcap-namedb.h
(1.98 KB)
📄
pcap-netmap.h
(126 B)
📄
pcap.h
(2.17 KB)
📄
pkcs10_asn1.h
(4.13 KB)
📄
pkcs12_asn1.h
(13.04 KB)
📄
pkcs8_asn1.h
(6.51 KB)
📄
pkcs9_asn1.h
(5.95 KB)
📄
pkinit_asn1.h
(26.54 KB)
📄
pmc.h
(4.51 KB)
📄
pmcformat.h
(1.47 KB)
📄
pmclog.h
(5.74 KB)
📄
poll.h
(4.03 KB)
📄
printf.h
(5.15 KB)
📁
private
📄
proc_service.h
(2.96 KB)
📁
protocols
📄
pthread.h
(12.7 KB)
📄
pthread_np.h
(3.28 KB)
📄
pwd.h
(6.05 KB)
📄
radlib.h
(8.86 KB)
📄
radlib_vs.h
(3.6 KB)
📄
ranlib.h
(1.99 KB)
📁
rdma
📄
readpassphrase.h
(1.82 KB)
📄
regex.h
(3.87 KB)
📄
res_update.h
(2.45 KB)
📄
resolv.h
(18.69 KB)
📄
resolve.h
(7.26 KB)
📄
rfc2459_asn1.h
(73.99 KB)
📄
ripemd.h
(5.09 KB)
📄
roken-common.h
(11.68 KB)
📄
roken.h
(6.86 KB)
📁
rpc
📁
rpcsvc
📄
rpoll.h
(2.13 KB)
📄
rtbl.h
(3.61 KB)
📄
rtld_db.h
(3.82 KB)
📄
runetype.h
(3.76 KB)
📄
sched.h
(9.06 KB)
📄
sdp.h
(21.58 KB)
📄
search.h
(1.71 KB)
📁
security
📄
semaphore.h
(2.35 KB)
📄
setjmp.h
(2.5 KB)
📄
sha.h
(5.91 KB)
📄
sha224.h
(2.93 KB)
📄
sha256.h
(3.01 KB)
📄
sha384.h
(2.94 KB)
📄
sha512.h
(3.02 KB)
📄
sha512t.h
(4.6 KB)
📄
signal.h
(4.42 KB)
📄
skein.h
(15.95 KB)
📄
skein_freebsd.h
(3.85 KB)
📄
skein_iv.h
(5.54 KB)
📄
skein_port.h
(5.17 KB)
📄
spawn.h
(4.26 KB)
📄
stab.h
(3.07 KB)
📄
stdalign.h
(1.81 KB)
📄
stdarg.h
(87 B)
📄
stdatomic.h
(13.94 KB)
📄
stdbool.h
(1.64 KB)
📄
stddef.h
(2.59 KB)
📄
stdint.h
(2.63 KB)
📄
stdio.h
(16.92 KB)
📄
stdlib.h
(11.23 KB)
📄
stdnoreturn.h
(1.59 KB)
📄
string.h
(5.32 KB)
📄
string_m.h
(1.72 KB)
📄
stringlist.h
(1.83 KB)
📄
strings.h
(2.47 KB)
📁
sys
📄
sysdecode.h
(6.59 KB)
📄
sysexits.h
(5.17 KB)
📄
syslog.h
(7.25 KB)
📄
taclib.h
(5.28 KB)
📄
tar.h
(2.9 KB)
📄
tcpd.h
(8.18 KB)
📁
teken
📄
term.h
(40.4 KB)
📄
termcap.h
(3.39 KB)
📄
termios.h
(3.28 KB)
📄
tgmath.h
(8.85 KB)
📄
thread_db.h
(6.36 KB)
📄
thread_pool_impl.h
(2.76 KB)
📄
threads.h
(3.56 KB)
📄
time.h
(7.07 KB)
📄
timeconv.h
(2.42 KB)
📄
timers.h
(1.97 KB)
📄
ttyent.h
(2.95 KB)
📄
uchar.h
(2.3 KB)
📄
ucontext.h
(2.91 KB)
📁
ufs
📄
ugidfw.h
(2.68 KB)
📄
ulimit.h
(1.58 KB)
📄
ulog.h
(1.67 KB)
📄
unctrl.h
(3.1 KB)
📄
unistd.h
(18.71 KB)
📄
usb.h
(9.48 KB)
📄
usbhid.h
(3.75 KB)
📄
utempter.h
(1.76 KB)
📄
utime.h
(2.01 KB)
📄
utmpx.h
(3.03 KB)
📄
uuid.h
(2.43 KB)
📄
varargs.h
(1.54 KB)
📄
vgl.h
(5.59 KB)
📄
vis.h
(4.48 KB)
📁
vm
📄
vmmapi.h
(10.49 KB)
📄
wchar.h
(8.81 KB)
📄
wctype.h
(3.89 KB)
📄
wind.h
(3.09 KB)
📄
wind_err.h
(860 B)
📄
wordexp.h
(2.75 KB)
📁
x86
📄
xdbm.h
(1.91 KB)
📁
xlocale
📄
xlocale.h
(2.23 KB)
📄
ypclnt.h
(2.33 KB)
📄
zconf.h
(16.24 KB)
📄
zdb.h
(1.02 KB)
📄
zinject.h
(2.14 KB)
📄
zlib.h
(94.08 KB)
📄
zstream.h
(820 B)
📄
zutil_import.h
(2.51 KB)
Editing: dtrace.h
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Copyright (c) 2014, 2016 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _DTRACE_H #define _DTRACE_H #include <sys/dtrace.h> #include <stdarg.h> #include <stdio.h> #include <gelf.h> #include <libproc.h> #ifndef illumos #include <rtld_db.h> #endif #ifdef __cplusplus extern "C" { #endif /* * DTrace Dynamic Tracing Software: Library Interfaces * * Note: The contents of this file are private to the implementation of the * Solaris system and DTrace subsystem and are subject to change at any time * without notice. Applications and drivers using these interfaces will fail * to run on future releases. These interfaces should not be used for any * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB). * Please refer to the "Solaris Dynamic Tracing Guide" for more information. */ #define DTRACE_VERSION 3 /* library ABI interface version */ struct ps_prochandle; struct dt_node; typedef struct dtrace_hdl dtrace_hdl_t; typedef struct dtrace_prog dtrace_prog_t; typedef struct dtrace_vector dtrace_vector_t; typedef struct dtrace_aggdata dtrace_aggdata_t; #define DTRACE_O_NODEV 0x01 /* do not open dtrace(7D) device */ #define DTRACE_O_NOSYS 0x02 /* do not load /system/object modules */ #define DTRACE_O_LP64 0x04 /* force D compiler to be LP64 */ #define DTRACE_O_ILP32 0x08 /* force D compiler to be ILP32 */ #define DTRACE_O_MASK 0x0f /* mask of valid flags to dtrace_open */ extern dtrace_hdl_t *dtrace_open(int, int, int *); extern dtrace_hdl_t *dtrace_vopen(int, int, int *, const dtrace_vector_t *, void *); extern int dtrace_go(dtrace_hdl_t *); extern int dtrace_stop(dtrace_hdl_t *); extern void dtrace_sleep(dtrace_hdl_t *); extern void dtrace_close(dtrace_hdl_t *); extern int dtrace_errno(dtrace_hdl_t *); extern const char *dtrace_errmsg(dtrace_hdl_t *, int); extern const char *dtrace_faultstr(dtrace_hdl_t *, int); extern const char *dtrace_subrstr(dtrace_hdl_t *, int); extern int dtrace_setopt(dtrace_hdl_t *, const char *, const char *); extern int dtrace_getopt(dtrace_hdl_t *, const char *, dtrace_optval_t *); extern void dtrace_update(dtrace_hdl_t *); extern int dtrace_ctlfd(dtrace_hdl_t *); /* * DTrace Program Interface * * DTrace programs can be created by compiling ASCII text files containing * D programs or by compiling in-memory C strings that specify a D program. * Once created, callers can examine the list of program statements and * enable the probes and actions described by these statements. */ typedef struct dtrace_proginfo { dtrace_attribute_t dpi_descattr; /* minimum probedesc attributes */ dtrace_attribute_t dpi_stmtattr; /* minimum statement attributes */ uint_t dpi_aggregates; /* number of aggregates specified in program */ uint_t dpi_recgens; /* number of record generating probes in prog */ uint_t dpi_matches; /* number of probes matched by program */ uint_t dpi_speculations; /* number of speculations specified in prog */ } dtrace_proginfo_t; #define DTRACE_C_DIFV 0x0001 /* DIF verbose mode: show each compiled DIFO */ #define DTRACE_C_EMPTY 0x0002 /* Permit compilation of empty D source files */ #define DTRACE_C_ZDEFS 0x0004 /* Permit probe defs that match zero probes */ #define DTRACE_C_EATTR 0x0008 /* Error if program attributes less than min */ #define DTRACE_C_CPP 0x0010 /* Preprocess input file with cpp(1) utility */ #define DTRACE_C_KNODEF 0x0020 /* Permit unresolved kernel symbols in DIFO */ #define DTRACE_C_UNODEF 0x0040 /* Permit unresolved user symbols in DIFO */ #define DTRACE_C_PSPEC 0x0080 /* Interpret ambiguous specifiers as probes */ #define DTRACE_C_ETAGS 0x0100 /* Prefix error messages with error tags */ #define DTRACE_C_ARGREF 0x0200 /* Do not require all macro args to be used */ #define DTRACE_C_DEFARG 0x0800 /* Use 0/"" as value for unspecified args */ #define DTRACE_C_NOLIBS 0x1000 /* Do not process D system libraries */ #define DTRACE_C_CTL 0x2000 /* Only process control directives */ #define DTRACE_C_MASK 0x3bff /* mask of all valid flags to dtrace_*compile */ extern dtrace_prog_t *dtrace_program_strcompile(dtrace_hdl_t *, const char *, dtrace_probespec_t, uint_t, int, char *const []); extern dtrace_prog_t *dtrace_program_fcompile(dtrace_hdl_t *, FILE *, uint_t, int, char *const []); extern int dtrace_program_exec(dtrace_hdl_t *, dtrace_prog_t *, dtrace_proginfo_t *); extern void dtrace_program_info(dtrace_hdl_t *, dtrace_prog_t *, dtrace_proginfo_t *); #define DTRACE_D_STRIP 0x01 /* strip non-loadable sections from program */ #define DTRACE_D_PROBES 0x02 /* include provider and probe definitions */ #define DTRACE_D_MASK 0x03 /* mask of valid flags to dtrace_dof_create */ extern int dtrace_program_link(dtrace_hdl_t *, dtrace_prog_t *, uint_t, const char *, int, char *const []); extern int dtrace_program_header(dtrace_hdl_t *, FILE *, const char *); extern void *dtrace_dof_create(dtrace_hdl_t *, dtrace_prog_t *, uint_t); extern void dtrace_dof_destroy(dtrace_hdl_t *, void *); extern void *dtrace_getopt_dof(dtrace_hdl_t *); extern void *dtrace_geterr_dof(dtrace_hdl_t *); typedef struct dtrace_stmtdesc { dtrace_ecbdesc_t *dtsd_ecbdesc; /* ECB description */ dtrace_actdesc_t *dtsd_action; /* action list */ dtrace_actdesc_t *dtsd_action_last; /* last action in action list */ void *dtsd_aggdata; /* aggregation data */ void *dtsd_fmtdata; /* type-specific output data */ void *dtsd_strdata; /* type-specific string data */ void (*dtsd_callback)(void); /* callback function for EPID */ void *dtsd_data; /* callback data pointer */ dtrace_attribute_t dtsd_descattr; /* probedesc attributes */ dtrace_attribute_t dtsd_stmtattr; /* statement attributes */ } dtrace_stmtdesc_t; typedef int dtrace_stmt_f(dtrace_hdl_t *, dtrace_prog_t *, dtrace_stmtdesc_t *, void *); extern dtrace_stmtdesc_t *dtrace_stmt_create(dtrace_hdl_t *, dtrace_ecbdesc_t *); extern dtrace_actdesc_t *dtrace_stmt_action(dtrace_hdl_t *, dtrace_stmtdesc_t *); extern int dtrace_stmt_add(dtrace_hdl_t *, dtrace_prog_t *, dtrace_stmtdesc_t *); extern int dtrace_stmt_iter(dtrace_hdl_t *, dtrace_prog_t *, dtrace_stmt_f *, void *); extern void dtrace_stmt_destroy(dtrace_hdl_t *, dtrace_stmtdesc_t *); /* * DTrace Data Consumption Interface */ typedef enum { DTRACEFLOW_ENTRY, DTRACEFLOW_RETURN, DTRACEFLOW_NONE } dtrace_flowkind_t; #define DTRACE_CONSUME_ERROR -1 /* error while processing */ #define DTRACE_CONSUME_THIS 0 /* consume this probe/record */ #define DTRACE_CONSUME_NEXT 1 /* advance to next probe/rec */ #define DTRACE_CONSUME_ABORT 2 /* abort consumption */ typedef struct dtrace_probedata { dtrace_hdl_t *dtpda_handle; /* handle to DTrace library */ dtrace_eprobedesc_t *dtpda_edesc; /* enabled probe description */ dtrace_probedesc_t *dtpda_pdesc; /* probe description */ processorid_t dtpda_cpu; /* CPU for data */ caddr_t dtpda_data; /* pointer to raw data */ dtrace_flowkind_t dtpda_flow; /* flow kind */ const char *dtpda_prefix; /* recommended flow prefix */ int dtpda_indent; /* recommended flow indent */ } dtrace_probedata_t; typedef int dtrace_consume_probe_f(const dtrace_probedata_t *, void *); typedef int dtrace_consume_rec_f(const dtrace_probedata_t *, const dtrace_recdesc_t *, void *); extern int dtrace_consume(dtrace_hdl_t *, FILE *, dtrace_consume_probe_f *, dtrace_consume_rec_f *, void *); #define DTRACE_STATUS_NONE 0 /* no status; not yet time */ #define DTRACE_STATUS_OKAY 1 /* status okay */ #define DTRACE_STATUS_EXITED 2 /* exit() was called; tracing stopped */ #define DTRACE_STATUS_FILLED 3 /* fill buffer filled; tracing stoped */ #define DTRACE_STATUS_STOPPED 4 /* tracing already stopped */ extern int dtrace_status(dtrace_hdl_t *); /* * DTrace Formatted Output Interfaces * * To format output associated with a given dtrace_stmtdesc, the caller can * invoke one of the following functions, passing the opaque dtsd_fmtdata and a * list of record descriptions. These functions return either -1 to indicate * an error, or a positive integer indicating the number of records consumed. * For anonymous enablings, the consumer can use the dtrd_format member of * the record description to obtain a format description. The dtfd_string * member of the format description may be passed to dtrace_print{fa}_create() * to create the opaque format data. */ extern void *dtrace_printf_create(dtrace_hdl_t *, const char *); extern void *dtrace_printa_create(dtrace_hdl_t *, const char *); extern size_t dtrace_printf_format(dtrace_hdl_t *, void *, char *, size_t); extern int dtrace_fprintf(dtrace_hdl_t *, FILE *, void *, const dtrace_probedata_t *, const dtrace_recdesc_t *, uint_t, const void *, size_t); extern int dtrace_fprinta(dtrace_hdl_t *, FILE *, void *, const dtrace_probedata_t *, const dtrace_recdesc_t *, uint_t, const void *, size_t); extern int dtrace_system(dtrace_hdl_t *, FILE *, void *, const dtrace_probedata_t *, const dtrace_recdesc_t *, uint_t, const void *, size_t); extern int dtrace_freopen(dtrace_hdl_t *, FILE *, void *, const dtrace_probedata_t *, const dtrace_recdesc_t *, uint_t, const void *, size_t); /* * Type-specific output printing * * The print() action will associate a string data record that is actually the * fully-qualified type name of the data traced by the DIFEXPR action. This is * stored in the same 'format' record from the kernel, but we know by virtue of * the fact that the action is still DIFEXPR that it is actually a reference to * plain string data. */ extern int dtrace_print(dtrace_hdl_t *, FILE *, const char *, caddr_t, size_t); /* * DTrace Work Interface */ typedef enum { DTRACE_WORKSTATUS_ERROR = -1, DTRACE_WORKSTATUS_OKAY, DTRACE_WORKSTATUS_DONE } dtrace_workstatus_t; extern dtrace_workstatus_t dtrace_work(dtrace_hdl_t *, FILE *, dtrace_consume_probe_f *, dtrace_consume_rec_f *, void *); /* * DTrace Handler Interface */ #define DTRACE_HANDLE_ABORT -1 /* abort current operation */ #define DTRACE_HANDLE_OK 0 /* handled okay; continue */ typedef struct dtrace_errdata { dtrace_hdl_t *dteda_handle; /* handle to DTrace library */ dtrace_eprobedesc_t *dteda_edesc; /* enabled probe inducing err */ dtrace_probedesc_t *dteda_pdesc; /* probe inducing error */ processorid_t dteda_cpu; /* CPU of error */ int dteda_action; /* action inducing error */ int dteda_offset; /* offset in DIFO of error */ int dteda_fault; /* specific fault */ uint64_t dteda_addr; /* address of fault, if any */ const char *dteda_msg; /* preconstructed message */ } dtrace_errdata_t; typedef int dtrace_handle_err_f(const dtrace_errdata_t *, void *); extern int dtrace_handle_err(dtrace_hdl_t *, dtrace_handle_err_f *, void *); typedef enum { DTRACEDROP_PRINCIPAL, /* drop to principal buffer */ DTRACEDROP_AGGREGATION, /* drop to aggregation buffer */ DTRACEDROP_DYNAMIC, /* dynamic drop */ DTRACEDROP_DYNRINSE, /* dyn drop due to rinsing */ DTRACEDROP_DYNDIRTY, /* dyn drop due to dirty */ DTRACEDROP_SPEC, /* speculative drop */ DTRACEDROP_SPECBUSY, /* spec drop due to busy */ DTRACEDROP_SPECUNAVAIL, /* spec drop due to unavail */ DTRACEDROP_STKSTROVERFLOW, /* stack string tab overflow */ DTRACEDROP_DBLERROR /* error in ERROR probe */ } dtrace_dropkind_t; typedef struct dtrace_dropdata { dtrace_hdl_t *dtdda_handle; /* handle to DTrace library */ processorid_t dtdda_cpu; /* CPU, if any */ dtrace_dropkind_t dtdda_kind; /* kind of drop */ uint64_t dtdda_drops; /* number of drops */ uint64_t dtdda_total; /* total drops */ const char *dtdda_msg; /* preconstructed message */ } dtrace_dropdata_t; typedef int dtrace_handle_drop_f(const dtrace_dropdata_t *, void *); extern int dtrace_handle_drop(dtrace_hdl_t *, dtrace_handle_drop_f *, void *); typedef void dtrace_handle_proc_f(struct ps_prochandle *, const char *, void *); extern int dtrace_handle_proc(dtrace_hdl_t *, dtrace_handle_proc_f *, void *); #define DTRACE_BUFDATA_AGGKEY 0x0001 /* aggregation key */ #define DTRACE_BUFDATA_AGGVAL 0x0002 /* aggregation value */ #define DTRACE_BUFDATA_AGGFORMAT 0x0004 /* aggregation format data */ #define DTRACE_BUFDATA_AGGLAST 0x0008 /* last for this key/val */ typedef struct dtrace_bufdata { dtrace_hdl_t *dtbda_handle; /* handle to DTrace library */ const char *dtbda_buffered; /* buffered output */ dtrace_probedata_t *dtbda_probe; /* probe data */ const dtrace_recdesc_t *dtbda_recdesc; /* record description */ const dtrace_aggdata_t *dtbda_aggdata; /* aggregation data, if agg. */ uint32_t dtbda_flags; /* flags; see above */ } dtrace_bufdata_t; typedef int dtrace_handle_buffered_f(const dtrace_bufdata_t *, void *); extern int dtrace_handle_buffered(dtrace_hdl_t *, dtrace_handle_buffered_f *, void *); typedef struct dtrace_setoptdata { dtrace_hdl_t *dtsda_handle; /* handle to DTrace library */ const dtrace_probedata_t *dtsda_probe; /* probe data */ const char *dtsda_option; /* option that was set */ dtrace_optval_t dtsda_oldval; /* old value */ dtrace_optval_t dtsda_newval; /* new value */ } dtrace_setoptdata_t; typedef int dtrace_handle_setopt_f(const dtrace_setoptdata_t *, void *); extern int dtrace_handle_setopt(dtrace_hdl_t *, dtrace_handle_setopt_f *, void *); /* * DTrace Aggregate Interface */ #define DTRACE_A_PERCPU 0x0001 #define DTRACE_A_KEEPDELTA 0x0002 #define DTRACE_A_ANONYMOUS 0x0004 #define DTRACE_A_TOTAL 0x0008 #define DTRACE_A_MINMAXBIN 0x0010 #define DTRACE_A_HASNEGATIVES 0x0020 #define DTRACE_A_HASPOSITIVES 0x0040 #define DTRACE_AGGZOOM_MAX 0.95 /* height of max bar */ #define DTRACE_AGGWALK_ERROR -1 /* error while processing */ #define DTRACE_AGGWALK_NEXT 0 /* proceed to next element */ #define DTRACE_AGGWALK_ABORT 1 /* abort aggregation walk */ #define DTRACE_AGGWALK_CLEAR 2 /* clear this element */ #define DTRACE_AGGWALK_NORMALIZE 3 /* normalize this element */ #define DTRACE_AGGWALK_DENORMALIZE 4 /* denormalize this element */ #define DTRACE_AGGWALK_REMOVE 5 /* remove this element */ struct dtrace_aggdata { dtrace_hdl_t *dtada_handle; /* handle to DTrace library */ dtrace_aggdesc_t *dtada_desc; /* aggregation description */ dtrace_eprobedesc_t *dtada_edesc; /* enabled probe description */ dtrace_probedesc_t *dtada_pdesc; /* probe description */ caddr_t dtada_data; /* pointer to raw data */ uint64_t dtada_normal; /* the normal -- 1 for denorm */ size_t dtada_size; /* total size of the data */ caddr_t dtada_delta; /* delta data, if available */ caddr_t *dtada_percpu; /* per CPU data, if avail */ caddr_t *dtada_percpu_delta; /* per CPU delta, if avail */ int64_t dtada_total; /* per agg total, if avail */ uint16_t dtada_minbin; /* minimum bin, if avail */ uint16_t dtada_maxbin; /* maximum bin, if avail */ uint32_t dtada_flags; /* flags */ }; typedef int dtrace_aggregate_f(const dtrace_aggdata_t *, void *); typedef int dtrace_aggregate_walk_f(dtrace_hdl_t *, dtrace_aggregate_f *, void *); typedef int dtrace_aggregate_walk_joined_f(const dtrace_aggdata_t **, const int, void *); extern void dtrace_aggregate_clear(dtrace_hdl_t *); extern int dtrace_aggregate_snap(dtrace_hdl_t *); extern int dtrace_aggregate_print(dtrace_hdl_t *, FILE *, dtrace_aggregate_walk_f *); extern int dtrace_aggregate_walk(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_joined(dtrace_hdl_t *, dtrace_aggvarid_t *, int, dtrace_aggregate_walk_joined_f *, void *); extern int dtrace_aggregate_walk_sorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_keysorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_valsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_keyvarsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_valvarsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_keyrevsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_valrevsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_keyvarrevsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); extern int dtrace_aggregate_walk_valvarrevsorted(dtrace_hdl_t *, dtrace_aggregate_f *, void *); #define DTRACE_AGD_PRINTED 0x1 /* aggregation printed in program */ /* * DTrace Process Control Interface * * Library clients who wish to have libdtrace create or grab processes for * monitoring of their symbol table changes may use these interfaces to * request that libdtrace obtain control of the process using libproc. */ extern struct ps_prochandle *dtrace_proc_create(dtrace_hdl_t *, const char *, char *const *, proc_child_func *, void *); extern struct ps_prochandle *dtrace_proc_grab(dtrace_hdl_t *, pid_t, int); extern void dtrace_proc_release(dtrace_hdl_t *, struct ps_prochandle *); extern void dtrace_proc_continue(dtrace_hdl_t *, struct ps_prochandle *); /* * DTrace Object, Symbol, and Type Interfaces * * Library clients can use libdtrace to perform symbol and C type information * lookups by symbol name, symbol address, or C type name, or to lookup meta- * information cached for each of the program objects in use by DTrace. The * resulting struct contain pointers to arbitrary-length strings, including * object, symbol, and type names, that are persistent until the next call to * dtrace_update(). Once dtrace_update() is called, any cached values must * be flushed and not used subsequently by the client program. */ #define DTRACE_OBJ_EXEC ((const char *)0L) /* primary executable file */ #define DTRACE_OBJ_RTLD ((const char *)1L) /* run-time link-editor */ #define DTRACE_OBJ_CDEFS ((const char *)2L) /* C include definitions */ #define DTRACE_OBJ_DDEFS ((const char *)3L) /* D program definitions */ #define DTRACE_OBJ_EVERY ((const char *)-1L) /* all known objects */ #define DTRACE_OBJ_KMODS ((const char *)-2L) /* all kernel objects */ #define DTRACE_OBJ_UMODS ((const char *)-3L) /* all user objects */ typedef struct dtrace_objinfo { const char *dto_name; /* object file scope name */ const char *dto_file; /* object file path (if any) */ int dto_id; /* object file id (if any) */ uint_t dto_flags; /* object flags (see below) */ GElf_Addr dto_text_va; /* address of text section */ GElf_Xword dto_text_size; /* size of text section */ GElf_Addr dto_data_va; /* address of data section */ GElf_Xword dto_data_size; /* size of data section */ GElf_Addr dto_bss_va; /* address of BSS */ GElf_Xword dto_bss_size; /* size of BSS */ } dtrace_objinfo_t; #define DTRACE_OBJ_F_KERNEL 0x1 /* object is a kernel module */ #define DTRACE_OBJ_F_PRIMARY 0x2 /* object is a primary module */ typedef int dtrace_obj_f(dtrace_hdl_t *, const dtrace_objinfo_t *, void *); extern int dtrace_object_iter(dtrace_hdl_t *, dtrace_obj_f *, void *); extern int dtrace_object_info(dtrace_hdl_t *, const char *, dtrace_objinfo_t *); typedef struct dtrace_syminfo { const char *dts_object; /* object name */ const char *dts_name; /* symbol name */ ulong_t dts_id; /* symbol id */ } dtrace_syminfo_t; extern int dtrace_lookup_by_name(dtrace_hdl_t *, const char *, const char *, GElf_Sym *, dtrace_syminfo_t *); extern int dtrace_lookup_by_addr(dtrace_hdl_t *, GElf_Addr addr, GElf_Sym *, dtrace_syminfo_t *); typedef struct dtrace_typeinfo { const char *dtt_object; /* object containing type */ ctf_file_t *dtt_ctfp; /* CTF container handle */ ctf_id_t dtt_type; /* CTF type identifier */ uint_t dtt_flags; /* Misc. flags */ } dtrace_typeinfo_t; #define DTT_FL_USER 0x1 /* user type */ extern int dtrace_lookup_by_type(dtrace_hdl_t *, const char *, const char *, dtrace_typeinfo_t *); extern int dtrace_symbol_type(dtrace_hdl_t *, const GElf_Sym *, const dtrace_syminfo_t *, dtrace_typeinfo_t *); extern int dtrace_type_strcompile(dtrace_hdl_t *, const char *, dtrace_typeinfo_t *); extern int dtrace_type_fcompile(dtrace_hdl_t *, FILE *, dtrace_typeinfo_t *); extern struct dt_node *dt_compile_sugar(dtrace_hdl_t *, struct dt_node *); /* * DTrace Probe Interface * * Library clients can use these functions to iterate over the set of available * probe definitions and inquire as to their attributes. The probe iteration * interfaces report probes that are declared as well as those from dtrace(7D). */ typedef struct dtrace_probeinfo { dtrace_attribute_t dtp_attr; /* name attributes */ dtrace_attribute_t dtp_arga; /* arg attributes */ const dtrace_typeinfo_t *dtp_argv; /* arg types */ int dtp_argc; /* arg count */ } dtrace_probeinfo_t; typedef int dtrace_probe_f(dtrace_hdl_t *, const dtrace_probedesc_t *, void *); extern int dtrace_probe_iter(dtrace_hdl_t *, const dtrace_probedesc_t *pdp, dtrace_probe_f *, void *); extern int dtrace_probe_info(dtrace_hdl_t *, const dtrace_probedesc_t *, dtrace_probeinfo_t *); /* * DTrace Vector Interface * * The DTrace library normally speaks directly to dtrace(7D). However, * this communication may be vectored elsewhere. Consumers who wish to * perform a vectored open must fill in the vector, and use the dtrace_vopen() * entry point to obtain a library handle. */ struct dtrace_vector { #ifdef illumos int (*dtv_ioctl)(void *, int, void *); #else int (*dtv_ioctl)(void *, u_long, void *); #endif int (*dtv_lookup_by_addr)(void *, GElf_Addr, GElf_Sym *, dtrace_syminfo_t *); int (*dtv_status)(void *, processorid_t); long (*dtv_sysconf)(void *, int); }; /* * DTrace Utility Functions * * Library clients can use these functions to convert addresses strings, to * convert between string and integer probe descriptions and the * dtrace_probedesc_t representation, and to perform similar conversions on * stability attributes. */ extern int dtrace_addr2str(dtrace_hdl_t *, uint64_t, char *, int); extern int dtrace_uaddr2str(dtrace_hdl_t *, pid_t, uint64_t, char *, int); extern int dtrace_xstr2desc(dtrace_hdl_t *, dtrace_probespec_t, const char *, int, char *const [], dtrace_probedesc_t *); extern int dtrace_str2desc(dtrace_hdl_t *, dtrace_probespec_t, const char *, dtrace_probedesc_t *); extern int dtrace_id2desc(dtrace_hdl_t *, dtrace_id_t, dtrace_probedesc_t *); #define DTRACE_DESC2STR_MAX 1024 /* min buf size for dtrace_desc2str() */ extern char *dtrace_desc2str(const dtrace_probedesc_t *, char *, size_t); #define DTRACE_ATTR2STR_MAX 64 /* min buf size for dtrace_attr2str() */ extern char *dtrace_attr2str(dtrace_attribute_t, char *, size_t); extern int dtrace_str2attr(const char *, dtrace_attribute_t *); extern const char *dtrace_stability_name(dtrace_stability_t); extern const char *dtrace_class_name(dtrace_class_t); extern int dtrace_provider_modules(dtrace_hdl_t *, const char **, int); extern const char *const _dtrace_version; extern int _dtrace_debug; #ifdef __cplusplus } #endif #ifndef illumos #define _SC_CPUID_MAX _SC_NPROCESSORS_CONF #define _SC_NPROCESSORS_MAX _SC_NPROCESSORS_CONF #endif #endif /* _DTRACE_H */
Upload File
Create Folder