summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2006-11-04 04:58:10 +0000
committerjb <jb@FreeBSD.org>2006-11-04 04:58:10 +0000
commitf7bc0a87d69099d20f880d19b003e86e9914a561 (patch)
tree35c5c6a7594197845c0bce149a36748fb383ad1b /sys/sparc64
parentd871054da8ff096494cd388f1cc6f0545ff18d19 (diff)
downloadFreeBSD-src-f7bc0a87d69099d20f880d19b003e86e9914a561.zip
FreeBSD-src-f7bc0a87d69099d20f880d19b003e86e9914a561.tar.gz
Build in kernel support for loading DTrace modules by default. This
adds the hooks that DTrace modules register with, and adds a few functions which have the dtrace_ prefix to allow the DTrace FBT (function boundary trace) provider to avoid tracing because they are called from the DTtrace probe context. Unlike other forms of tracing and debug, DTrace support in the kernel incurs negligible run-time cost. I think the only reason why anyone wouldn't want to have kernel support enabled for DTrace would be due to the license (CDDL) under which DTrace is released.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/conf/DEFAULTS3
-rw-r--r--sys/sparc64/sparc64/machdep.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/sparc64/conf/DEFAULTS b/sys/sparc64/conf/DEFAULTS
index 8545b37..f1cfbd7 100644
--- a/sys/sparc64/conf/DEFAULTS
+++ b/sys/sparc64/conf/DEFAULTS
@@ -15,3 +15,6 @@ device uart_z8530
# KSE support went from being default to a kernel option
options KSE
+
+# Kernel support for loading DTrace modules
+options KDTRACE
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 84eea0b..ab9d74e 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -330,6 +330,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
tick_init(clock);
/*
+ * Initialize global registers.
+ */
+ pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1;
+ cpu_setregs(pc);
+
+ /*
* Initialize the console before printing anything.
*/
cninit();
@@ -409,7 +415,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
* stack, so don't pass the real size (PAGE_SIZE) to pcpu_init or
* it'll zero it out from under us.
*/
- pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1;
pcpu_init(pc, 0, sizeof(struct pcpu));
pc->pc_curthread = &thread0;
pc->pc_curpcb = thread0.td_pcb;
@@ -421,11 +426,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX;
/*
- * Initialize global registers.
- */
- cpu_setregs(pc);
-
- /*
* Initialize the message buffer (after setting trap table).
*/
msgbufinit(msgbufp, MSGBUF_SIZE);
OpenPOWER on IntegriCloud