Module Name: src Committed By: ozaki-r Date: Thu Jul 18 06:47:10 UTC 2019
Modified Files: src/sys/net: if_llatbl.h Log Message: Show pointers of llentries on trace logs of LLE_REF_TRACE To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/net/if_llatbl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_llatbl.h diff -u src/sys/net/if_llatbl.h:1.16 src/sys/net/if_llatbl.h:1.17 --- src/sys/net/if_llatbl.h:1.16 Thu Jul 12 02:26:04 2018 +++ src/sys/net/if_llatbl.h Thu Jul 18 06:47:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_llatbl.h,v 1.16 2018/07/12 02:26:04 ozaki-r Exp $ */ +/* $NetBSD: if_llatbl.h,v 1.17 2019/07/18 06:47:10 ozaki-r Exp $ */ /* * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved. * Copyright (c) 2004-2008 Qing Li. All rights reserved. @@ -143,16 +143,17 @@ struct llentry { #define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1)) #if 0 -#define LLE_REF_TRACE(t, n) log(LOG_DEBUG, "%s:%d: REF(" #t "): refcnt=%d\n", \ - __func__, __LINE__, (n)) +#define LLE_REF_TRACE(t, lle, n) \ + log(LOG_DEBUG, "%s:%d: %p REF(" #t "): refcnt=%d\n", \ + __func__, __LINE__, (lle), (n)) #else -#define LLE_REF_TRACE(t, n) do {} while (0) +#define LLE_REF_TRACE(t, lle, n) do {} while (0) #endif #define LLE_ADDREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ - LLE_REF_TRACE(ADD, (lle)->lle_refcnt); \ - KASSERTMSG((lle)->lle_refcnt >= 0, \ + LLE_REF_TRACE(ADD, (lle), (lle)->lle_refcnt); \ + KASSERTMSG((lle)->lle_refcnt >= 0, \ "negative refcnt %d on lle %p", \ (lle)->lle_refcnt, (lle)); \ (lle)->lle_refcnt++; \ @@ -160,13 +161,13 @@ struct llentry { #define LLE_REMREF(lle) do { \ LLE_WLOCK_ASSERT(lle); \ - LLE_REF_TRACE(REM, (lle)->lle_refcnt); \ - KASSERTMSG((lle)->lle_refcnt > 0, \ + LLE_REF_TRACE(REM, (lle), (lle)->lle_refcnt); \ + KASSERTMSG((lle)->lle_refcnt > 0, \ "bogus refcnt %d on lle %p", \ (lle)->lle_refcnt, (lle)); \ (lle)->lle_refcnt--; \ if ((lle)->lle_refcnt == 0) \ - LLE_REF_TRACE(ZERO, (lle)->lle_refcnt); \ + LLE_REF_TRACE(ZERO, (lle), (lle)->lle_refcnt); \ } while (0) #define LLE_FREE_LOCKED(lle) do { \