Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp44999lqt; Wed, 5 Jun 2024 16:45:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHb83GbtQkBpV6beuTyB0+cEqW2K56Hj1stLuWLxkIvf9c6wMl+0vBnW2h5hcKXPYlyDHhFCkMpJ6isIDxGJ4lIS0/vUA98NpiiOlD6g== X-Google-Smtp-Source: AGHT+IH5NJs8LTFqb4F4oJvrSU+9CrUwgZPvtex6DSK7u8bobM5Sm1tEh+tOzhOpYdiPyJaYjfIw X-Received: by 2002:a17:906:f6d4:b0:a68:fa24:9e82 with SMTP id a640c23a62f3a-a699f67e833mr261670166b.38.1717631117035; Wed, 05 Jun 2024 16:45:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717631117; cv=pass; d=google.com; s=arc-20160816; b=KVc7SDJkFHvxRR4BAkr3ZKfrHb3rKJ4BZ0KQrfm4x7LJPX2mujVPv79sZ1TIT4T/8F KCzkr4tJlrEtbtGWmYzOLGNVi68jqb37dYl1ZaWrr5g3ohT+AdShTlfm5MyNOmK4YF8v ifmb8xG6+N8CPpxc+IWlrnJyUEa3lZZhK4AjFSb2+TSx/7HIDWR1DVfl0iVQFTK5MPFT MqVQDBl4oylKr9fPf7uYZOBHP+ihAoFJyWkxC4BOy/ZZZXhZP0+UgA/KjCvs+pjNRggI cGOhQzEn/QG4TdLhPKjwNSqKBlY6m6M7UUtr4YrnYFwhH9x7iQujeqiSPGG3OXmyXo5t 9iyw== 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:dkim-signature; bh=UyJ+VYQbiIvJTxHqxIJ9goTfxyi3yCasDYcAARPofMQ=; fh=r8cahHtk9ZY6RnB34WVZMxNAFZ6PJVA0hvtHgw/BniI=; b=fZIojtyiU0hFHhrloSWDqzPRrMVwkoNzgsMXRC+KXXvi81Ae6AInov2Md0Cr3Hf7zm U31+mSYEgKce8e43ReoZ3a/rmWJKDbpnktbFLsWMoSXOJ+oDlUT+e/4CLiObMAhIEnzg MQ0G+NWgIMvUG8/O2CkCUycPv+n1eKeWoUAR6cFxt0zDcxZBLIVdNHvicZM3YIrpcGHP dzdfoWeyw66T2TivSA4cOE4RFApiys3JKB+6ZO+VYOfdL2YbSF6MfAb9keUNnpXRYCIP oJ/FvRcKy8ioFbfLhYXHetX6e+rnwV8p9rAnfSP6QQPZXElayrww/UvMwrd2uPQG74mm DP8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QUoqOXff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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-a6c80581d92si5908566b.112.2024.06.05.16.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 16:45:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203417-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QUoqOXff; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 B5C7A1F2444C for ; Wed, 5 Jun 2024 23:45:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6181815FA9C; Wed, 5 Jun 2024 23:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QUoqOXff" 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 835301667C8; Wed, 5 Jun 2024 23:45:05 +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=1717631105; cv=none; b=sfaT1NwOCrWZAk/sV6bFfn8WkBMcbvKlld4JGUqnikr+gzFBktnvlu195P5YR91HfmHrPA4QhQIyAfdUQSwcj6d0fKO3Ho5wL3GN8r1r/mkdZXNwnOk8t0glHjadwF8VruPLbdoWqdbpLweAStpXxhbwhXnpRF/Uz97HzeBc/ic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717631105; c=relaxed/simple; bh=SxNOZQC6b6ULTjoVdRyoVNcIUDCX2H7/xrBVJ2m0CiU=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=AOtUGVa95nU0bXhs17ciP72zy5BfSPfZPlRcGRUqlQRe2VfZogCff8fnjAcU2NZh73cFJZjT5lTxHv49ETg/czbxKmH5Cve46Qzba7xDVbt4wzzZpUAr5sDK/FUY8YbAlPy1MTIYsaCDv8wMTA7pRkFAa3R85Uoo0EjT5WngW8I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QUoqOXff; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDDE1C2BD11; Wed, 5 Jun 2024 23:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717631104; bh=SxNOZQC6b6ULTjoVdRyoVNcIUDCX2H7/xrBVJ2m0CiU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QUoqOXfftlxdVJpBAQZ56H/YUZBhK9yA8rKZQFby3Pavo8j19QoUI9E0XxM+srCEv X0DpKrvtD4SIvVsJ+ILCCLV2CpOybfrtpnSn3hGJi1gbdBsmMG9eEIb7Nvj077PhcE vijfRTYA9saiGtlE7Fv8XJ/ghZUN5YLmKiCguFuLktK/n1Q0rKPPQTZZoxuBgpZTog cQYVLeo5GLpP3KWTW9wsa44Nk8kPxtXSpqVOjpOwP6I+o4J16OYtG0AFqwKMiPhqKb dNDrYXxynBMQFer23r+q/nWY4uSA/ShmWzXUZaeyYhZFRT3pkFYfuGJ1HWqbllwAcG k8FlZpYVS8SLg== Date: Thu, 6 Jun 2024 08:45:00 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: Re: [PATCH v2 0/5] ftrace: Clean up and comment code Message-Id: <20240606084500.134f52ee78cad21325cf982b@kernel.org> In-Reply-To: <20240605180334.090848865@goodmis.org> References: <20240605180334.090848865@goodmis.org> X-Mailer: Sylpheed 3.7.0 (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, 05 Jun 2024 14:03:34 -0400 Steven Rostedt wrote: > 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. > This series looks good to me. Acked-by: Masami Hiramatsu (Google) for this series. Thanks! > 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(-) -- Masami Hiramatsu (Google)