Pavan Chandrashekar - Sun Microsystems
2009-Mar-09 17:11 UTC
[dtrace-discuss] func() builtin does not resolve correctly on unix module
Hi, I have been facing an issue with the "func()" builtin on a PC (Program Counter) which is part of the "unix" module''s text. The dtrace script that I use is as follows (extended from the example provided in http://blogs.sun.com/jonh/entry/performance_counter_generic_events) #!/usr/sbin/dtrace -Fs inline int UNIX_MOD_START = 0xFFFFFFFFFB800000; inline int UNIX_MOD_END = 0xFFFFFFFFFB99D986; inline int GENUNIX_MOD_START = 0xFFFFFFFFFB921CD0; inline int GENUNIX_MOD_END = 0xFFFFFFFFFBBD2548; inline int MAC_MOD_START = 0xFFFFFFFFFBB9B338; inline int MAC_MOD_END = 0xFFFFFFFFFBBBEB00; cpc:::PAPI_tot_cyc-kernel-5000 /arg0 >= UNIX_MOD_START && arg0 < UNIX_MOD_END/ { @unix[func(arg0)] = count(); } cpc:::PAPI_tot_cyc-kernel-5000 /arg0 >= GENUNIX_MOD_START && arg0 < GENUNIX_MOD_END/ { @genunix[func(arg0)] = count(); } cpc:::PAPI_tot_cyc-kernel-5000 /arg0 >= MAC_MOD_START && arg0 < MAC_MOD_END/ { @mac[func(arg0)] = count(); } END { trunc(@unix, 20); printa("%-50a %@d\n", @unix); trunc(@genunix, 20); printa("%-50a %@d\n", @genunix); trunc(@mac, 20); printa("%-50a %@d\n", @mac); } And given below is the output that I see: unix`mutex_enter 802562 unix`ip_ocsum 2644713 unix`0xfffffffffb84 2691253 ^^^^^^^^^^^^^^^^^^^^^^ mac`mac_tx_fanout_mode 31199 genunix`ddi_dma_sync 3223 The unresolved address (unix`0xfffffffffb84) is my concern. What function in "unix" does this correspond to? Is this a known problem? If so, is there any solution/workaround to get to the actual function this is referring to? I have hit the very same address on 4 separate amd systems (Of course, I have modified the _MOD_START and _MOD_END macros on each of these systems as required). Given below is the uname output on some of them (in case it is of any help): bash-3.2# uname -srvmpi SunOS 5.11 snv_109 i86pc i386 i86pc bash-3.2# uname -srvmpi SunOS 5.11 snv_110 i86pc i386 i86pc TIA, Pavan
Jon Haslam
2009-Mar-10 11:23 UTC
[dtrace-discuss] func() builtin does not resolve correctly on unix module
Hi Pavan,> And given below is the output that I see: > > > unix`mutex_enter 802562 > unix`ip_ocsum 2644713 > unix`0xfffffffffb84 2691253 > ^^^^^^^^^^^^^^^^^^^^^^Usually when I see unresolved functions on amd it is typically in something like patched bcopy code (there''s a whole bunch of jiggery-pokery goes off in there). I assume you''ve truncated the address here as it''s missing a few characters? If so, try going back a few 100 bytes from that and disassembling to see if you are near something that looks valid. If you get no joy send me login details to a system and I''ll take a look. Jon.