Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp7399rdb; Mon, 14 Aug 2023 08:04:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9MV0bIXp7FmU9yEEucEqKylfS+zD17k8GX26EqQWt9VhBTWdk7KNC40gAYE3dcfo8ABW1 X-Received: by 2002:a17:90a:ba84:b0:269:3cdb:4edf with SMTP id t4-20020a17090aba8400b002693cdb4edfmr6926931pjr.16.1692025441236; Mon, 14 Aug 2023 08:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692025441; cv=none; d=google.com; s=arc-20160816; b=wV/impJJY5GU3q/QeAySKmxZnsn6p5EdrzQ+YpQbM77jUxVwQFwSgShfzzOvi+Ty94 5s7QGyUrlS4bYPQWd+jJLpojYlqLCSeab51qxrUaGEEgA9ZkLrgD+05nqBDUXBlF6VUF T3qEa6naHoCfufoqknr2x5tByr6FZNBbwxYqPi9bB96hRR/ipxr3PJ4kYC57KTujz217 0j0a4bXb22JmuM3cEheMI2yFdk0ddH0+Zqmv5FNECPCObUtrpqZCpro4yYUVPveYN9fn jFTeZ5s8jn2U/RA1zVYFP82ywnP1k2dCS9PVMcK1dbg/NGSiex8gGANVgNAnCPn2MjE/ oFdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yN4IRHtgPzQhWVs7VwhIu96MliPdEXFxMpapDAGVEgU=; fh=s3R7bBjC29vabrI5IcdKpVg+0E40ZQCiPtUvMzJrxcw=; b=HWgKCRIfMwPveUqykCay5qDyscos4B7lqZacV4pwBYvAoFa6XkyT6SFg0swBPf/4Bu r7W0qywjCIs36nzWCUSY44P84OCadVu3v2uJ5Mcl3VW4RY9DMVVmU8sEpwXFPutlDlR9 TmeqdA6mQ6Yw+9cMgN5bHeobxd11C3PXlSaP8yvppvH+PnUkRL9khUJeUnDbKgwqX3VG Ke6QBQyZdEIiffWLYA9T9r5JIOihAZAlXyA1aVf/Xa1/dvyE3UGtPsdsRoc0elQJvd4Y VlUSQ6OTFI6LRCuTHnR5BXl60xhY18BWyBpQEkOCBD+K+fWVEWdoMVrI79QMiWtFCBi/ nk0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls4-20020a17090b350400b00267f33cf006si10857749pjb.67.2023.08.14.08.03.46; Mon, 14 Aug 2023 08:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231577AbjHNOjV (ORCPT + 99 others); Mon, 14 Aug 2023 10:39:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232483AbjHNOjT (ORCPT ); Mon, 14 Aug 2023 10:39:19 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3CF4FB; Mon, 14 Aug 2023 07:39:18 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0A031063; Mon, 14 Aug 2023 07:40:00 -0700 (PDT) Received: from e126311.manchester.arm.com (unknown [10.57.65.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A3DAF3F64C; Mon, 14 Aug 2023 07:39:16 -0700 (PDT) Date: Mon, 14 Aug 2023 15:39:02 +0100 From: Kajetan Puchalski To: Douglas RAILLARD Cc: Jaegeuk Kim , Chao Yu , Steven Rostedt , Masami Hiramatsu , "open list:F2FS FILE SYSTEM" , "open list:TRACING" , "open list:TRACING" , jstultz@google.com, qyousef@google.com, lukasz.luba@arm.com Subject: Re: [PATCH] f2fs: Fix f2fs_truncate_partial_nodes ftrace event Message-ID: References: <20230306122549.236561-1-douglas.raillard@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 14, 2023 at 02:32:53PM +0100, Kajetan Puchalski wrote: > On Mon, Mar 06, 2023 at 12:25:49PM +0000, Douglas RAILLARD wrote: > > From: Douglas Raillard > > > > Fix the nid_t field so that its size is correctly reported in the text > > format embedded in trace.dat files. As it stands, it is reported as > > being of size 4: > > > > field:nid_t nid[3]; offset:24; size:4; signed:0; > > > > Instead of 12: > > > > field:nid_t nid[3]; offset:24; size:12; signed:0; > > > > This also fixes the reported offset of subsequent fields so that they > > match with the actual struct layout. > > > > > > Signed-off-by: Douglas Raillard > > --- > > include/trace/events/f2fs.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h > > index 31d994e6b4ca..8d053838d6cf 100644 > > --- a/include/trace/events/f2fs.h > > +++ b/include/trace/events/f2fs.h > > @@ -512,7 +512,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes, > > TP_STRUCT__entry( > > __field(dev_t, dev) > > __field(ino_t, ino) > > - __field(nid_t, nid[3]) > > + __array(nid_t, nid, 3) > > __field(int, depth) > > __field(int, err) > > ), > > -- > > 2.25.1 > > Hi, > > Just wanted to flag that I noticed this breaks Perfetto tracing on > Android, at least as of Android 13. I'm not sure if it's been fixed in newer > versions. Looks like the version of Perfetto in Android 13 is expecting > the previous (ie broken) field format to be there and its entire ftrace > collector fails as a result: > > E/perfetto( 3532): ranslation_table.cc:133 Failed to infer ftrace field type for "f2fs_truncate_partial_nodes.nid" (type:"nid_t nid[3]" size:12 signed:0) (errno: 2, No such file or directory) > I/perfetto( 3640): probes.cc:65 Hard resetting ftrace state. > > For my own purposes I just reverted these two: > * 0b04d4c0542e8573a837b1d81b94209e48723b25 (f2fs: Fix f2fs_truncate_partial_nodes ftrace event) > * f82e7ca019dfad3b006fd3b772f7ac569672db55 (tracing: Error if a trace event has an array for a __field() > > and now it works fine so not the biggest deal but this should probably > be addressed, I imagine more likely on the Perfetto side. Added context here, it is just caused by the parser implementation in Perfetto being pretty lacking: https://github.com/google/perfetto/blob/c36c70c1d4a72eafdd257f7a63e55f49fbc3df3d/src/traced/probes/ftrace/proto_translation_table.cc#L255