Source-Changes-HG archive

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

[src/trunk]: src/external/cddl/osnet/dev/dtrace/i386 Fix the build:



details:   https://anonhg.NetBSD.org/src/rev/e0071fc310bf
branches:  trunk
changeset: 753145:e0071fc310bf
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Mar 18 11:00:03 2010 +0000

description:
Fix the build:
1.) "ifdef-out" unused functions and global variables.
2.) Include "x86/include/cpu_counter.h" for amd64 and i386 to get the
    prototype of "cpu_frequency".

diffstat:

 external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (66 lines):

diff -r 7800be731b55 -r e0071fc310bf external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Thu Mar 18 10:57:58 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Thu Mar 18 11:00:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtrace_subr.c,v 1.2 2010/02/21 01:46:33 darran Exp $   */
+/*     $NetBSD: dtrace_subr.c,v 1.3 2010/03/18 11:00:03 tron Exp $     */
 
 /*
  * CDDL HEADER START
@@ -48,6 +48,10 @@
 #include <uvm/uvm_prot.h>
 #include <uvm/uvm_pmap.h>
 
+#if defined(__amd64__) || defined(__i386__)
+#include <x86/include/cpu_counter.h>
+#endif
+
 extern uintptr_t       kernelbase;
 extern uintptr_t       dtrace_in_probe_addr;
 extern int             dtrace_in_probe;
@@ -61,6 +65,8 @@
 
 dtrace_invop_hdlr_t *dtrace_invop_hdlr;
 
+void dtrace_gethrtime_init(void *arg);
+
 int
 dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t eax)
 {
@@ -372,8 +378,10 @@
 }
 #endif
 
+#if 0
 static int64_t tgt_cpu_tsc;
 static int64_t hst_cpu_tsc;
+#endif
 static int64_t tsc_skew[MAXCPUS];
 static uint64_t        nsec_scale;
 
@@ -389,6 +397,7 @@
        return (rv);
 }
 
+#if 0
 static void
 dtrace_gethrtime_init_sync(void *arg)
 {
@@ -408,7 +417,9 @@
        }
 #endif
 }
+#endif
 
+#if 0
 static void
 dtrace_gethrtime_init_cpu(void *arg)
 {
@@ -419,6 +430,7 @@
        else
                hst_cpu_tsc = dtrace_rdtsc();
 }
+#endif
 
 void
 dtrace_gethrtime_init(void *arg)



Home | Main Index | Thread Index | Old Index