Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2581373rdg; Mon, 14 Aug 2023 07:09:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqgw2MHq5ZlJBkoXD+7LAnNtmAHx5PPWcy12r+GMIbu4xsZ3/iTC9hNKQXmyE4OrC5LJzu X-Received: by 2002:a17:906:9ca:b0:99c:441:ffa with SMTP id r10-20020a17090609ca00b0099c04410ffamr8007467eje.29.1692022154232; Mon, 14 Aug 2023 07:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692022154; cv=none; d=google.com; s=arc-20160816; b=ePNQi37xnr3uyRWlvKGDUrINSXyGZEquzBVOWNCGpllVJxZ2jWZRF4JtPsf2lxHXjs Uue3k7SeR0mDMnA3XRmtUsmBOX3wLiET0zFIzgVWRYGnztgEwQN6tyNlkCD6a9mLWOeD GSZJUPA2r8AGv7hvDCHUKXrHw1v92wRt+EJhJiEThfwigek4WYr09iMNIGMoQ4jBwi+6 jSmW4EH7PiX/x7Q1Q0OAYM9Jva0m9PeJ7/RU14XMdvnzby0sMryaNkie8j66+VXFbHvt wkr2vYx/RgtsCaW7DHyeUloGTa7jMOimMwBoggfWekpvmXsIARYBtEbrYPqQNTh6XxAz reJQ== 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=xOjM+hO8JQrDabRwFR+8mYcWjRxFX/iJn8c7xvz8SNI=; fh=s3R7bBjC29vabrI5IcdKpVg+0E40ZQCiPtUvMzJrxcw=; b=qdTSnn69Wo5GyG7IZ4MLqCMEE+aFBzcHgHl7Et95I4Ap8Ss7qswqRc+pfIBVm+CX3L A9ziRdiQMBKUhljorXCWPO19Ktzf8N8cN8ZiyDZw5TttrNQnLh6ZtROU+Vbt6C3O9Vro QGMAqvwThfxMg/PBdZF0sRfuiZH+Hwu6AHuCwsGUlExiz0tgUmkAV9gZEwlvkSt4S463 zd+CjVSsd3iEW1uvT6ezgjqy1OMvksisaRZr9ttJKI7zoylyHRhWHdqpwfQ2b9QD/n6j Ldp15tMtMm01J+E79qnB1ZX4yby0F90+9zOM11Cl5Bxi36YeLi86MbZrmCnp37c2Kssz yn4g== 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 lx14-20020a170906af0e00b00997e79e646esi8077657ejb.557.2023.08.14.07.08.49; Mon, 14 Aug 2023 07:09:14 -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 S231476AbjHNNdM (ORCPT + 99 others); Mon, 14 Aug 2023 09:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbjHNNdH (ORCPT ); Mon, 14 Aug 2023 09:33:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A1D3212D; Mon, 14 Aug 2023 06:33:06 -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 AC1A41063; Mon, 14 Aug 2023 06:33:48 -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 CD4CD3F64C; Mon, 14 Aug 2023 06:33:03 -0700 (PDT) Date: Mon, 14 Aug 2023 14:32:48 +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: <20230306122549.236561-1-douglas.raillard@arm.com> 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, 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.