[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53a299d3cca6417d90d553e8399f834b@huawei.com>
Date: Wed, 27 Nov 2024 18:20:26 +0000
From: Shiju Jose <shiju.jose@...wei.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: "dave.jiang@...el.com" <dave.jiang@...el.com>, "dan.j.williams@...el.com"
<dan.j.williams@...el.com>, Jonathan Cameron <jonathan.cameron@...wei.com>,
"alison.schofield@...el.com" <alison.schofield@...el.com>,
"nifan.cxl@...il.com" <nifan.cxl@...il.com>, "vishal.l.verma@...el.com"
<vishal.l.verma@...el.com>, "ira.weiny@...el.com" <ira.weiny@...el.com>,
"dave@...olabs.net" <dave@...olabs.net>, "linux-cxl@...r.kernel.org"
<linux-cxl@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Linuxarm <linuxarm@...wei.com>, tanxiaofei
<tanxiaofei@...wei.com>, "Zengtao (B)" <prime.zeng@...ilicon.com>
Subject: RE: [PATCH v4 3/6] cxl/events: Update General Media Event Record to
CXL spec rev 3.1
Hi Steve,
Thanks for the quick reply.
Please find reply inline.
>-----Original Message-----
>From: Steven Rostedt <rostedt@...dmis.org>
>Sent: 27 November 2024 15:42
>To: Shiju Jose <shiju.jose@...wei.com>
>Cc: dave.jiang@...el.com; dan.j.williams@...el.com; Jonathan Cameron
><jonathan.cameron@...wei.com>; alison.schofield@...el.com;
>nifan.cxl@...il.com; vishal.l.verma@...el.com; ira.weiny@...el.com;
>dave@...olabs.net; linux-cxl@...r.kernel.org; linux-kernel@...r.kernel.org;
>Linuxarm <linuxarm@...wei.com>; tanxiaofei <tanxiaofei@...wei.com>;
>Zengtao (B) <prime.zeng@...ilicon.com>
>Subject: Re: [PATCH v4 3/6] cxl/events: Update General Media Event Record to
>CXL spec rev 3.1
>
>On Wed, 27 Nov 2024 10:12:12 +0000
>Shiju Jose <shiju.jose@...wei.com> wrote:
>
>> format:
>> field:unsigned short common_type; offset:0; size:2;
> signed:0;
>> field:unsigned char common_flags; offset:2; size:1;
> signed:0;
>> field:unsigned char common_preempt_count; offset:3; size:1;
> signed:0;
>> field:int common_pid; offset:4; size:4; signed:1;
>>
>> field:__data_loc char[] memdev; offset:8; size:4;
> signed:0;
>> field:__data_loc char[] host; offset:12; size:4; signed:0;
>> field:int log; offset:16; size:4; signed:1;
>
>> field:uuid_t hdr_uuid; offset:20; size:16; signed:0;
>
>New type for me ;-)
>
>> field:u64 serial; offset:40; size:8; signed:0;
>> field:u32 hdr_flags; offset:48; size:4; signed:0;
>> field:u16 hdr_handle; offset:52; size:2; signed:0;
>> field:u16 hdr_related_handle; offset:54; size:2; signed:0;
>> field:u64 hdr_timestamp; offset:56; size:8; signed:0;
>> field:u8 hdr_length; offset:64; size:1; signed:0;
>> field:u8 hdr_maint_op_class; offset:65; size:1; signed:0;
>> field:u8 hdr_maint_op_sub_class; offset:66; size:1;
> signed:0;
>> field:u64 dpa; offset:72; size:8; signed:0;
>> field:u8 descriptor; offset:80; size:1; signed:0;
>> field:u8 type; offset:81; size:1; signed:0;
>> field:u8 transaction_type; offset:82; size:1; signed:0;
>> field:u8 channel; offset:83; size:1; signed:0;
>> field:u32 device; offset:84; size:4; signed:0;
>> field:u8 comp_id[16]; offset:88; size:16; signed:0;
>> field:u64 hpa; offset:104; size:8; signed:0;
>> field:uuid_t region_uuid; offset:112; size:16; signed:0;
>> field:u16 validity_flags; offset:128; size:2; signed:0;
>> field:u8 rank; offset:130; size:1; signed:0;
>> field:u8 dpa_flags; offset:131; size:1; signed:0;
>> field:__data_loc char[] region_name; offset:132; size:4;
> signed:0;
>> field:u8 sub_type; offset:136; size:1; signed:0;
>> field:u8 cme_threshold_ev_flags; offset:137; size:1;
> signed:0;
>> field:u32 cme_count; offset:140; size:4; signed:0;
>>
>> print fmt: "memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb
>len=%d flags='%s' handle=%x related_handle=%x maint_op_class=%u
>maint_op_sub_class=%u : dpa=%llx dpa_flags='%s' descriptor='%s' type='%s'
>transaction_type='%s' channel=%u rank=%u device=%x validity_flags='%s'
>comp_id=%shpa=%llx region=%s region_uuid=%pUb sub_type=%u
>cme_threshold_ev_flags=%u cme_count=%u", __get_str(memdev),
>__get_str(host), REC->serial, __print_symbolic(REC->log, {
>CXL_EVENT_TYPE_INFO, "Informational" }, { CXL_EVENT_TYPE_WARN,
>"Warning" }, { CXL_EVENT_TYPE_FAIL, "Failure" }, { CXL_EVENT_TYPE_FATAL,
>"Fatal" }), REC->hdr_timestamp,
>
>
>> &REC->hdr_uuid,
>
>libtraceevent doesn't know about taking an address with '&'.
>
>If I remove it (and the other one below for region_uuid), it parses fine.
>
>I'll have to add this to the library, as it should be able to handle this.
>I bet I also have to add "%pUb" as well.
>
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.
I've also attached another format file, "format_cxl_general_media_v3.1_full",
which contains the complete TP_printk() intended.
Can you please help or else can you share how to debug these errors in the
libtraceevent setup?
>Thanks,
>
>-- Steve
>
Thanks,
Shiju
View attachment "format_cxl_general_media_v3.1_full.txt" of type "text/plain" (4999 bytes)
View attachment "format_cxl_general_media_v3.1_basic.txt" of type "text/plain" (4463 bytes)
Powered by blists - more mailing lists