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/lockstat Remove debug prints, simpli...



details:   https://anonhg.NetBSD.org/src/rev/3d7efc556b7e
branches:  trunk
changeset: 336660:3d7efc556b7e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Mar 09 01:07:27 2015 +0000

description:
Remove debug prints, simplify fini logic.

diffstat:

 external/cddl/osnet/dev/lockstat/lockstat.c |  25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diffs (60 lines):

diff -r 316bf28f761e -r 3d7efc556b7e external/cddl/osnet/dev/lockstat/lockstat.c
--- a/external/cddl/osnet/dev/lockstat/lockstat.c       Mon Mar 09 00:53:39 2015 +0000
+++ b/external/cddl/osnet/dev/lockstat/lockstat.c       Mon Mar 09 01:07:27 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lockstat.c,v 1.6 2015/03/09 00:53:39 christos Exp $    */
+/*     $NetBSD: lockstat.c,v 1.7 2015/03/09 01:07:27 riastradh Exp $   */
 
 /*
  * CDDL HEADER START
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.6 2015/03/09 00:53:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.7 2015/03/09 01:07:27 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -71,7 +71,6 @@
 
        ASSERT(!lockstat_probemap[LS_COMPRESS(probe->lsp_probe)]);
 
-printf("%s: %x %jd\n", __func__, LS_COMPRESS(probe->lsp_probe), (intmax_t)id);
        lockstat_probemap[LS_COMPRESS(probe->lsp_probe)] = id;
 
        return 0;
@@ -85,7 +84,6 @@
 
        ASSERT(lockstat_probemap[LS_COMPRESS(probe->lsp_probe)]);
 
-printf("%s: %x %jd\n", __func__, LS_COMPRESS(probe->lsp_probe), (intmax_t)id);
        lockstat_probemap[LS_COMPRESS(probe->lsp_probe)] = 0;
 }
 
@@ -204,19 +202,12 @@
        int error;
        bool ok __diagused;
 
-       /*
-        * If we haven't previously tried to detach and failed,
-        * unregister the dtrace provider.
-        */
-       if (lockstat_id != 0) {
-               error = dtrace_unregister(lockstat_id);
-               if (error) {
-                       printf("dtrace_lockstat"
-                           ": failed to unregister dtrace provider: %d\n",
-                           error);
-                       return error;
-               }
-               lockstat_id = 0;
+       error = dtrace_unregister(lockstat_id);
+       if (error) {
+               printf("dtrace_lockstat: failed to unregister dtrace provider"
+                   ": %d\n",
+                   error);
+               return error;
        }
 
        /* Unhook the probe.  */



Home | Main Index | Thread Index | Old Index