Thread (7 messages) flat view 7 messages, 3 authors, 2021-01-15

Re: [PATCH 1/4] tracing: add error_report trace points

From: Alexander Potapenko <glider@google.com>
Date: 2021-01-15 12:54:40
Also in: lkml

Possibly related (same subject, not in this thread)

On Thu, Jan 14, 2021 at 3:52 PM Steven Rostedt [off-list ref] wrote:
On Thu, 14 Jan 2021 08:49:57 +0100
Alexander Potapenko [off-list ref] wrote:
quoted
We'll need to explicitly list the enum values once again in
__print_symbolic(), right? E.g.:

enum debugging_tool {
         TOOL_KFENCE,
         TOOL_KASAN,
         ...
}

TP_printk(__print_symbolic(__entry->error_detector, TOOL_KFENCE,
TOOL_KASAN, ...),
Usually what is done is to make this into a macro:

#define REPORT_TOOL_LIST \
  EM(KFENCE, kfence) \
  EMe(KASAN, kasan)
Thanks, will be done in v2!
Note that checkpatch doesn't really like this declaration style,
claiming that "Macros with complex values should be enclosed in
parentheses".
(although it is consistent with what's done in other trace event headers)
#define EM(a,b) TRACE_DEFINE_ENUM(a)
#define EMe(a,b) TRACE_DEFINE_ENUM(a)
These lines must end with a semicolon, according to other headers (and
that becomes yet another thing that checkpatch barks at).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help