linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jim Cromie <jim.cromie@gmail.com>
To: linux-kernel@vger.kernel.org, jbaron@akamai.com,
	gregkh@linuxfoundation.org
Cc: david@redhat.com, lb@semihalf.com, linux@rasmusvillemoes.dk,
	joe@perches.com, mcgrof@kernel.org, Liam.Howlett@Oracle.com,
	linux-mm@kvack.org, Jim Cromie <jim.cromie@gmail.com>
Subject: [RFC PATCH 07/10] dyndbg: wire in __desc_*() functions
Date: Thu, 12 Oct 2023 13:48:31 -0600	[thread overview]
Message-ID: <20231012194834.3288085-8-jim.cromie@gmail.com> (raw)
In-Reply-To: <20231012194834.3288085-1-jim.cromie@gmail.com>

change desc_*() macros to call __desc_*() functions, and #if 0 the
comparisons to the site->_* ref.  This makes the _ddebug.site pointer
unneccesary.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 lib/dynamic_debug.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 48564625a37e..fb72a7b05b01 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -223,9 +223,9 @@ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_table cons
 	return NULL;
 }
 
-#define desc_modname(d)		(d)->site->_modname
-#define desc_filename(d)	(d)->site->_filename
-#define desc_function(d)	(d)->site->_function
+#define desc_modname(d)		__desc_modname(d)
+#define desc_filename(d)	__desc_filename(d)
+#define desc_function(d)	__desc_function(d)
 /*
  * tmp accessors, they cheat and seek a match in builtins.  Obviously
  * this wont work for loaded modules, but doesnt work at all yet.
@@ -235,11 +235,11 @@ static const char * __desc_function(struct _ddebug const *dp)
 	struct maple_tree *mt = &mt_funcs;
 
 	void *ret = mtree_load(mt, (unsigned long)dp);
-
+#if 0
 	if (ret != desc_function(dp))
 		pr_err("mt-load func %lx got %s want %s\n",
 		       (unsigned long)dp, (char*)ret, desc_function(dp));
-
+#endif
 	return ret;
 }
 
@@ -248,11 +248,11 @@ static const char * __desc_filename(struct _ddebug const *dp)
 	struct maple_tree *mt = &mt_files;
 
 	void *ret = mtree_load(mt, (unsigned long)dp);
-
+#if 0
 	if (ret != desc_filename(dp))
 		pr_err("mt-load file %lx got %s want %s\n",
 		       (unsigned long)dp, (char*)ret, desc_filename(dp));
-
+#endif
 	return ret;
 }
 
@@ -261,11 +261,11 @@ static const char * __desc_modname(struct _ddebug const *dp)
 	struct maple_tree *mt = &mt_mods;
 
 	void *ret = mtree_load(mt, (unsigned long)dp);
-
+#if 0
 	if (ret != desc_modname(dp))
 		pr_err("mt-load mod %lx got %s want %s\n",
 		       (unsigned long)dp, (char*)ret, desc_modname(dp));
-
+#endif
 	return ret;
 }
 
@@ -1441,7 +1441,7 @@ static void ddebug_condense_sites(struct _ddebug_info *di)
 	i = 0;
 	for (; i < di->num_descs; i++, cur_dd++, cur_ds++) {
 
-		BUG_ON(site_function(cur_ds) != desc_function(cur_dd));
+		//BUG_ON(site_function(cur_ds) != desc_function(cur_dd));
 
 		if (!strcmp(site_function(cur_ds), site_function(func_ds)))
 			continue;
-- 
2.41.0



  parent reply	other threads:[~2023-10-12 19:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 19:48 [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ? Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 01/10] dyndbg: prep to isolate 3 repetetive fields Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 02/10] dyndbg: split __dyndbg_sites section out from __dyndbg Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 03/10] dyndbg: add 2nd cursor pair to init-fn Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 04/10] dyndbg: save _ddebug_site mod,file,func fields into maple-trees Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 05/10] dyndbg: avoid _ddebug.site in ddebug_condense_sites Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 06/10] dyndbg: add site_*() macros to avoid using _ddebug.site Jim Cromie
2023-10-12 19:48 ` Jim Cromie [this message]
2023-10-12 19:48 ` [RFC PATCH 08/10] dyndbg: drop _ddebug.site member Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 09/10] dyndbg: add dd_clear_range to prune mtrees Jim Cromie
2023-10-12 19:48 ` [RFC PATCH 10/10] dyndbg: cache the dynamically generated prefixes per callsite Jim Cromie
  -- strict thread matches above, loose matches on Subject: below --
2023-10-12 19:47 [RFC PATCH 00/10] how to reclaim unneeded vmlinux memory ? Jim Cromie
2023-10-12 19:47 ` [RFC PATCH 07/10] dyndbg: wire in __desc_*() functions Jim Cromie

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=20231012194834.3288085-8-jim.cromie@gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=Liam.Howlett@Oracle.com \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@akamai.com \
    --cc=joe@perches.com \
    --cc=lb@semihalf.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mcgrof@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