Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp478208lqr; Wed, 5 Jun 2024 11:19:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi8+eD2UVANb/mCFMvR+AbUuQNVEIzkNo4Gg+Nh1q5n9vzXmQpu+hwFp0LWgW71OvrCv8zvz+UnSDSg+c3AUmmETIK2+mTIleV3nVDsA== X-Google-Smtp-Source: AGHT+IGg6rwR/Q4BhMTrCZwvQHWxq1zIDGT8z8LMED9qnci+spO7nTKg7NCUkWOHN+ST+QFL8zGu X-Received: by 2002:a17:906:2808:b0:a59:9b75:b90 with SMTP id a640c23a62f3a-a699f34a886mr217009766b.2.1717611553510; Wed, 05 Jun 2024 11:19:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717611553; cv=pass; d=google.com; s=arc-20160816; b=hgoxXlF1X4vM5GDROozmVI8WZq6EIUJJgC96+0EAhLHQxo+jj/xcbWGNBY5tTpV7/D DaoPUeQET8yy0KVevOB7cK0rVhxSY5rryax487Uxf3/Mz1Bu31otudBXK9Nahyt8mPJf 8h9e76/OspboLRzNcrNtHrtXXBb+/mKggZ6/c2TRNyGZueh3xHsp+vmW/mooKXBr5OC5 ZXo3qrWLpoS3IKSxdNbJwXm7X32i8j5LlZXC655vY7Al2aYrI7v4EXKSP7Dao9IvwHUV rhzZS70+RpKeQjxUacGmlWNReGsfgTfw3yVGdszZweOB/w9A1w3e960F0uw6pOKEaKct oL0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :from:date:user-agent:message-id; bh=2lcejm1lZI/YzFaX8J84DLO7Da7BdybDZk8OfP9y170=; fh=mjDKelfe6UwtrbrQsWTm6mHxXqJJm1yC7XMGoQRRIY8=; b=K3UFmdBRsXKl4NdBfQuPBlyZfdylUTbjR2OqCGj1DYad7pDcU0UXKn/MDyQAsZzPSZ Cxj5cv4qD0T3yXlzFpJiWbpBmW9jUKHxsxF++YhfoJkk56llHjUPusmOeOvO1eNTxXer I0umnEC0A5vYASBz6zlxYqEBOLaBNAjWdBBglzv5jPN8BzdZu8xWZCvGaHhMUe5nWSXU SYjSqf/1UenI1sA/TGZkZy37xhMjQzyLa0R0+UEl64coMiojmGuYNHxqWuurhFKAf5Hb XE6R5ZnZSgXQIxhA/LwCRlAEyeN5Qu43RoCacGwqvEAVXl87Dh3rY9uN+7CxMlVD5/61 Jfaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203027-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a690133656fsi368120466b.706.2024.06.05.11.19.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203027-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203027-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6A71D1F28B7A for ; Wed, 5 Jun 2024 18:09:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE8D9376E5; Wed, 5 Jun 2024 18:04:06 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 294F13D6D; Wed, 5 Jun 2024 18:04:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610646; cv=none; b=X9roJ8w4N9CKD11Ku+eDSNUBa0sKbyvmo6tUmkjleI44m0Qrl6/6tHN6w3MSsyOcGqGJuFDIlzGsPYfAVW3zwbX2rRlwkV1pVaFQjtdt3xQfaD9nBriyfxpMGdZAWSPwUQEcLXkDZ6MIeFRQGOz5Ew8hfS9uKOkGPiwtK5ktn08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610646; c=relaxed/simple; bh=9yR0XEQQEdf4s5ZmU8jszCt8FZnCPOcIQqw773lKx6c=; h=Message-ID:Date:From:To:Cc:Subject; b=fsO1ozGolUiucMLrBFOSxOUC4TxyVjUZ3gXXolGGCJbxKqUghhCZar9AXthZH9kmgeEIkWRPZmTjLGH08gI1OdwQCkvoplaxTgOBbRubbmeY/BP4b1pGxg7I89fOsGYY+mv5tJSH+dRX9BTfrnKxe0ukBixEBHqqD0lU2we73MA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0AA3C32781; Wed, 5 Jun 2024 18:04:05 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sEuzY-00000000hWW-283G; Wed, 05 Jun 2024 14:04:08 -0400 Message-ID: <20240605180334.090848865@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 05 Jun 2024 14:03:34 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [PATCH v2 0/5] ftrace: Clean up and comment code Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: While working on the function_graph multiple users code, I realized that I was struggling with how the ftrace code worked. Being the author of such code meant that it wasn't very intuitive. Namely, the function names were not descriptive enough, or at least, they needed comments. This series moves to solve some of that via changing a couple function names and parameters and adding comments to many of them. There's more to do, but this at least moves it in the right direction. Changes since v1: https://lore.kernel.org/all/20240604212817.384103202@goodmis.org/ - While working on v1 and responding to a comment from Mark Rutland about the usage of "ftrace_hash" in the __ftrace_hash_rec_update() code, I realized that the function does pretty much the same thing if it is set or not set (but slightly differently). It turns out that it isn't needed and that parameter can be removed, making the code simpler. - Fixed some wording and typos suggested by Mark Rutland. Steven Rostedt (Google) (5): ftrace: Rename dup_hash() and comment it ftrace: Remove "ftrace_hash" parameter from __ftrace_hash_rec_update() ftrace: Add comments to ftrace_hash_rec_disable/enable() ftrace: Convert "inc" parameter to bool in ftrace_hash_rec_update_modify() ftrace: Add comments to ftrace_hash_move() and friends ---- kernel/trace/ftrace.c | 161 +++++++++++++++++++++++++++++--------------------- 1 file changed, 94 insertions(+), 67 deletions(-)