[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220317120753.4cd73f9e@gandalf.local.home>
Date: Thu, 17 Mar 2022 12:07:53 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Byungchul Park <byungchul.park@....com>,
paulmck <paulmck@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Radoslaw Burny <rburny@...gle.com>,
linux-arch <linux-arch@...r.kernel.org>,
bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH 1/2] locking: Add lock contention tracepoints
On Thu, 17 Mar 2022 09:32:55 -0400 (EDT)
Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:
> Unless there is a particular reason for using preprocessor defines here, the
> following form is typically better because it does not pollute the preprocessor
> defines, e.g.:
>
> enum lock_contention_flags {
> LCB_F_SPIN = 1U << 0;
> LCB_F_READ = 1U << 1;
> LCB_F_WRITE = 1U << 2;
> LCB_F_RT = 1U << 3;
> LCB_F_PERCPU = 1U << 4;
> };
If you do this, then to use the __print_flags(), You'll also need to add:
TRACE_DEFINE_ENUM(LCB_F_SPIN);
TRACE_DEFINE_ENUM(LCB_F_READ);
TRACE_DEFINE_ENUM(LCB_F_WRITE);
TRACE_DEFINE_ENUM(LCB_F_RT);
TRACE_DEFINE_ENUM(LCB_F_PERCPU);
Which does slow down boot up slightly.
-- Steve
Powered by blists - more mailing lists