Source-Changes-HG archive

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

[src/trunk]: src/sys/kern apply some missing #ifn?def KDTRACE_HOOKS from the ...



details:   https://anonhg.NetBSD.org/src/rev/20c1a031fc1c
branches:  trunk
changeset: 366567:20c1a031fc1c
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon May 30 21:42:02 2022 +0000

description:
apply some missing #ifn?def KDTRACE_HOOKS from the previous.

diffstat:

 sys/kern/subr_kmem.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r cddf656d39d9 -r 20c1a031fc1c sys/kern/subr_kmem.c
--- a/sys/kern/subr_kmem.c      Mon May 30 21:18:37 2022 +0000
+++ b/sys/kern/subr_kmem.c      Mon May 30 21:42:02 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_kmem.c,v 1.85 2022/05/30 20:28:30 riastradh Exp $ */
+/*     $NetBSD: subr_kmem.c,v 1.86 2022/05/30 21:42:02 mrg Exp $       */
 
 /*
  * Copyright (c) 2009-2020 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.85 2022/05/30 20:28:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_kmem.c,v 1.86 2022/05/30 21:42:02 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kmem.h"
@@ -184,12 +184,16 @@
 
 static const struct kmem_cache_info kmem_cache_sizes[] = {
        KMEM_CACHE_SIZES(F)
+#ifndef KDTRACE_HOOKS
        { 0, NULL }
+#endif
 };
 
 static const struct kmem_cache_info kmem_cache_big_sizes[] = {
        KMEM_CACHE_BIG_SIZES(F)
+#ifndef KDTRACE_HOOKS
        { 0, NULL }
+#endif
 };
 
 #undef F
@@ -498,6 +502,7 @@
 
                while (size <= cache_size) {
                        alloc_table[(size - 1) >> shift] = pc;
+#ifdef KDTRACE_HOOKS
                        if (alloc_probe_table) {
                                alloc_probe_table[(size - 1) >> shift] =
                                    array[i].kc_alloc_probe_id;
@@ -506,6 +511,7 @@
                                free_probe_table[(size - 1) >> shift] =
                                    array[i].kc_free_probe_id;
                        }
+#endif
                        size += table_unit;
                }
        }



Home | Main Index | Thread Index | Old Index