Alex Peng
2006-Oct-23 10:52 UTC
[dtrace-discuss] how to watch kmem_init() during boot time
Hi,
Following "anonymous tracing" chapter, I wanna trace kmem_init(), but
after reboot, I can''t get anything, why?
Here is my short script kmem_init.d:
#!/usr/sbin/dtrace -s
fbt::kmem_init:entry
{
stack();
}
then I just use:
#dtrace -AFs kmem_init.d
#reboot
#dtrace -ae
< got nothing here>
Thanks,
-Alex
This message posted from opensolaris.org
Adam Leventhal
2006-Oct-23 19:03 UTC
[dtrace-discuss] how to watch kmem_init() during boot time
Hey Alex, kmem_init() is called before DTrace is initialized (the dtrace kernel module makes use of kmem_alloc()). You can use kmdb to stop in kmem_init() if you like. Adam On Mon, Oct 23, 2006 at 03:52:56AM -0700, Alex Peng wrote:> Hi, > > Following "anonymous tracing" chapter, I wanna trace kmem_init(), but after reboot, I can''t get anything, why? > > Here is my short script kmem_init.d: > > #!/usr/sbin/dtrace -s > > fbt::kmem_init:entry > { > stack(); > } > > > then I just use: > #dtrace -AFs kmem_init.d > #reboot > #dtrace -ae > < got nothing here> > > > > Thanks, > -Alex > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Alex Peng
2006-Oct-24 02:22 UTC
[dtrace-discuss] Re: how to watch kmem_init() during boot time
Thanks Adam, I realized this just after I posted it. :) Then what''s the boundry during boot, i.e. before which function DTrace can''t help, after which function DTrace could work? -Alex This message posted from opensolaris.org
Adam Leventhal
2006-Oct-24 05:23 UTC
[dtrace-discuss] Re: how to watch kmem_init() during boot time
Hey Alex,
It looks like the first probes we hit when we start to configure devices:
# dtrace -A -F -xbufsize=1k -xbufpolicy=fill -n ''fbt:::{ stack()
}''
...
# reboot
...
# dtrace -a
CPU FUNCTION
0 -> xc_sync
unix`dtrace_xcall+0x7e
dtrace`dtrace_state_go+0x42f
dtrace`dtrace_attach+0x487
genunix`devi_attach+0x87
genunix`attach_node+0x123
genunix`i_ndi_config_node+0xd9
genunix`i_ddi_attachchild+0x67
genunix`devi_attach_node+0xcc
genunix`config_immediate_children+0xf2
genunix`devi_config_common+0x9f
genunix`mt_config_thread+0x5c
unix`thread_start+0x8
...
Hope that helps.
Adam
On Mon, Oct 23, 2006 at 07:22:22PM -0700, Alex Peng
wrote:> Thanks Adam, I realized this just after I posted it. :) Then
what''s the boundry during boot, i.e. before which function DTrace
can''t help, after which function DTrace could work?
>
> -Alex
>
>
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
--
Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Alex Peng
2006-Oct-24 10:49 UTC
[dtrace-discuss] Re: Re: how to watch kmem_init() during boot time
Sure, this helps. Why not state it clearly somewhere, either in your blog (how about this title "what can DTrace do at early boot time?") or ...? I searched around, it seems several other people are asking "anonymous tracing" questions, so it''s better to give a clear boundry. Again, your oneline script is wonderful. Thanks, -Alex This message posted from opensolaris.org