Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp402796lqr; Wed, 5 Jun 2024 09:12:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWNQTx9DjkwE/LcMcT7caWHeG9/OzGL0WnxBxbyVInKQK0xPcNl6/Tm+HUZTgQd8wQn62fA9H4m970Eio/Ups7Q9xdHSk1xfitddG/tFA== X-Google-Smtp-Source: AGHT+IFucu34FQjDtCMgvQrcfgCITcTCWzWP+VYmkfTsme+X713vINDbnEgEfBULRYIfaWjMIqyS X-Received: by 2002:a17:906:1853:b0:a68:e162:66e0 with SMTP id a640c23a62f3a-a699fac56c7mr178930666b.38.1717603977133; Wed, 05 Jun 2024 09:12:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717603977; cv=pass; d=google.com; s=arc-20160816; b=SSABXg8hHRxqoHuotiFCxDconsvYsFVWj8sAzSib00/KIuexwzfX/IvdDWVSVoCBrp 6Xgc7Epy7GZ5BO2mel7q+jXpps2ILxlgC8cPJZw9LLeMit75CwN/6DZLhWv0MCQxkMx3 tIEAupJH7xO6UMyz052ACJvak6iUn2NGJk6NHQokGGffFIPSlNM4k6UGnGUKojhflyd2 SuWd80dADUcU9tsfZecd+KSDiuVuP+t4SXgVoIn+cGfrSx70PcwfI3WW6t0QVWt0ZJkt Lz53pYxWHXeHUj7ifGmOIdhx3pVifUtrOtNu2weSqB4HwkQGlatQddWMVUYI9IpcHv2g 7G4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=Zqh/wEwPNAlxwzFpi35Y9pHsxSVasN+cvatcJIdvoog=; fh=WdJTzcKHC8ktk8y0U/4EQuOcdeMySvxPUHN4GuE6Cms=; b=llRuw73Oi3byaOLWQCp207OCMQwSgk/xQ+Jzxr8zPM0+nBqsQraBn7VBeDHvks0CUF Js6V29SrctHHlujlHg6WvB0/fa5n1VWfvd2r7UaAfrkaCoW/+qHWsCxwGZdWwVeUIToz Hs4u4g4vW/0i0WqlFNUuHfy7uU6vjNo2EWWyLtzE6r4uHx8DUWSSUJeizdlTA/S7nXsZ wHqORhQCvkIJBIZXUhNjjpEW4cRt61jvJZQ+NSyTH1NVsgFCrM6EFuhDYxxBtGFAQY9q m+ctyHSxNMosElhiaIC5L0Vw8k5lDzStnHtJ+wAamM9gzPv6np5aAMVH7h+CHsiXqRne o1BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-202885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202885-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6919dac4dasi291837966b.811.2024.06.05.09.12.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:12:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-202885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202885-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 D84981F293D2 for ; Wed, 5 Jun 2024 16:07:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A318914EC78; Wed, 5 Jun 2024 16:06:59 +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 287C84779F; Wed, 5 Jun 2024 16:06:59 +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=1717603619; cv=none; b=GzkMTYGdW+01TTIzGExlKnPZFe8GGjQObmb9dvNErR6cAtq5gL+UWbSHIPKj2fAiR7pn4HHmEdQRQoavEKSGbHZ0Rjb9t0D65Rk7hq2I/IgFutURlp4scenCm97DtNqidJQP+7BrjwyJJZKji9LfkctbQBcEUbvoueGaiELhiWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717603619; c=relaxed/simple; bh=vtOGMKyFj/QGvV0AXX6doQAz9IlpRaSa50akhCpLhgE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Of5R8PQ58j3Gfi//5VK64jb06jRmQRxrnM/4REMnFEPnsMwk9Myu7yG4jkFKdSMXH/Xgq3upjk8QSwirCK0yR5VFuMix8f9TvVfC/GVkAqdmC+t2bXehF6ttDEEDPxwmBPF/puGEqQb7zARy8x3h/K3ubPpdFH5+sfEBA4xK2Pk= 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 10C12C3277B; Wed, 5 Jun 2024 16:06:57 +0000 (UTC) Date: Wed, 5 Jun 2024 12:06:57 -0400 From: Steven Rostedt To: Mark Rutland Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton Subject: Re: [PATCH 2/5] ftrace: Comment __ftrace_hash_rec_update() and make filter_hash bool Message-ID: <20240605120657.1c8938ee@gandalf.local.home> In-Reply-To: <20240605101832.09fb4211@gandalf.local.home> References: <20240604212817.384103202@goodmis.org> <20240604212854.725383717@goodmis.org> <20240605101832.09fb4211@gandalf.local.home> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 5 Jun 2024 10:18:32 -0400 Steven Rostedt wrote: > > > + * > > > + * @filter_hash: True if for the filter hash is udpated, false for the > > > + * notrace hash > > > > Typo: s/udpated/updated/ > > > > ... though I couldn't parse this regardless; maybe: > > > > @filter_hash: true to update the filter hash, false to update > > the notrace hash > > Sure. Actually, they are both wrong. Because I realized your's was not correct, I started describing it in more detail and realized it does basically the same thing (but differently) if filter_hash is set or not. I think it can be removed completely! I just tried it. I forced "filter_hash" to always be true, and all the tests worked just fine. This function is only to update the dyn_ftrace records when an ops is added or removed. It doesn't matter which filter is being used, as they are both necessary for the update. This will make that code a bit cleaner and simpler. Let me go and fix that first, and then add the documentation on top! This is what happens when you document your code :-p This code has been rewritten a few times. When it was first written, which filter was being changed may have been important. But now it is not. -- Steve