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

From: Steven Rostedt
Date: Tue Nov 26 2024 - 12:03:51 EST


On Tue, 26 Nov 2024 11:51:23 +0000
Shiju Jose <shiju.jose@xxxxxxxxxx> wrote:

> We are encountering a parsing error ("FAILED TO PARSE") from libtraceevent when it
> tries to parse some of the CXL trace events for the user-space tool rasdaemon.
> This issue appeared after new fields were added to the trace events.
> It was found that the issue does not occur when all or some of the decoded strings
> for the event's data and flags are removed from the TP_printk() function in the kernel,
> and only the values are printed instead.
> https://elixir.bootlin.com/linux/v6.12/source/drivers/cxl/core/trace.h
> https://lore.kernel.org/lkml/20241120093745.1847-1-shiju.jose@xxxxxxxxxx/
>
> Below is the information from the debugging in libtraceevent:
> The failure occurs in the following functions and locations within libtraceevent:
> File: src/event-parse.c
> Function: event_read_format()
> ret = event_read_fields(event->tep, event, &event->format.fields); if (ret < 0)
> return ret;
>
> Function: event_read_fields()
> if (test_type_token(type, token, TEP_EVENT_ITEM, "field"))
> goto fail;
>
> Can you recognize if there are any limitations or issues that would prevent
> libtraceevent from parsing the trace event in the condition described above?

Can you show me the output of the format files for the affected trace events:

# cat /sys/kernel/tracing/cxl/<affected_event>/format

You can attach it too if your email does whitespace mangling.

Thanks,

-- Steve