public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* size in /proc/modules
@ 2003-01-20 14:27 John Levon
  2003-01-21  6:44 ` Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: John Levon @ 2003-01-20 14:27 UTC (permalink / raw)
  To: linux-kernel, rusty


/proc/modules size field includes init_size in 2.5. Why ?

The removal of sensible values in /proc/ksyms means that oprofile can no
longer attribute module samples reliably. The only information we have
is module_core address, and size == core_size+init_size. Since init code
is removed in sys_init_module, this will overestimate, and can lead to
overlapping with the start of another module, afaics.

In 2.4, we had size(.text), which could underestimate (think
.text.exit), but that is not a big problem.

Rusty, does this fall under another one of your "corner cases" ? (what I
would call "flaky code" ...)

Or I have I just missed something obvious ?

regards
john

-- 
"Anyone who quotes Rusty in their sig is an idiot."
	- me

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: size in /proc/modules
  2003-01-20 14:27 size in /proc/modules John Levon
@ 2003-01-21  6:44 ` Rusty Russell
  0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2003-01-21  6:44 UTC (permalink / raw)
  To: John Levon; +Cc: linux-kernel

In message <20030120142703.GA58326@compsoc.man.ac.uk> you write:
> 
> /proc/modules size field includes init_size in 2.5. Why ?
> 
> The removal of sensible values in /proc/ksyms means that oprofile can no
> longer attribute module samples reliably. The only information we have
> is module_core address, and size == core_size+init_size. Since init code
> is removed in sys_init_module, this will overestimate, and can lead to
> overlapping with the start of another module, afaics.
> 
> In 2.4, we had size(.text), which could underestimate (think
> .text.exit), but that is not a big problem.
> 
> Rusty, does this fall under another one of your "corner cases" ? (what I
> would call "flaky code" ...)
> 
> Or I have I just missed something obvious ?

Yes, line 1328 of kernel/module.c, by the sound of it 8)

I was thinking of you when I added this, actually.

Hope that helps!
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-21  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 14:27 size in /proc/modules John Levon
2003-01-21  6:44 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox