[dtrace-discuss] ustack() question

Andrew.Rutz at Sun.COM Andrew.Rutz at Sun.COM
Wed Jun 6 12:59:42 PDT 2007


Adam Leventhal wrote:
> You're right that it's not explicitly stated, but if there's no associated
> user context, ustack() should return an empty stack and ustackdepth should
> have a value of 0.

hmm,  coincidentally, i just got this output from ustack()
and the stacktrace w/ only digits gives "addresses" that
were not mapped (eg, "13ba8/i" when in "mdb -k")


# dtrace -ae
CPU     ID                    FUNCTION:NAME
   0  43807             di_cache_write:entry cmd 0x16a48
               libc.so.1`ioctl+0x8
               libpicldevtree.so.1`libdevinfo_init+0x20
               libpicldevtree.so.1`picldevtree_init+0xd4
               libpicltree.so.1`construct_picltree+0x98
               libpicltree.so.1`xptree_initialize+0xc8
               picld`main+0x324
               picld`_start+0x108

   0  43808            di_cache_write:return rv 0x1
   0  43807             di_cache_write:entry cmd 0x16a48
               0xff1c1054
               0xff37737c
               0x150e0
               0x1549c
               0x13f00
               0x13ba8

   0  43808            di_cache_write:return rv 0x1


------
# mdb -k
 > $m
             BASE            LIMIT             SIZE NAME
          1000000          18fa000           8fa000 ktextseg
          18fa000          1e00000           506000 kvalloc
         70000000         80000000         10000000 kvseg32
         edd00000         f0000000          2300000 kdebugseg
      2a100000000      2a13e680000         3e680000 kpseg
      2a750000000      2a753a7c000          3a7c000 kmapseg
      30000000000      70000000000      40000000000 kvseg
      70000000000      7000090e000           90e000 kmem64
8000000000000000 8000100000000000     100000000000 kpmseg

> 
> Adam
> 
> On Wed, Jun 06, 2007 at 11:27:48AM -0700, Peter Lawrence wrote:
> 
>>the Users Guide isn't explicit about what happens when ustack() is called
>>and there isn't any user address space or stack associated with the
>>current kernel thread.  It only gives examples where there certainly is,
>>using the syscall provider.
>>
>>I have used sched:::off-cpu to see user-stacks at context-switch events,
>>and it seems to work just fine, but I'm wondering how to put in an
>>explicit predicate for user-associated kernel threads...?...
>>
>>thanks
>>Pete Lawrence.
>>_______________________________________________
>>dtrace-discuss mailing list
>>dtrace-discuss at opensolaris.org
> 
> 



More information about the dtrace-discuss mailing list