From nobody Wed Mar 02 21:57:21 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 778D519E084B; Wed, 2 Mar 2022 21:57:23 +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 4K87JK5Vvrz3KT2; Wed, 2 Mar 2022 21:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDXKDxXkRIrekoxYB/i3EUIcREwX8XeoQ5MPrWIeBL8=; b=X/NC+z/tZvSzkAe8l8x6vwtQMM6haMaybFixtONaoePL2Z5P0FOrPqPADwQRQBkL9Wg1P/ 8885H6plOTxZm8DgVdFG2pyqFWHJOGrEHsinWH7Lu0mDYNdJt83zqQAjjLNPSBG/tiPG3E c/+NciwULgCsJLK6typ21DQz4cuN27z22nxDB32Uln04vXzdXYB/neu6Mo4mGJHTpQuPAC 2UudXdtmrRrx6S524b7TaiCzbKgu2reUistr5Fi+RkNR76V06DmIJZi/XK40N3QklJToLR K81Z2UWCLT/eSSswRRGkn/VP7JnQhJmmTEmU86txb0wsGLhvE+tRzEnXk3b4HA== 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 85CD53A8B; Wed, 2 Mar 2022 21:57:21 +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 222LvLsR065118; Wed, 2 Mar 2022 21:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 222LvLoi065117; Wed, 2 Mar 2022 21:57:21 GMT (envelope-from git) Date: Wed, 2 Mar 2022 21:57:21 GMT Message-Id: <202203022157.222LvLoi065117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eric van Gyzen Subject: git: c15fc3249fa9 - stable/13 - Fix lockstat:::thread-spin dtrace probe with LOCK_PROFILING List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c15fc3249fa942e6229e65a7c07ff20a383da202 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646258241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lDXKDxXkRIrekoxYB/i3EUIcREwX8XeoQ5MPrWIeBL8=; b=J0Zuxj/9hegY+dEPSmqC8QMYrwmc0o/AovoUy2eReQDVl3nz+ou6I/anlE7IkNK4zBuE4k 0/+QfGb4JHSCXvVg+TbcrzUOpiVIeshhnRkdi18LBleaMC4wclt/sfTD9V8GgXcx+yrRNk Jm3xh2L0xKXS48AL2x0nGDy9WiN9EzsOq7jSwHy7CphYyRocDzuUASgbTasnAR+ND9Rzuk SCBc52iT8SqHjK1qGGFHg0nE8x6NHH5sjfhSKcJ2oqG2WW+x2SMmrhhdzgVrCuZrHtoBeC +IAN29gCg0xsCLCqTZM7peYlJ2hrAvVBKxRFsNGFsaraYElYM/rxhiIwoboYLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646258241; a=rsa-sha256; cv=none; b=CDzq5UBw0gPq/lrqpIZbXZbhlJQDtl/AU5RuOEnvgo6iUncKaeqqgUL3Ou5dVABDsZuADa fafMorNGaXp6Kpc2Yo4V1y/ZfOB0euZboHXJSmGwp/RbRaItanG+jnovdSjSKQBeiitTVh Hl9pvVe+SVoKNpWQ0CVcuuRcSWJU9yBLsjvy7KtE9sA/pjAdpXQ77oBp0ChS4Zc8Kr4vMi Kgag9D3qrAvaMIc9D1PmbbjAMiKpegVkt206Bxj0kQ3FaVUJ00d8h9kOSCbeu8tg/DHlOX AEeeTFHZrmDDGIZeEhBNUcm+8r2eKgJLcxeoUQsYrdJKhLnLB33aCUxFkpqEug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=c15fc3249fa942e6229e65a7c07ff20a383da202 commit c15fc3249fa942e6229e65a7c07ff20a383da202 Author: Eric van Gyzen AuthorDate: 2021-08-02 18:54:57 +0000 Commit: Eric van Gyzen CommitDate: 2022-03-02 21:56:30 +0000 Fix lockstat:::thread-spin dtrace probe with LOCK_PROFILING The spinning start time is missing from the calculation due to a misplaced #endif. Return the #endif where it's supposed to be. Submitted by: Alexander Alexeev Reviewed by: bdrewery, mjg MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D31384 (cherry picked from commit 428624130abfc225b479a09a3060d0939569b1ea) --- sys/kern/kern_mutex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 54a96603ece3..6343ad445623 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -899,6 +899,8 @@ thread_lock_flags_(struct thread *td, int opts, const char *file, int line) doing_lockprof = 1; #elif defined(KDTRACE_HOOKS) doing_lockprof = lockstat_enabled; +#endif +#ifdef KDTRACE_HOOKS if (__predict_false(doing_lockprof)) spin_time -= lockstat_nsecs(&td->td_lock->lock_object); #endif