From owner-dev-commits-src-all@freebsd.org Sun Aug 22 17:44:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86EA1659D7C; Sun, 22 Aug 2021 17:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gt2nM35yLz3Ky5; Sun, 22 Aug 2021 17:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 535AA24E23; Sun, 22 Aug 2021 17:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17MHidfv017896; Sun, 22 Aug 2021 17:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17MHidtW017895; Sun, 22 Aug 2021 17:44:39 GMT (envelope-from git) Date: Sun, 22 Aug 2021 17:44:39 GMT Message-Id: <202108221744.17MHidtW017895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: eccb516db8b7 - main - vm: use __func__ for the correct function name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eccb516db8b7fec957b139c3a9a2e16175551067 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2021 17:44:39 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=eccb516db8b7fec957b139c3a9a2e16175551067 commit eccb516db8b7fec957b139c3a9a2e16175551067 Author: Bjoern A. Zeeb AuthorDate: 2021-08-22 17:21:01 +0000 Commit: Bjoern A. Zeeb 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);