PERFORCE change 131259 for review
John Birrell
jb at FreeBSD.org
Wed Dec 19 14:10:50 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=131259
Change 131259 by jb at jb_freebsd1 on 2007/12/19 22:10:48
Revert these files to match CVS. There isn't much point doing
and sun4v work until it is stable.
Affected files ...
.. //depot/projects/dtrace/src/sys/sun4v/sun4v/exception.S#12 edit
.. //depot/projects/dtrace/src/sys/sun4v/sun4v/tick.c#10 edit
.. //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#21 edit
Differences ...
==== //depot/projects/dtrace/src/sys/sun4v/sun4v/exception.S#12 (text+ko) ====
@@ -700,6 +700,7 @@
.align 32
.endm
+#ifdef KDTRACE
.macro dtrace_fasttrap
sethi %hi(dtrace_fasttrap_probe_ptr), %g4
ldx [%g4 + %lo(dtrace_fasttrap_probe_ptr)], %g4
@@ -722,6 +723,22 @@
sub %g0, 1, %g4
.align 32
.endm
+#else
+ .macro dtrace_fasttrap
+ nop
+ .align 32
+ .endm
+
+ .macro dtrace_pid
+ nop
+ .align 32
+ .endm
+
+ .macro dtrace_return
+ nop
+ .align 32
+ .endm
+#endif
! fetch FP context into local registers
.macro tl0_fpemu_context
==== //depot/projects/dtrace/src/sys/sun4v/sun4v/tick.c#10 (text+ko) ====
@@ -193,15 +193,3 @@
intr_restore_all(s);
}
-/*
- * DTrace needs a high resolution time function which can
- * be called from a probe context and guaranteed not to have
- * instrumented with probes itself.
- *
- * Returns nanoseconds since boot.
- */
-uint64_t
-dtrace_gethrtime()
-{
- return (rd(tick) * (uint64_t) 1000000000 / tick_freq);
-}
==== //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#21 (text+ko) ====
@@ -43,10 +43,8 @@
#include "opt_ddb.h"
#include "opt_ktr.h"
#include "opt_ktrace.h"
-#include "opt_trap_trace.h"
#include <sys/param.h>
-#include <sys/cpuvar.h>
#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/bus.h>
@@ -98,19 +96,6 @@
#include <security/audit/audit.h>
-#include <sparc64/dtrace.h>
-
-/*
- * These are hooks which are initialised by the dtrace module
- * when it is loaded. This keeps the DTrace implementation
- * opaque.
- *
- * This is a hook which is initialised by the systrace module
- * when it is loaded. This keeps the DTrace syscall provider
- * implementation opaque.
- */
-systrace_probe_func_t systrace_probe_func;
-
void trap(struct trapframe *tf, int64_t type, uint64_t data);
void syscall(struct trapframe *tf);
@@ -305,9 +290,6 @@
td = curthread;
-#ifdef TRAP_TRACING
-hv_ttrace_addentry(0, (uint64_t) trap, (uint64_t) td, type, data);
-#endif
CTR4(KTR_TRAP, "trap: %p type=%s (%s) pil=%#lx", td,
trap_msg[trapno],
(TRAPF_USERMODE(tf) ? "user" : "kernel"), rdpr(pil));
@@ -694,31 +676,9 @@
PTRACESTOP_SC(p, td, S_PT_SCE);
AUDIT_SYSCALL_ENTER(code, td);
-
- /*
- * If the systrace module has registered it's probe
- * callback and if there is a probe active for the
- * syscall 'entry', process the probe.
- */
- if (systrace_probe_func != NULL && callp->sy_entry != 0)
- (*systrace_probe_func)(callp->sy_entry, code, callp,
- args);
-
error = (*callp->sy_call)(td, argp);
AUDIT_SYSCALL_EXIT(error, td);
- /* Save the error return variable for DTrace to reference. */
- td->td_errno = error;
-
- /*
- * If the systrace module has registered it's probe
- * callback and if there is a probe active for the
- * syscall 'return', process the probe.
- */
- if (systrace_probe_func != NULL && callp->sy_return != 0)
- (*systrace_probe_func)(callp->sy_return, code, callp,
- args);
-
CTR5(KTR_SYSC, "syscall: p=%p error=%d %s return %#lx %#lx ", p,
error, syscallnames[code], td->td_retval[0],
td->td_retval[1]);
More information about the p4-projects
mailing list