Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips (Very) minimal kernel support for dtrace ...



details:   https://anonhg.NetBSD.org/src/rev/c1211b626d87
branches:  trunk
changeset: 1020061:c1211b626d87
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Mar 29 03:22:17 2021 +0000

description:
(Very) minimal kernel support for dtrace on MIPS; enough to system call
tracing to work for example.

diffstat:

 sys/arch/mips/mips/trap.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r f3a31c4730fe -r c1211b626d87 sys/arch/mips/mips/trap.c
--- a/sys/arch/mips/mips/trap.c Mon Mar 29 03:09:41 2021 +0000
+++ b/sys/arch/mips/mips/trap.c Mon Mar 29 03:22:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $        */
+/*     $NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,10 +39,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $");
 
 #include "opt_cputype.h"       /* which mips CPU levels do we support? */
 #include "opt_ddb.h"
+#include "opt_dtrace.h"
 #include "opt_kgdb.h"
 #include "opt_multiprocessor.h"
 
@@ -804,6 +805,16 @@
        return 0;
 }
 
+#ifdef KDTRACE_HOOKS
+#include <sys/dtrace_bsd.h>
+
+/* Not used for now, but needed for dtrace/fbt modules */
+dtrace_doubletrap_func_t       dtrace_doubletrap_func = NULL;
+dtrace_trap_func_t             dtrace_trap_func = NULL;
+
+int                            (* dtrace_invop_jump_addr)(struct trapframe *);
+#endif /* KDTRACE_HOOKS */
+
 #ifdef TRAP_SIGDEBUG
 static void
 frame_dump(const struct trapframe *tf, struct pcb *pcb)
@@ -863,4 +874,4 @@
            e);
        frame_dump(tf, lwp_getpcb(l));
 }
-#endif
+#endif /* TRAP_SIGDEBUG */



Home | Main Index | Thread Index | Old Index