Source-Changes-HG archive

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

[src/trunk]: src/sys/sys fix KERNHIST_DUMP



details:   https://anonhg.NetBSD.org/src/rev/1cfb2dc21b95
branches:  trunk
changeset: 795042:1cfb2dc21b95
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Mar 30 15:53:37 2014 +0000

description:
fix KERNHIST_DUMP

diffstat:

 sys/sys/kernhist.h |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r becf8b879579 -r 1cfb2dc21b95 sys/sys/kernhist.h
--- a/sys/sys/kernhist.h        Sun Mar 30 15:50:51 2014 +0000
+++ b/sys/sys/kernhist.h        Sun Mar 30 15:53:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernhist.h,v 1.8 2014/03/05 05:32:41 matt Exp $        */
+/*     $NetBSD: kernhist.h,v 1.9 2014/03/30 15:53:37 matt Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,6 +32,7 @@
 #define _SYS_KERNHIST_H_
 
 #if defined(_KERNEL_OPT)
+#include "opt_ddb.h"
 #include "opt_kernhist.h"
 #endif
 
@@ -100,7 +101,7 @@
 #define KERNHIST_CALLARGS(NAME,FMT,A,B,C,D)
 #define KERNHIST_CALLED(NAME)
 #define KERNHIST_FUNC(FNAME)
-#define kernhist_dump(NAME)
+#define KERNHIST_DUMP(NAME)
 #else
 #include <sys/kernel.h>                /* for "cold" variable */
 #include <sys/atomic.h>
@@ -208,6 +209,13 @@
        static const char *const _kernhist_name = FNAME; \
        unsigned int _kernhist_call = 0;
 
+#ifdef DDB
+#define KERNHIST_DUMP(NAME)    kernhist_dump(&NAME)
+#else
+#define KERNHIST_DUMP(NAME)
+#endif
+
+
 static inline void kernhist_entry_print(const struct kern_history_ent *);
 
 static inline void
@@ -220,6 +228,7 @@
 }
 
 #if defined(DDB)
+void   kernhist_dump(struct kern_history *);
 void   kernhist_print(void (*)(const char *, ...) __printflike(1, 2));
 #endif /* DDB */
 



Home | Main Index | Thread Index | Old Index