Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Instrument the number of calls to pmap_...
details: https://anonhg.NetBSD.org/src/rev/a2b5da5d5086
branches: trunk
changeset: 984373:a2b5da5d5086
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jul 05 15:12:00 2021 +0000
description:
Instrument the number of calls to pmap_growkernel().
diffstat:
sys/arch/alpha/alpha/pmap.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r 4e40c139b813 -r a2b5da5d5086 sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Mon Jul 05 14:51:23 2021 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Mon Jul 05 15:12:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.295 2021/07/05 10:00:22 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.296 2021/07/05 15:12:00 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295 2021/07/05 10:00:22 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.296 2021/07/05 15:12:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -258,6 +258,11 @@
static TAILQ_HEAD(, pmap) pmap_all_pmaps __cacheline_aligned;
/*
+ * Instrument the number of calls to pmap_growkernel().
+ */
+static struct evcnt pmap_growkernel_evcnt __read_mostly;
+
+/*
* The pools from which pmap structures and sub-structures are allocated.
*/
static struct pool_cache pmap_pmap_cache __read_mostly;
@@ -1548,6 +1553,10 @@
/* Initialize TLB handling. */
pmap_tlb_init();
+ /* Instrument pmap_growkernel(). */
+ evcnt_attach_dynamic_nozero(&pmap_growkernel_evcnt, EVCNT_TYPE_MISC,
+ NULL, "pmap", "growkernel");
+
/*
* Set a low water mark on the pv_entry pool, so that we are
* more likely to have these around even in extreme memory
@@ -3593,6 +3602,8 @@
if (maxkvaddr <= virtual_end)
goto out; /* we are OK */
+ pmap_growkernel_evcnt.ev_count++;
+
va = virtual_end;
while (va < maxkvaddr) {
Home |
Main Index |
Thread Index |
Old Index