This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Example looking at the periodic timers


On Wed, Dec 14, 2011 at 09:52:18AM -0500, William Cohen wrote:
> > Looks nice. I would add a begin probe to announce the script started and
> > that the user must press control-C to get results and/or make the end
> > probe a end,timer.s(10) probe so that you get output every 10 seconds
> > (then you can also clean up the tables).
> 
> The begin probe would be easy enough to add. Loading in thing with the
> "--all-modules" can slow things down, so that would give people some
> useful feedback.  The timer.s(10) might not be so useful when people
> are looking for things that have a period longer than 10 seconds.
> There are things in the kernel that run every 600 seconds or so,
> and timer.s(10) would miss those. Maybe make an optional argument
> for periodic output/cleanup.

Nice elegant solution. To nitpick, I would make the output more explicit:
-probe begin { printf("#monitoring timer periods\n") }
+probe begin { printf("# Monitoring timer periods (press ctrl-C for output)\n") }

> > I also got some functions that don't immediately make sense, they don't
> > seem to fall inside either the kernel nor a module. Did you figure out
> > where they point at? From seeing the high address I assume they are
> > actually dynamically allocated structures, not direct functions.
> 
> Which functions are you referring to? I think that the raw addresses in
> the output are might the timers related to the systemtap instrumentation
> module.

Aha. You are right.
I even have a patch for modname() to get "unknown" module names.
I haven't checked it in because I found the preempt_disable() so
incredible ugly. We cannot use the module_mutex because we could
theoretically be probing some code that holds that mutex. What do
people think, is it useful enough to warrant the ugliness?

Since stap module names are so incredibly long you do need the following
patch to truncate the module names in periodic.stp:

-      fname = sprintf("%s:%s", modname(funct[timer]), fname)
+      fname = sprintf("%.16s:%s", modname(funct[timer]), fname)


This does expose that we (systemtap) are responsible for most timer
interrupts... hmmmm.

Cheers,

Mark

Attachment: modname.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]