[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113161044.43bc1c1a@gandalf.local.home>
Date: Wed, 13 Jan 2021 16:10:44 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alexander Potapenko <glider@...gle.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Marco Elver <elver@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Ingo Molnar <mingo@...hat.com>, Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
linux-mm@...ck.org
Subject: Re: [PATCH 1/4] tracing: add error_report trace points
On Wed, 13 Jan 2021 10:16:54 +0100
Alexander Potapenko <glider@...gle.com> wrote:
> +DECLARE_EVENT_CLASS(error_report_template,
> + TP_PROTO(const char *error_detector, unsigned long id),
Instead of having a random string, as this should be used by a small finite
set of subsystems, why not make the above into an enum?
> + TP_ARGS(error_detector, id),
> + TP_STRUCT__entry(__field(const char *, error_detector)
> + __field(unsigned long, id)),
> + TP_fast_assign(__entry->error_detector = error_detector;
> + __entry->id = id;),
> + TP_printk("[%s] %lx", __entry->error_detector,
Then the [%s] portion of this could also be just a __print_symbolic().
-- Steve
> + __entry->id));
> +
> +/**
Powered by blists - more mailing lists