Source-Changes-HG archive

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

[src/trunk]: src/sys/rump Add rump_printevcnts() which dumps values from all ...



details:   https://anonhg.NetBSD.org/src/rev/c0147737ceae
branches:  trunk
changeset: 754480:c0147737ceae
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat May 01 14:40:36 2010 +0000

description:
Add rump_printevcnts() which dumps values from all event counters.
(NOTE! it is run unscheduled for various experimentation etcetc. reasons)

diffstat:

 sys/rump/include/rump/rump.h     |   4 +++-
 sys/rump/librump/rumpkern/rump.c |  18 ++++++++++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 64674ffc9519 -r c0147737ceae sys/rump/include/rump/rump.h
--- a/sys/rump/include/rump/rump.h      Sat May 01 14:37:53 2010 +0000
+++ b/sys/rump/include/rump/rump.h      Sat May 01 14:40:36 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.h,v 1.41 2010/04/26 23:40:22 pooka Exp $  */
+/*     $NetBSD: rump.h,v 1.42 2010/05/01 14:40:36 pooka Exp $  */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -103,6 +103,8 @@
 void   rump_schedule(void);
 void   rump_unschedule(void);
 
+void   rump_printevcnts(void);
+
 int    rump__init(int);
 
 #ifndef _RUMPKERNEL
diff -r 64674ffc9519 -r c0147737ceae sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Sat May 01 14:37:53 2010 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Sat May 01 14:40:36 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.169 2010/04/28 14:51:07 pooka Exp $ */
+/*     $NetBSD: rump.c,v 1.170 2010/05/01 14:40:36 pooka Exp $ */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.169 2010/04/28 14:51:07 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.170 2010/05/01 14:40:36 pooka Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -807,3 +807,17 @@
 
        return __NetBSD_Version__;
 }
+
+/*
+ * Note: may be called unscheduled.  Not fully safe since no locking
+ * of allevents (currently that's not even available).
+ */
+void
+rump_printevcnts()
+{
+       struct evcnt *ev;
+
+       TAILQ_FOREACH(ev, &allevents, ev_list)
+               rumpuser_dprintf("%s / %s: %" PRIu64 "\n",
+                   ev->ev_group, ev->ev_name, ev->ev_count);
+}



Home | Main Index | Thread Index | Old Index