Hi - I''m trying to use plockstat to help identify any mutex contention issues we may have in our c++ app.>From the docs it would appear to be a very useful tool - unfortunately in practice this doesn''t bear out purely because the stack traces produced are limited to being 39/40 characters wide. In general this means that I''m not seeing ~75% of each stack symbol and trying to figure out what is being reported is nearly impossible.There doesn''t appear to be any option on plockstat to widen the stack output and all the examples shown of its use in various bits of documentation are for C code where all the symbols are nice and short. I''ve tried running the raw dtrace program produced by plockstat thru dtrace and then I get full width stack traces (so its not a dtrace output issue) but without the nice collating that plockstat does. Any suggestions as to widening plockstat stack trace output? This message posted from opensolaris.org
On Thu, Jul 06, 2006 at 07:31:09AM -0700, Cabal wrote:> Hi - I''m trying to use plockstat to help identify any mutex contention > issues we may have in our c++ app. > > From the docs it would appear to be a very useful tool - unfortunately > in practice this doesn''t bear out purely because the stack traces > produced are limited to being 39/40 characters wide. In general this > means that I''m not seeing ~75% of each stack symbol and trying to > figure out what is being reported is nearly impossible.This is most likely 6295662 plockstat needs more characters for stack addresses which increased the symbol size from 40 characters to 256. This is fixed in Solaris Express, but has not yet been backported to Solaris 10. It looks like it is currently scheduled for the next update release. On a recent Solaris Express build, I created a C program with long variables: Count nsec Lock Caller 474 75076 tmpc`mutex tmpc`t234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890+0x1c nsec ---- Time Distribution --- count Stack 32768 |@@@@@@@@@@ | 210 tmpc`t234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890+0x1c 65536 |@@@@@@@ | 152 libc.so.1`_lwp_start 131072 |@@@@ | 93 262144 | | 15 524288 | | 3 1048576 | | 1 It''s not pretty, but it works. Cheers, - jonathan> There doesn''t appear to be any option on plockstat to widen the stack > output and all the examples shown of its use in various bits of > documentation are for C code where all the symbols are nice and short. > > I''ve tried running the raw dtrace program produced by plockstat thru > dtrace and then I get full width stack traces (so its not a dtrace > output issue) but without the nice collating that plockstat does. > > Any suggestions as to widening plockstat stack trace output? > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Jonathan Adams, Solaris Kernel Development
On Thu, Jul 06, 2006 at 12:11:12PM -0700, Jonathan Adams wrote:> On Thu, Jul 06, 2006 at 07:31:09AM -0700, Cabal wrote: > > Hi - I''m trying to use plockstat to help identify any mutex contention > > issues we may have in our c++ app. > > > > From the docs it would appear to be a very useful tool - unfortunately > > in practice this doesn''t bear out purely because the stack traces > > produced are limited to being 39/40 characters wide. In general this > > means that I''m not seeing ~75% of each stack symbol and trying to > > figure out what is being reported is nearly impossible. > > This is most likely > > 6295662 plockstat needs more characters for stack addresses > > which increased the symbol size from 40 characters to 256. > > This is fixed in Solaris Express, but has not yet been backported to > Solaris 10. It looks like it is currently scheduled for the next update > release.If you can''t use Solaris Express and can''t wait for the next Solaris 10 update, you can get the data you want by taking the output of plockstat -V (with the other options you''re using) to emit the DTrace program. Copy that into a .d script and run it. The output won''t be formatted like plockstat''s, but it will have the information you need. Alternatively, you could try recompiling plockstat.c from OpenSolarig.org on Solaris 10, but there are some changes you''ll need to make. If anyone''s interested, let me know and I''ll explain how to do it. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
When you say next Solaris release, I am assuming it is not update 2 which just came out. Right? Don Weeks Sr Product Engineer IP Architect and OS Engineering Alcatel -----Original Message----- From: dtrace-discuss-bounces at opensolaris.org [mailto:dtrace-discuss-bounces at opensolaris.org] On Behalf Of Adam Leventhal Sent: Sunday, July 09, 2006 1:52 PM To: Jonathan Adams Cc: dtrace-discuss at opensolaris.org; Cabal Subject: Re: [dtrace-discuss] plockstat - chopped stack output On Thu, Jul 06, 2006 at 12:11:12PM -0700, Jonathan Adams wrote:> On Thu, Jul 06, 2006 at 07:31:09AM -0700, Cabal wrote: > > Hi - I''m trying to use plockstat to help identify any mutex > > contention issues we may have in our c++ app. > > > > From the docs it would appear to be a very useful tool - > > unfortunately in practice this doesn''t bear out purely because the > > stack traces produced are limited to being 39/40 characters wide. In > > general this means that I''m not seeing ~75% of each stack symbol and > > trying to figure out what is being reported is nearly impossible. > > This is most likely > > 6295662 plockstat needs more characters for stack addresses > > which increased the symbol size from 40 characters to 256. > > This is fixed in Solaris Express, but has not yet been backported to > Solaris 10. It looks like it is currently scheduled for the next > update release.If you can''t use Solaris Express and can''t wait for the next Solaris 10 update, you can get the data you want by taking the output of plockstat -V (with the other options you''re using) to emit the DTrace program. Copy that into a .d script and run it. The output won''t be formatted like plockstat''s, but it will have the information you need. Alternatively, you could try recompiling plockstat.c from OpenSolarig.org on Solaris 10, but there are some changes you''ll need to make. If anyone''s interested, let me know and I''ll explain how to do it. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl _______________________________________________ dtrace-discuss mailing list dtrace-discuss at opensolaris.org
Right. It''s hard to predict what features will be in the updates, but it will likely be update 3 or possibly update 4. Adam On Sun, Jul 09, 2006 at 02:27:43PM -0500, Don Weeks wrote:> When you say next Solaris release, I am assuming it is not update 2 which > just came out. Right? > > > Don Weeks > Sr Product Engineer > IP Architect and OS Engineering > Alcatel > > > > > -----Original Message----- > From: dtrace-discuss-bounces at opensolaris.org > [mailto:dtrace-discuss-bounces at opensolaris.org] On Behalf Of Adam Leventhal > Sent: Sunday, July 09, 2006 1:52 PM > To: Jonathan Adams > Cc: dtrace-discuss at opensolaris.org; Cabal > Subject: Re: [dtrace-discuss] plockstat - chopped stack output > > On Thu, Jul 06, 2006 at 12:11:12PM -0700, Jonathan Adams wrote: > > On Thu, Jul 06, 2006 at 07:31:09AM -0700, Cabal wrote: > > > Hi - I''m trying to use plockstat to help identify any mutex > > > contention issues we may have in our c++ app. > > > > > > From the docs it would appear to be a very useful tool - > > > unfortunately in practice this doesn''t bear out purely because the > > > stack traces produced are limited to being 39/40 characters wide. In > > > general this means that I''m not seeing ~75% of each stack symbol and > > > trying to figure out what is being reported is nearly impossible. > > > > This is most likely > > > > 6295662 plockstat needs more characters for stack addresses > > > > which increased the symbol size from 40 characters to 256. > > > > This is fixed in Solaris Express, but has not yet been backported to > > Solaris 10. It looks like it is currently scheduled for the next > > update release. > > If you can''t use Solaris Express and can''t wait for the next Solaris 10 > update, you can get the data you want by taking the output of plockstat -V > (with the other options you''re using) to emit the DTrace program. Copy that > into a .d script and run it. The output won''t be formatted like plockstat''s, > but it will have the information you need. > > Alternatively, you could try recompiling plockstat.c from OpenSolarig.org on > Solaris 10, but there are some changes you''ll need to make. If anyone''s > interested, let me know and I''ll explain how to do it. > > Adam > > -- > Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl