diff options
author | mpi <mpi@openbsd.org> | 2020-04-23 09:14:27 +0000 |
---|---|---|
committer | mpi <mpi@openbsd.org> | 2020-04-23 09:14:27 +0000 |
commit | b9f00a1b446a63831bd9605ff8a5a23a6cf06e7b (patch) | |
tree | 2d6ed975a9916057a4141192718876207d19e363 /usr.sbin/btrace | |
parent | Document uvmexp.nswget without relying on implementation details. (diff) | |
download | wireguard-openbsd-b9f00a1b446a63831bd9605ff8a5a23a6cf06e7b.tar.xz wireguard-openbsd-b9f00a1b446a63831bd9605ff8a5a23a6cf06e7b.zip |
Make debug output less verbose.
Diffstat (limited to 'usr.sbin/btrace')
-rw-r--r-- | usr.sbin/btrace/btrace.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 1eb097dd7d2..df59fc56d63 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.14 2020/04/15 16:59:04 mpi Exp $ */ +/* $OpenBSD: btrace.c,v 1.15 2020/04/23 09:14:27 mpi Exp $ */ /* * Copyright (c) 2019 - 2020 Martin Pieuchot <mpi@openbsd.org> @@ -669,15 +669,17 @@ stmt_delete(struct bt_stmt *bs, struct dt_evt *dtev) { struct bt_arg *bkey, *bmap = SLIST_FIRST(&bs->bs_args); struct bt_var *bv = bmap->ba_value; + const char *hash; assert(bmap->ba_type == B_AT_MAP); assert(bs->bs_var == NULL); bkey = bmap->ba_key; + hash = ba2hash(bkey, dtev); debug("map=%p '%s' delete key=%p '%s'\n", bv->bv_value, bv_name(bv), - bkey, ba2hash(bkey, dtev)); + bkey, hash); - map_delete((struct map *)bv->bv_value, ba2hash(bkey, dtev)); + map_delete((struct map *)bv->bv_value, hash); } /* @@ -692,16 +694,18 @@ stmt_insert(struct bt_stmt *bs, struct dt_evt *dtev) struct bt_arg *bkey, *bmap = SLIST_FIRST(&bs->bs_args); struct bt_arg *bval = (struct bt_arg *)bs->bs_var; struct bt_var *bv = bmap->ba_value; + const char *hash; assert(bmap->ba_type == B_AT_MAP); assert(SLIST_NEXT(bval, ba_next) == NULL); bkey = bmap->ba_key; + hash = ba2hash(bkey, dtev); debug("map=%p '%s' insert key=%p '%s' bval=%p\n", bv->bv_value, - bv_name(bv), bkey, ba2hash(bkey, dtev), bval); + bv_name(bv), bkey, hash, bval); bv->bv_value = (struct bt_arg *)map_insert((struct map *)bv->bv_value, - ba2hash(bkey, dtev), bval); + hash, bval); } /* @@ -726,10 +730,9 @@ stmt_print(struct bt_stmt *bs, struct dt_evt *dtev) assert(SLIST_NEXT(btop, ba_next) == NULL); top = ba2long(btop, dtev); } + debug("map=%p '%s' print (top=%d)\n", bv->bv_value, bv_name(bv), top); map_print((struct map *)bv->bv_value, top, bv_name(bv)); - - debug("map=%p '%s' print (top=%d)\n", bv->bv_value, bv_name(bv), top); } /* @@ -888,8 +891,6 @@ ba2long(struct bt_arg *ba, struct dt_evt *dtev) xabort("no long conversion for type %d", ba->ba_type); } - debug("ba=%p long='%ld'\n", ba, val); - return val; } @@ -961,8 +962,6 @@ ba2str(struct bt_arg *ba, struct dt_evt *dtev) xabort("no string conversion for type %d", ba->ba_type); } - debug("ba=%p str='%s'\n", ba, str); - return str; } |