From: Rusty Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
levon@movementarian.org, "Wang, Stanley" <stanley.wang@intel.com>
Subject: [PATCH] Put more useful stuff in /proc/modules
Date: Sat, 11 Jan 2003 21:03:07 +1100 [thread overview]
Message-ID: <20030111100327.71DF42C060@lists.samba.org> (raw)
Linus, please apply.
This puts the state of the module (useful for users) and the address
(required for ksymoops and oprofile).
Cheers,
Rusty.
Name: Put more information in /proc/modules
Author: Stanley Wang, Rusty Russell
Status: Tested on 2.5.56
D: Puts the state of the module and the address in /proc/modules.
diff -urNp --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5-bk/kernel/module.c working-2.5-bk-procmodules-extra/kernel/module.c
--- linux-2.5-bk/kernel/module.c Fri Jan 10 10:55:43 2003
+++ working-2.5-bk-procmodules-extra/kernel/module.c Sat Jan 11 19:59:58 2003
@@ -1422,6 +1422,15 @@ static int m_show(struct seq_file *m, vo
seq_printf(m, "%s %lu",
mod->name, mod->init_size + mod->core_size);
print_unload_info(m, mod);
+
+ /* Informative for users. */
+ seq_printf(m, " %s",
+ mod->state == MODULE_STATE_GOING ? "Unloading":
+ mod->state == MODULE_STATE_COMING ? "Loading":
+ "Live");
+ /* Used by oprofile and other similar tools. */
+ seq_printf(m, " 0x%p", mod->module_core);
+
seq_printf(m, "\n");
return 0;
}
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
reply other threads:[~2003-01-11 9:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030111100327.71DF42C060@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stanley.wang@intel.com \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.