* [PATCH] Module state and address in /proc/modules.
@ 2003-01-14 2:24 Rusty Russell
2003-01-14 16:36 ` Roman Zippel
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2003-01-14 2:24 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
The address allows oprofile and ksymoops to work again. The state is
simply informative.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Module state and address in /proc/modules.
2003-01-14 2:24 [PATCH] Module state and address in /proc/modules Rusty Russell
@ 2003-01-14 16:36 ` Roman Zippel
0 siblings, 0 replies; 2+ messages in thread
From: Roman Zippel @ 2003-01-14 16:36 UTC (permalink / raw)
To: Rusty Russell; +Cc: torvalds, linux-kernel
Hi,
Rusty Russell wrote:
> + /* Used by oprofile and other similar tools. */
> + seq_printf(m, " 0x%p", mod->module_core);
> +
Q: How does ksymoops find out with this, how the sections are laid out?
Q: What happens if the module crashes during init?
bye, Roman
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-14 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14 2:24 [PATCH] Module state and address in /proc/modules Rusty Russell
2003-01-14 16:36 ` Roman Zippel
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).