summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2010-08-21 11:58:08 +0000
committerrpaulo <rpaulo@FreeBSD.org>2010-08-21 11:58:08 +0000
commitb8de09809273e0633438b2039f3fa1d273f5dcff (patch)
tree24290cae75d1d58bce4f5c19568cb2d60b2fc3c4
parentb325e69c9282072ea3b203319017abc400db4771 (diff)
downloadFreeBSD-src-b8de09809273e0633438b2039f3fa1d273f5dcff.zip
FreeBSD-src-b8de09809273e0633438b2039f3fa1d273f5dcff.tar.gz
Port the DTrace helper ioctls to FreeBSD and add a helper member to
dof_helper_t (needed by drti.o). Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
index 82b97a3..1e20f56 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
@@ -1322,15 +1322,24 @@ typedef struct {
* helpers and should no longer be used. No other ioctls are valid on the
* helper minor node.
*/
+#if defined(sun)
#define DTRACEHIOC (('d' << 24) | ('t' << 16) | ('h' << 8))
#define DTRACEHIOC_ADD (DTRACEHIOC | 1) /* add helper */
#define DTRACEHIOC_REMOVE (DTRACEHIOC | 2) /* remove helper */
#define DTRACEHIOC_ADDDOF (DTRACEHIOC | 3) /* add helper DOF */
+#else
+#define DTRACEHIOC_ADD _IOWR('z', 1, dof_hdr_t)/* add helper */
+#define DTRACEHIOC_REMOVE _IOW('z', 2, int) /* remove helper */
+#define DTRACEHIOC_ADDDOF _IOWR('z', 3, dof_helper_t)/* add helper DOF */
+#endif
typedef struct dof_helper {
char dofhp_mod[DTRACE_MODNAMELEN]; /* executable or library name */
uint64_t dofhp_addr; /* base address of object */
uint64_t dofhp_dof; /* address of helper DOF */
+#if !defined(sun)
+ int gen;
+#endif
} dof_helper_t;
#define DTRACEMNR_DTRACE "dtrace" /* node for DTrace ops */
@@ -2219,10 +2228,11 @@ extern void dtrace_vtime_enable(void);
extern void dtrace_vtime_disable(void);
struct regs;
+struct reg;
#if defined(sun)
-extern int (*dtrace_pid_probe_ptr)(struct regs *);
-extern int (*dtrace_return_probe_ptr)(struct regs *);
+extern int (*dtrace_pid_probe_ptr)(struct reg *);
+extern int (*dtrace_return_probe_ptr)(struct reg *);
extern void (*dtrace_fasttrap_fork_ptr)(proc_t *, proc_t *);
extern void (*dtrace_fasttrap_exec_ptr)(proc_t *);
extern void (*dtrace_fasttrap_exit_ptr)(proc_t *);
OpenPOWER on IntegriCloud