git: eccb516db8b7 - main - vm: use __func__ for the correct function name
Bjoern A. Zeeb
bz at FreeBSD.org
Sun Aug 22 17:44:39 UTC 2021
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=eccb516db8b7fec957b139c3a9a2e16175551067
commit eccb516db8b7fec957b139c3a9a2e16175551067
Author: Bjoern A. Zeeb <bz at FreeBSD.org>
AuthorDate: 2021-08-22 17:21:01 +0000
Commit: Bjoern A. Zeeb <bz at FreeBSD.org>
CommitDate: 2021-08-22 17:43:12 +0000
vm: use __func__ for the correct function name
In fee2a2fa39834d8d5eaa981298fce9d2ed31546d the KASSERTs in
vm_page_unwire_noq() changed from "vm_page_unwire" to "vm_page_unref".
While the former no longer was part of that function the latter does
not exist as a function and is highly confusing when hit when using
tools to lookup the functions and not doing a full-text search.
Use %s __func__ for printing the function name, as that will do the
right thing as code moves around and functions get renamed.
Hit: while debugging a wired page leak with linuxkpi/iwlwifi
Sponsored by: The FreeBSD Foundation
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D31635
---
sys/vm/vm_page.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index d435b871b7cb..4ecea30e9219 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -4050,9 +4050,9 @@ vm_page_unwire_noq(vm_page_t m)
old = vm_page_drop(m, 1);
KASSERT(VPRC_WIRE_COUNT(old) != 0,
- ("vm_page_unref: counter underflow for page %p", m));
+ ("%s: counter underflow for page %p", __func__, m));
KASSERT((m->flags & PG_FICTITIOUS) == 0 || VPRC_WIRE_COUNT(old) > 1,
- ("vm_page_unref: missing ref on fictitious page %p", m));
+ ("%s: missing ref on fictitious page %p", __func__, m));
if (VPRC_WIRE_COUNT(old) > 1)
return (false);
More information about the dev-commits-src-main
mailing list