Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp972472pxb; Fri, 22 Apr 2022 15:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwJp2KkV06mrhPx8MFY2Z9AwELdOkEoIYkfymvELSh/cXnE2q/sRV7aU9bkL9efpDjoEdl X-Received: by 2002:a62:170b:0:b0:50a:6901:b633 with SMTP id 11-20020a62170b000000b0050a6901b633mr7294686pfx.34.1650667277834; Fri, 22 Apr 2022 15:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667277; cv=none; d=google.com; s=arc-20160816; b=UZ8Z5Ga/tExI8gbKsUzHGkpUjjgN3R59OBZ82hKPLLU0YazNuKVajypr7gVnzZ5fDl ON/M3vTGszeDlONUYhMEo4zWnEk4ZEGn4ZJna07MBuuKqQU9AoyylpQOC+rC9f0lDAkH v4e/Gyqqb6VOEfkdi8jDZj3F3vehWTeybaxXOLiwrF3SOJBvSWQ6xgvJm0yx7dVQUv4n fkjjjTtJjoPTvuF81LxRLQ1PhkPnbh/Z0IX0Qjc5w9SIbfNdp3yPyi1fjjPe6lwcEJYP ka7NFL/rU+4gwEjBfdjeypYNpa62N7YUIAxf2M0nikGjS74aoMU2ndTjccZfJ187sfy1 3jDw== 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=PZOqnLj9XYA2hAX80jlft80uxr5ehiDzAPX7l7SJPf8=; b=EFe7iSL02f777hOZPeDiRpW6pV5Yx60/GhL3aklRfRGu8IstFzD7Ys8k+jmwXjP6Di eXUkxkZryaAadBJuyKhFRW4wG+1GBH/IcqWERgPwcYbowshIYZGNO0EOwX9YhPa5dfZW U8KfhcYnzxA8n9tkyh8CtRb0wF3OSG39RTFSWhOiKTf250bt1We26cjFxG1AAHcdyJgv ecYN7Zjk7vu2tG3gbrOdY4kG8T6WhgkeASSVufy+TKfWo2aSUUAXWF5qW3HuktoxEwgI LkL/63fE9kJXHgwPe5LFGQZ1BHVIu+WNGAjY4eUHftacXWUtFKXcf/2SN/J4QVipBF5g /T3g== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id lw15-20020a17090b180f00b001d29e7b9168si12827755pjb.177.2022.04.22.15.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:41:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D86553D38AA; Fri, 22 Apr 2022 13:29:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385149AbiDUMon (ORCPT + 99 others); Thu, 21 Apr 2022 08:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385111AbiDUMol (ORCPT ); Thu, 21 Apr 2022 08:44:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A7A3193C; Thu, 21 Apr 2022 05:41:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F1A6B8245D; Thu, 21 Apr 2022 12:41:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D60C7C385A5; Thu, 21 Apr 2022 12:41:46 +0000 (UTC) Date: Thu, 21 Apr 2022 08:41:45 -0400 From: Steven Rostedt To: "Luck, Tony" Cc: "hdegoede@redhat.com" , "markgross@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "corbet@lwn.net" , "gregkh@linuxfoundation.org" , "andriy.shevchenko@linux.intel.com" , "Joseph, Jithu" , "Raj, Ashok" , "Williams, Dan J" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "patches@lists.linux.dev" , "Shankar, Ravi V" Subject: Re: [PATCH v3 10/11] trace: platform/x86/intel/ifs: Add trace point to track Intel IFS operations Message-ID: <20220421084145.3b0c3539@gandalf.local.home> In-Reply-To: References: <20220407191347.9681-1-jithu.joseph@intel.com> <20220419163859.2228874-1-tony.luck@intel.com> <20220419163859.2228874-11-tony.luck@intel.com> <20220420193839.6e9d810b@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (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=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Thu, 21 Apr 2022 04:26:39 +0000 "Luck, Tony" wrote: > >> +TRACE_EVENT(ifs_status, > >> + > >> + TP_PROTO(union ifs_scan activate, union ifs_status status), > > > > Really, you want to pass the structure in by value, so that we have two > > copies? One to get to this function and then one to write to the ring > > buffer? > > These "structures" are just bitfield helpers for a u64 that is passed into > WRMSR (in the case of activate) and received back from RDMSR in > the case of status. > > So this is really just a pair of u64 arguments, with the compiler handling > the bit field extractions into the ring buffer. I was just wondering if passing by reference would be better, but as you stated, they are just two u64 arguments. > > Here are the definitions: > > union ifs_scan { > u64 data; > struct { > u32 start :8; > u32 stop :8; > u32 rsvd :16; > u32 delay :31; > u32 sigmce :1; > }; > }; > > union ifs_status { > u64 data; > struct { > u32 chunk_num :8; > u32 chunk_stop_index :8; > u32 rsvd1 :16; > u32 error_code :8; > u32 rsvd2 :22; > u32 control_error :1; > u32 signature_error :1; > }; > }; > > Would it be better to do the bit extractions of the start/stop fields first? No, I'm just paranoid about passing structures / unions in by value and not reference. If you are fine with this, then I'm OK too. -- Steve