Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libp2k If P2K_DEBUG is given, also dump rump kernel even...
details: https://anonhg.NetBSD.org/src/rev/061b07cb7e74
branches: trunk
changeset: 754481:061b07cb7e74
user: pooka <pooka%NetBSD.org@localhost>
date: Sat May 01 14:44:48 2010 +0000
description:
If P2K_DEBUG is given, also dump rump kernel event counters when
file system is unmounted.
diffstat:
lib/libp2k/p2k.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (54 lines):
diff -r c0147737ceae -r 061b07cb7e74 lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c Sat May 01 14:40:36 2010 +0000
+++ b/lib/libp2k/p2k.c Sat May 01 14:44:48 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: p2k.c,v 1.35 2010/04/29 22:34:21 pooka Exp $ */
+/* $NetBSD: p2k.c,v 1.36 2010/05/01 14:44:48 pooka Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -79,6 +79,7 @@
struct mount *p2m_mp;
int p2m_nvnodes;
int p2m_imtmpfsman;
+ bool p2m_hasdebug;
};
struct p2k_node {
@@ -273,6 +274,7 @@
struct p2k_mount *p2m;
char *envbuf;
bool dodaemon;
+ bool hasdebug;
PUFFSOP_INIT(pops);
@@ -315,6 +317,7 @@
if (getenv("P2K_DEBUG") != NULL) {
puffs_flags |= PUFFS_FLAG_OPDUMP;
dodaemon = false;
+ hasdebug = true;
}
if (getenv("P2K_NODETACH") != NULL) {
dodaemon = false;
@@ -346,6 +349,7 @@
errno = sverrno;
return NULL;
}
+ p2m->p2m_hasdebug = hasdebug;
if (dodaemon) {
if (puffs_daemon(p2m->p2m_pu, 1, 1) == -1) {
@@ -567,6 +571,12 @@
}
p2m->p2m_ukfs = NULL;
+ if (p2m->p2m_hasdebug) {
+ printf("-- rump kernel event counters --\n");
+ rump_printevcnts();
+ printf("-- end of event counters --\n");
+ }
+
rump_pub_lwp_alloc_and_switch(0, 0);
return error;
}
Home |
Main Index |
Thread Index |
Old Index