Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4806098rwb; Tue, 8 Aug 2023 14:18:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEubzIGvQB/9BV2ggUSYGAhFbgPYQub8YP4lSQW1detQ4aOgOsIN0uRZTep0LfCniZw1DRo X-Received: by 2002:a05:6512:48d1:b0:4f8:72b6:eae with SMTP id er17-20020a05651248d100b004f872b60eaemr468863lfb.40.1691529533519; Tue, 08 Aug 2023 14:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691529533; cv=none; d=google.com; s=arc-20160816; b=na7cxeYI7xzsuzIghkrE4uqTARrSIi/JgDQaetccrQhiL7BjHUm4a2PNTvIVY5FMr0 5C/BjKCDm4EdwwAwZ87tblOb3oqL0OhdMNFiEvhpQDC5XGOX2y14zlTErdUSkV4FodsJ FCoZNQ4enUloYN3CmVJBbvUkxGjzUwK1wnJxCHGFpej5i9YBU8TjZ5CcJxcejurF9d+N gmwH+Ukszdc3nX1tU2yG2FHCMak+6Vji/C6lfk59FGGrtIvMP/Pc30q8pLGNp72ePDEy ILIY4J8B7HRC6enACg/l1YbfHwTAUTg68fSDRJ3rG+ZZqjALJI4VxLRumFdQn2jBWjuZ YGwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=zxCWxBW3UEp2oLO2mgH8jZNktyZJt7hCWqyymq2bZGU=; fh=HHOxFvNAY/sRwBv85R3+8vnCx7lB3AQqy6zyOspRuJ0=; b=0bj89vCIp7T8MqE/y7+1T7O9dOEm16UGWdqWL5FpdDMPFr1nECMRqV9VYTpAPRcmKV Ew0wILWKu+5GqVzjuCRxapU2+f0XsggLnWAmYrNydh/Su5f4tt1k7aw6LIm4CuzxeF/X 8sewvBFlaTFr3Re8aWgeRguu/nvmw0/lW4MbX6bfQ4Z9HZByHN0wywqMvYwrAat8422Z G8hlQVngm5K43RwHvhJRuieUFzzf1NP/Y1oSaebpcX8Ii26rLEbqQca8DXHNruRIMGEv FmVfA61uVZj4gDlcULQjinbIV3Qo3XaA/JGSf3ttoZ799PvzBkSYZSMIje7RHIetAWQO kksg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020aa7d30a000000b0052335cf1995si4392079edq.122.2023.08.08.14.18.26; Tue, 08 Aug 2023 14:18:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236382AbjHHVRN (ORCPT + 99 others); Tue, 8 Aug 2023 17:17:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236656AbjHHVRD (ORCPT ); Tue, 8 Aug 2023 17:17:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB864421E for ; Tue, 8 Aug 2023 13:05:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6994562C17 for ; Tue, 8 Aug 2023 20:05:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82A39C433C8; Tue, 8 Aug 2023 20:05:50 +0000 (UTC) Date: Tue, 8 Aug 2023 16:05:47 -0400 From: Steven Rostedt To: Sven Schnelle Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing/synthetic: use union instead of casts Message-ID: <20230808160547.59e6efd9@gandalf.local.home> In-Reply-To: References: <20230808142148.2652883-1-svens@linux.ibm.com> <20230808132726.08cabfbc@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS 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 Tue, 08 Aug 2023 19:33:06 +0200 Sven Schnelle wrote: > Steven Rostedt writes: > > > The "dynamic" I was using wasn't about the fields were dynamic (union), but > > because the field the offset/len combo represents is of dynamic size. It's > > used all over the trace_events code. > > > > I would have in include/linux/trace_events.h (right above struct trace_entry): > > > > /* Used to find the offset and length of dynamic fields in trace events */ > > struct trace_dynamic_info { > > #ifdef CONFIG_CPU_BIG_ENDIAN > > u16 offset; > > u16 len; > > #else > > u16 len; > > u16 offset; > > #endif > > }; > > > > And then it kernel/trace/trace.h: > > > > union trace_synthetic_field { > > u8 as_u8; > > u16 as_u16; > > u32 as_u32; > > u64 as_u64; > > struct trace_dynamic_info as_dynamic; > > }; > > Ok. > > > I could work on the part of the trace_dynamic_info if you want. > > Whatever you prefer. Should i update my patch and send it again, or do > you want to adjust it? > How quickly do you need it. I can hopefully start working on it this week. -- Steve