[dtrace-discuss] How to print kernel global variable.
Adam Leventhal
ahl at eng.sun.com
Wed Feb 14 09:40:01 PST 2007
Hi Brian,
The problem is that DTrace won't let you use a kernel variable if it can't
infer the type. Since 'timedelta' is defined in an assembly file, we don't
have CTF data. Feel free to file a bug -- this should be made to work.
I was able to trace 'timedelta' by getting its address using mdb and plugging
that into my D script:
# echo timedelta=K | mdb -k
fffffffffbc02930
# dtrace -n BEGIN'{ trace(*(int64_t *)0xfffffffffbc02930ULL); }'
dtrace: description 'BEGIN' matched 1 probe
CPU ID FUNCTION:NAME
1 1 :BEGIN 0
Adam
On Tue, Feb 13, 2007 at 03:05:03PM -0500, Brian Utterback wrote:
> I am doing some testing on the adjtime syscall, and I want to
> dump out the value of the kernel variable "timedelta", and I
> am failing at it. Some of my attempts got "Module is no longer
> loaded" and some got "Symbol table entry is not a data object"
>
> I found some info that dtrace can print out kernel global
> variable, so what am I missing here?
> --
> blu
>
> "Remember 'A Thousand Points of Light'? With a network, we now have
> a thousand points of failure."
> ----------------------------------------------------------------------
> Brian Utterback - Solaris RPE, Sun Microsystems, Inc.
> Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
--
Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
More information about the dtrace-discuss
mailing list