From: Jim Cromie <jim.cromie@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Jason Baron <jbaron@akamai.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Aaron Tomlin <atomlin@atomlin.com>,
Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org, linux-modules@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Jim Cromie <jim.cromie@gmail.com>
Subject: [PATCH v2 24/24] dyndbg: improve section names
Date: Sat, 23 May 2026 01:14:57 -0600 [thread overview]
Message-ID: <20260523-dd-maint-2-v2-24-b937312aa083@gmail.com> (raw)
In-Reply-To: <20260523-dd-maint-2-v2-0-b937312aa083@gmail.com>
change __dyndbg to __dyndbg_descs
change __dyndbg_classes to __dyndbg_class_maps
this sets up for adding __dyndbg_class_users
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
include/asm-generic/dyndbg.lds.h | 14 +++++++-------
include/linux/dynamic_debug.h | 4 ++--
kernel/module/main.c | 2 +-
lib/dynamic_debug.c | 24 ++++++++++++------------
4 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/include/asm-generic/dyndbg.lds.h b/include/asm-generic/dyndbg.lds.h
index 9d8951bef688..ec661f9f3793 100644
--- a/include/asm-generic/dyndbg.lds.h
+++ b/include/asm-generic/dyndbg.lds.h
@@ -3,16 +3,16 @@
#define __ASM_GENERIC_DYNDBG_LDS_H
#include <asm-generic/bounded_sections.lds.h>
-#define DYNDBG_SECTIONS() \
- BOUNDED_SECTION_BY(__dyndbg, ___dyndbg) \
- BOUNDED_SECTION_BY(__dyndbg_classes, ___dyndbg_classes)
+#define DYNDBG_SECTIONS() \
+ BOUNDED_SECTION_BY(__dyndbg_descs, ___dyndbg_descs) \
+ BOUNDED_SECTION_BY(__dyndbg_class_maps, ___dyndbg_class_maps)
#define MOD_DYNDBG_SECTIONS() \
- __dyndbg 0 : ALIGN(8) { \
- KEEP(*(__dyndbg)) \
+ __dyndbg_descs 0 : ALIGN(8) { \
+ KEEP(*(__dyndbg_descs)) \
} \
- __dyndbg_classes 0 : ALIGN(8) { \
- KEEP(*(__dyndbg_classes)) \
+ __dyndbg_class_maps 0 : ALIGN(8) { \
+ KEEP(*(__dyndbg_class_maps)) \
}
#endif /* __ASM_GENERIC_DYNDBG_LDS_H */
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index fe73aa27b350..206337af71e9 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -128,7 +128,7 @@ struct _ddebug_class_param {
#define DECLARE_DYNDBG_CLASSMAP(_var, _maptype, _base, ...) \
static const char *_var##_classnames[] = { __VA_ARGS__ }; \
static struct _ddebug_class_map __aligned(8) __used \
- __section("__dyndbg_classes") _var = { \
+ __section("__dyndbg_class_maps") _var = { \
.mod = THIS_MODULE, \
.mod_name = KBUILD_MODNAME, \
.base = _base, \
@@ -168,7 +168,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
#define DEFINE_DYNAMIC_DEBUG_METADATA_CLS(name, cls, fmt) \
static struct _ddebug __aligned(8) \
- __section("__dyndbg") name = { \
+ __section("__dyndbg_descs") name = { \
.modname = KBUILD_MODNAME, \
.function = __func__, \
.filename = __FILE__, \
diff --git a/kernel/module/main.c b/kernel/module/main.c
index c2b6e70f2e77..bd7899a91755 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2774,7 +2774,7 @@ static int find_module_sections(struct module *mod, struct load_info *info)
pr_warn("%s: Ignoring obsolete parameters\n", mod->name);
#ifdef CONFIG_DYNAMIC_DEBUG_CORE
- mod->dyndbg_info.descs.start = section_objs(info, "__dyndbg_descriptors",
+ mod->dyndbg_info.descs.start = section_objs(info, "__dyndbg_descs",
sizeof(*mod->dyndbg_info.descs.start),
&mod->dyndbg_info.descs.len);
mod->dyndbg_info.maps.start = section_objs(info, "__dyndbg_class_maps",
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index b877f4c6d778..ce70cfee50c5 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -40,10 +40,10 @@
#include <rdma/ib_verbs.h>
-extern struct _ddebug __start___dyndbg[];
-extern struct _ddebug __stop___dyndbg[];
-extern struct _ddebug_class_map __start___dyndbg_classes[];
-extern struct _ddebug_class_map __stop___dyndbg_classes[];
+extern struct _ddebug __start___dyndbg_descs[];
+extern struct _ddebug __stop___dyndbg_descs[];
+extern struct _ddebug_class_map __start___dyndbg_class_maps[];
+extern struct _ddebug_class_map __stop___dyndbg_class_maps[];
struct ddebug_table {
struct list_head link;
@@ -1379,10 +1379,10 @@ static int __init dynamic_debug_init(void)
char *cmdline;
struct _ddebug_info di = {
- .descs.start = __start___dyndbg,
- .maps.start = __start___dyndbg_classes,
- .descs.len = __stop___dyndbg - __start___dyndbg,
- .maps.len = __stop___dyndbg_classes - __start___dyndbg_classes,
+ .descs.start = __start___dyndbg_descs,
+ .maps.start = __start___dyndbg_class_maps,
+ .descs.len = __stop___dyndbg_descs - __start___dyndbg_descs,
+ .maps.len = __stop___dyndbg_class_maps - __start___dyndbg_class_maps,
};
#ifdef CONFIG_MODULES
@@ -1393,7 +1393,7 @@ static int __init dynamic_debug_init(void)
}
#endif /* CONFIG_MODULES */
- if (&__start___dyndbg == &__stop___dyndbg) {
+ if (&__start___dyndbg_descs == &__stop___dyndbg_descs) {
if (IS_ENABLED(CONFIG_DYNAMIC_DEBUG)) {
pr_warn("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n");
return 1;
@@ -1403,11 +1403,11 @@ static int __init dynamic_debug_init(void)
return 0;
}
- iter = iter_mod_start = __start___dyndbg;
+ iter = iter_mod_start = __start___dyndbg_descs;
modname = iter->modname;
i = mod_sites = mod_ct = 0;
- for (; iter < __stop___dyndbg; iter++, i++, mod_sites++) {
+ for (; iter < __stop___dyndbg_descs; iter++, i++, mod_sites++) {
if (strcmp(modname, iter->modname)) {
mod_ct++;
@@ -1431,7 +1431,7 @@ static int __init dynamic_debug_init(void)
goto out_err;
ddebug_init_success = 1;
- vpr_info("%d prdebugs in %d modules, %d KiB in ddebug tables, %d kiB in __dyndbg section\n",
+ vpr_info("%d prdebugs in %d modules, %d KiB in ddebug tables, %d kiB in __dyndbg_descs section\n",
i, mod_ct, (int)((mod_ct * sizeof(struct ddebug_table)) >> 10),
(int)((i * sizeof(struct _ddebug)) >> 10));
--
2.54.0
prev parent reply other threads:[~2026-05-23 7:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 7:14 [PATCH v2 00/24] dynamic-debug cleanups refactors maintenance + alignment fix Jim Cromie
2026-05-23 7:14 ` [PATCH v2 01/24] docs/dyndbg: update examples \012 to \n Jim Cromie
2026-05-23 7:14 ` [PATCH v2 02/24] docs/dyndbg: explain flags parse 1st Jim Cromie
2026-05-23 7:14 ` [PATCH v2 03/24] vmlinux.lds.h: refactor BOUNDED_SECTION_* macros into bounded_sections.lds.h Jim Cromie
2026-05-23 7:14 ` [PATCH v2 04/24] vmlinux.lds.h: drop unused HEADERED_SECTION* macros Jim Cromie
2026-05-23 7:14 ` [PATCH v2 05/24] vmlinux.lds.h: Fix ALIGN(8) omission causing NULL ptr on i386 Jim Cromie
2026-05-23 7:14 ` [PATCH v2 06/24] vmlinux.lds.h: remove redundant ALIGN(8) directives Jim Cromie
2026-05-23 7:14 ` [PATCH v2 07/24] dyndbg.lds.S: fix lost dyndbg sections in modules Jim Cromie
2026-05-23 7:14 ` [PATCH v2 08/24] dyndbg: factor ddebug_match_desc out from ddebug_change Jim Cromie
2026-05-23 7:14 ` [PATCH v2 09/24] dyndbg: add stub macro for DECLARE_DYNDBG_CLASSMAP Jim Cromie
2026-05-23 7:14 ` [PATCH v2 10/24] dyndbg: reword "class unknown," to "class:_UNKNOWN_" Jim Cromie
2026-05-23 7:14 ` [PATCH v2 11/24] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code Jim Cromie
2026-05-23 7:14 ` [PATCH v2 12/24] dyndbg: drop NUM_TYPE_ARGS Jim Cromie
2026-05-23 7:14 ` [PATCH v2 13/24] dyndbg: reduce verbose/debug clutter Jim Cromie
2026-05-23 7:14 ` [PATCH v2 14/24] dyndbg: refactor param_set_dyndbg_classes and below Jim Cromie
2026-05-23 7:14 ` [PATCH v2 15/24] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap Jim Cromie
2026-05-23 7:14 ` [PATCH v2 16/24] dyndbg: replace classmap list with an array-slice Jim Cromie
2026-05-23 7:14 ` [PATCH v2 17/24] dyndbg: macrofy a 2-index for-loop pattern Jim Cromie
2026-05-23 7:14 ` [PATCH v2 18/24] dyndbg: Upgrade class param storage to u64 for 64-bit classmaps Jim Cromie
2026-05-23 7:14 ` [PATCH v2 19/24] dyndbg,module: make proper substructs in _ddebug_info Jim Cromie
2026-05-25 9:24 ` Petr Pavlu
2026-05-23 7:14 ` [PATCH v2 20/24] dyndbg: move mod_name down from struct ddebug_table to _ddebug_info Jim Cromie
2026-05-23 7:14 ` [PATCH v2 21/24] dyndbg: hoist classmap-filter-by-modname up to ddebug_add_module Jim Cromie
2026-05-23 7:14 ` [PATCH v2 22/24] selftests-dyndbg: add a dynamic_debug run_tests target Jim Cromie
2026-05-23 7:14 ` [PATCH v2 23/24] dyndbg: change __dynamic_func_call_cls* macros into expressions Jim Cromie
2026-05-23 7:14 ` Jim Cromie [this message]
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=20260523-dd-maint-2-v2-24-b937312aa083@gmail.com \
--to=jim.cromie@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=atomlin@atomlin.com \
--cc=corbet@lwn.net \
--cc=da.gomez@kernel.org \
--cc=jbaron@akamai.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.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