[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76c527e3-b376-18df-bc93-f5a75e029d76@intel.com>
Date: Wed, 15 Feb 2023 13:18:20 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: "Joseph, Jithu" <jithu.joseph@...el.com>, hdegoede@...hat.com,
markgross@...nel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
gregkh@...uxfoundation.org, rostedt@...dmis.org,
ashok.raj@...el.com, tony.luck@...el.com,
linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
patches@...ts.linux.dev, ravi.v.shankar@...el.com,
thiago.macieira@...el.com, athenas.jimenez.gonzalez@...el.com,
sohil.mehta@...el.com
Subject: Re: [PATCH v2 4/7] platform/x86/intel/ifs: Implement Array BIST test
On 2/15/23 13:13, Joseph, Jithu wrote:
>
> On 2/15/2023 12:26 PM, Dave Hansen wrote:
>> On 2/15/23 12:22, Joseph, Jithu wrote:
>>> trace_ifs_array(cpu, *((u64 *)&before), *((u64 *)&command));
>> Uhh, you control the types in the tracepoint. Just make them compatible
>> so you don't need casts.
> will change it to:
> trace_ifs_array(cpu, before.array_bitmask, before.array_bank, *((u64 *)&command));
>
> i.e will pass compatible types for array_list and array_bank. And for the last argument, we need to dump the whole 64 bits within "command"
> into trace output . Since the suggested change replaced the union with a struct, it is simplest to cast it to u64 needed by traceoutput.
> So I would prefer to keep the cast for the last argument alone.
<sigh>
Your trace even can literally be:
+ TP_STRUCT__entry(
+ __field(struct ifs_foo, before )
+ __field(struct ifs_foo, after )
+ __field( int, cpu )
+ ),
and then you can just use structure assignment or a memcpy. *That* is
what I mean by compatible types.
But, also, I'm not sure these tracepoints even make any sense. You're
passing raw MSR contents back and forth. Why not just use the MSR
tracepoints? They'll give you the same data.
Powered by blists - more mailing lists