From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Jason Baron <jbaron@akamai.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
netdev@vger.kernel.org
Subject: [PATCH 03/22] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited
Date: Thu, 20 Sep 2018 00:04:25 +0200 [thread overview]
Message-ID: <20180919220444.23190-4-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20180919220444.23190-1-linux@rasmusvillemoes.dk>
net_dbg_ratelimited tests the dynamic debug descriptor the old-fashioned
way, and doesn't utilize the static key/jump label implementation on
architectures that HAVE_JUMP_LABEL. Use the DYNAMIC_DEBUG_BRANCH which
is defined appropriately.
Cc: netdev@vger.kernel.org
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
include/linux/net.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index e0930678c8bf..651fca72286c 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -263,7 +263,7 @@ do { \
#define net_dbg_ratelimited(fmt, ...) \
do { \
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
- if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
+ if (DYNAMIC_DEBUG_BRANCH(descriptor) && \
net_ratelimit()) \
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
##__VA_ARGS__); \
--
2.16.4
next prev parent reply other threads:[~2018-09-19 22:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 22:04 [PATCH 00/22] various dynamic_debug patches Rasmus Villemoes
2018-09-19 22:04 ` Rasmus Villemoes [this message]
2018-09-19 22:04 ` [PATCH 04/22] linux/net.h: use unique identifier for each struct _ddebug Rasmus Villemoes
2018-09-20 8:05 ` [PATCH 00/22] various dynamic_debug patches Rafael J. Wysocki
2018-10-03 9:25 ` Rafael J. Wysocki
2018-09-22 0:27 ` Jason Baron
2018-10-09 11:19 ` [PATCH v2 00/23] " Rasmus Villemoes
2018-10-09 11:19 ` [PATCH v2 03/23] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited Rasmus Villemoes
2018-10-09 11:19 ` [PATCH v2 04/23] linux/net.h: use unique identifier for each struct _ddebug Rasmus Villemoes
2018-10-10 9:37 ` [PATCH v2 00/23] various dynamic_debug patches Rafael J. Wysocki
2018-11-09 23:09 ` [PATCH v3 " Rasmus Villemoes
2018-11-09 23:10 ` [PATCH v3 03/23] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited Rasmus Villemoes
2018-11-09 23:10 ` [PATCH v3 04/23] linux/net.h: use unique identifier for each struct _ddebug Rasmus Villemoes
2018-11-09 23:22 ` Joe Perches
2018-11-09 23:31 ` Rasmus Villemoes
2019-02-12 21:41 ` [PATCH v4 00/14] various dynamic_debug patches Rasmus Villemoes
2019-02-12 21:41 ` [PATCH v4 02/14] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180919220444.23190-4-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).