RE: [PATCH v4 3/6] cxl/events: Update General Media Event Record to CXL spec rev 3.1

From: Shiju Jose
Date: Thu Nov 28 2024 - 05:01:51 EST


>-----Original Message-----
>From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>Sent: 27 November 2024 18:34
>To: Shiju Jose <shiju.jose@xxxxxxxxxx>
>Cc: dave.jiang@xxxxxxxxx; dan.j.williams@xxxxxxxxx; Jonathan Cameron
><jonathan.cameron@xxxxxxxxxx>; alison.schofield@xxxxxxxxx;
>nifan.cxl@xxxxxxxxx; vishal.l.verma@xxxxxxxxx; ira.weiny@xxxxxxxxx;
>dave@xxxxxxxxxxxx; linux-cxl@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>Linuxarm <linuxarm@xxxxxxxxxx>; tanxiaofei <tanxiaofei@xxxxxxxxxx>;
>Zengtao (B) <prime.zeng@xxxxxxxxxxxxx>
>Subject: Re: [PATCH v4 3/6] cxl/events: Update General Media Event Record to
>CXL spec rev 3.1
>
>On Wed, 27 Nov 2024 18:20:26 +0000
>Shiju Jose <shiju.jose@xxxxxxxxxx> wrote:
>
>> I tested removing hdr_uuid and region_uuid from the rasdaemon test
>> setup as you suggested. As a result, libtraceevent parses correctly, as you
>mentioned.
>>
>> However, I encounter similar parsing error ("FAILED TO PARSE") when I
>> add two additional decoded strings (%s) to the TP_printk, replacing
>> (%u). Please see the attached format file,
>"format_cxl_general_media_v3.1_basic", for your reference.
>
>Are you sure. I don't see anything wrong with that one. Which version of
>libtraceevent do you have?

libtraceevent source code version 1.8.4, build for arm64.

>
>>
>> I've also attached another format file,
>> "format_cxl_general_media_v3.1_full",
>> which contains the complete TP_printk() intended.
>
>This one has some complex arguments and also uses the '&' address of an
>argument.
Thanks.
I will debug this when basic one is working.
>
>>
>> Can you please help or else can you share how to debug these errors in
>> the libtraceevent setup?
>
>Basically, I use the attached program (that just links to libtraceevent).
>
>Note, I need to delete the first line of your files, which has the "cat"
>command. But you can run this on the file itself:
>
> ./tep_load_event /sys/kernel/tracing/events/cxl/cxl_general_media/format
>
>But you may need to be root to do that. If root just copies that file, you can then
>run it as non-root.
>
> # cp /sys/kernel/tracing/events/cxl/cxl_general_media/format /tmp $
>./tep_load_event /tmp/format
>
>I run it under gdb and see where it fails. But it should let you know if it will pass
>or not. I put a breakpoint on tep_warning and when it gets hit, I examine what it
>did up to that point.

Thanks Steve for the instructions. I will try this.
>
>-- Steve

Thanks,
Shiju