[dtrace-discuss] Capture kernel stack if a function is called from a specific function
Michael Schuster
Michael.Schuster at Sun.COM
Tue Jul 24 08:26:24 PDT 2007
raminski at hotmail.co.uk wrote:
> Hi all,
>
> I've tried hunting for examples of this to no avail. I've also purchased
>
the Solaris Performance and Tools book but havn't found what I want there
either :(
>
> What i'm after is a specific way of obtaining a kernel stack (possible
args, but stack would do fine to start with as I'm sure (hope) I could work
out what args I want to capture if needed), if and only if, it was called
by a certain other function. My kernel module can call other routines, not
necessarily in the same module, it maybe in genunix module.
[..]
try this (or something similar):
fbt::internal_timeout:entry
{
self->watch = 1;
}
fbt::timeout:entry
/self->watch/
{
printf...
}
fbt::internal_timeout:return
/self->watch/
{
self->watch = 0;
}
HTH
--
Michael Schuster Sun Microsystems, Inc.
Recursion, n.: see 'Recursion'
More information about the dtrace-discuss
mailing list