From mboxrd@z Thu Jan 1 00:00:00 1970 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 A6AA018FDDE for ; Fri, 28 Nov 2025 03:50:29 +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=1764301829; cv=none; b=fsZ72544iBRv9qLpPMZXuVcaPCwGGI5bw3bTCGvJ0+LabfHeg0XpOJu5Yzxr8CpUY7tj4xQWFQwTnMism1fQsjNqhDcEKFcp39l+xdJ4HBkhBXFZ7m+Bdfz3wbdFv5H6ivQdDMPWCNB2HsmhpZ3Mn16koVLzymkV7ccborNf/KQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764301829; c=relaxed/simple; bh=aoFib6Uz9Kr8raRi942VeTsQtGNE5GmzKR0u+9HdGN8=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=FRaJs+gq2hyTa2dFcxULqqUrkfWNr+rZUpg5LLO9BDTCRcjlR8MUblyFSGjQALxgrewhF0YmWslZjhwAsXVTQZAaCJc0hf773OEpXtgWyW0JhsjBaRJ2jXdmoWSxx+RZnZ6SYDThgCmjxhGXFb7R3Z6QOW1pEwchNOy/2lRtRk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PXQlKjMS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PXQlKjMS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4B55C4CEF1; Fri, 28 Nov 2025 03:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764301829; bh=aoFib6Uz9Kr8raRi942VeTsQtGNE5GmzKR0u+9HdGN8=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=PXQlKjMSuNTbjN70MqmyMtJqkAuuWC3JMt848anEFG7aR0uDcv2T0OJPTzxK7Jxcs yP3CGPDs3+fy4x2KMB9SDa93ULmvZM8ufggX9s4Fk+qpdbryyhjrBzqrwc0dYejUIG NgZ9WoLLx57W60zMqmxDj8oLwopGd/01h7elytPx+38y5PJgH/8NCQg1+gx42R6kgQ Zp93ujiR2z6Bp4qAzDQM9A8ZssMv5YV0mJMCLlb73MxvnzNhVRc13SoDJ2EXHzlulD xnV0wEcc9GfEq48BWAms7urYirAEkWLQV819Y7rbFUmw0ghCkzLS/wF3rKpQpp3LKy gs2tsbSmrugqw== Message-ID: Date: Fri, 28 Nov 2025 11:50:25 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] f2fs: optimize trace_f2fs_write_checkpoint with enums To: YH Lin References: <20251128032509.825003-1-yhli@google.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20251128032509.825003-1-yhli@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/28/25 11:23, YH Lin wrote: > This patch optimizes the tracepoint by replacing these hardcoded strings > with a new enumeration f2fs_cp_phase. > > 1.Defines enum f2fs_cp_phase with values for each checkpoint phase. > 2.Updates trace_f2fs_write_checkpoint to accept a u16 phase argument > instead of a string pointer. > 3.Uses __print_symbolic in TP_printk to convert the enum values > back to their corresponding strings for human-readable trace output. > > This change reduces the storage overhead for each trace event > by replacing a variable-length string with a 2-byte integer, > while maintaining the same readable output in ftrace. > > Signed-off-by: YH Lin Reviewed-by: Chao Yu Thanks,