aboutsummaryrefslogtreecommitdiffstats
path: root/uts/common/sys/dtrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'uts/common/sys/dtrace.h')
-rw-r--r--uts/common/sys/dtrace.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/uts/common/sys/dtrace.h b/uts/common/sys/dtrace.h
index b6e52ec1c4da..007502d7d856 100644
--- a/uts/common/sys/dtrace.h
+++ b/uts/common/sys/dtrace.h
@@ -20,15 +20,13 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DTRACE_H
#define _SYS_DTRACE_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -664,6 +662,20 @@ typedef struct dof_sec {
#define DOF_SECF_LOAD 1 /* section should be loaded */
+#define DOF_SEC_ISLOADABLE(x) \
+ (((x) == DOF_SECT_ECBDESC) || ((x) == DOF_SECT_PROBEDESC) || \
+ ((x) == DOF_SECT_ACTDESC) || ((x) == DOF_SECT_DIFOHDR) || \
+ ((x) == DOF_SECT_DIF) || ((x) == DOF_SECT_STRTAB) || \
+ ((x) == DOF_SECT_VARTAB) || ((x) == DOF_SECT_RELTAB) || \
+ ((x) == DOF_SECT_TYPTAB) || ((x) == DOF_SECT_URELHDR) || \
+ ((x) == DOF_SECT_KRELHDR) || ((x) == DOF_SECT_OPTDESC) || \
+ ((x) == DOF_SECT_PROVIDER) || ((x) == DOF_SECT_PROBES) || \
+ ((x) == DOF_SECT_PRARGS) || ((x) == DOF_SECT_PROFFS) || \
+ ((x) == DOF_SECT_INTTAB) || ((x) == DOF_SECT_XLTAB) || \
+ ((x) == DOF_SECT_XLMEMBERS) || ((x) == DOF_SECT_XLIMPORT) || \
+ ((x) == DOF_SECT_XLIMPORT) || ((x) == DOF_SECT_XLEXPORT) || \
+ ((x) == DOF_SECT_PREXPORT) || ((x) == DOF_SECT_PRENOFFS))
+
typedef struct dof_ecbdesc {
dof_secidx_t dofe_probes; /* link to DOF_SECT_PROBEDESC */
dof_secidx_t dofe_pred; /* link to DOF_SECT_DIFOHDR */
@@ -1382,7 +1394,7 @@ typedef struct dof_helper {
* dtps_provide_module(); see "Arguments and Notes" for dtrace_register(),
* below.
*
- * 1.4 void dtps_enable(void *arg, dtrace_id_t id, void *parg)
+ * 1.4 int dtps_enable(void *arg, dtrace_id_t id, void *parg)
*
* 1.4.1 Overview
*
@@ -1403,7 +1415,8 @@ typedef struct dof_helper {
*
* 1.4.3 Return value
*
- * None.
+ * On success, dtps_enable() should return 0. On failure, -1 should be
+ * returned.
*
* 1.4.4 Caller's context
*
@@ -1957,7 +1970,7 @@ typedef struct dof_helper {
typedef struct dtrace_pops {
void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec);
void (*dtps_provide_module)(void *arg, struct modctl *mp);
- void (*dtps_enable)(void *arg, dtrace_id_t id, void *parg);
+ int (*dtps_enable)(void *arg, dtrace_id_t id, void *parg);
void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg);
void (*dtps_suspend)(void *arg, dtrace_id_t id, void *parg);
void (*dtps_resume)(void *arg, dtrace_id_t id, void *parg);