5 Replies Latest reply: Nov 11, 2011 11:21 AM by 823508 RSS

    dbx collector does not seem to be reporting data for all threads

    823508
      when I collect data from dbx for a multithreaded application, and later use analyzer to check the data, I don't manage to see data for all the threads, even though I am pretty sure that other threads exist and are running for a significant amount of time.
      Here is the configuration for collector:


      $ uname -a
      SunOS sundev28 5.10 142900-02 sun4u sparc SUNW,Sun-Fire
      $ dbx -V
      Sun DBX Debugger 7.7 SunOS_sparc Patch 142371-02 2010/08/12
      $ analyzer -V
      analyzer: Sun Analyzer 7.7 SunOS_sparc 2009/06/03
      (dbx) collector show
      collector disable
      collector profile timer 10.007
      collector profile on
      collector synctrace threshold calibrate
      collector synctrace off
      collector hwprofile counter insts
      collector hwprofile off
      collector heaptrace off
      collector mpitrace off
      collector tha off
      collector store directory "."
      collector store experiment "test.1.er"
      collector sample periodic
      collector dbxsample on
      collector sample period 1
      collector limit 2000
      collector archive on

      $ ls /bb/util/common/studio12/SUNWspro/lib/v9/libco>
      /bb/util/common/studio12/SUNWspro/lib/v9/libcollectorAPI.so
      /bb/util/common/studio12/SUNWspro/lib/v9/libcollectorAPI.so.

      I tried to tweak some parameters, but it still didn't work. However, I see all threads when I run my task under 'analyzer' (but then I lack the capability of enabling/disabling the collection when I need).
        • 1. Re: dbx collector does not seem to be reporting data for all threads
          NikMolchanov
          user13469591 wrote:
          when I collect data from dbx for a multithreaded application, and later use analyzer to check the data, I don't manage to see data for all the threads, even though I am pretty sure that other threads exist and are running for a significant amount of time.
          ...
          I tried to tweak some parameters, but it still didn't work. However, I see all threads when I run my task under 'analyzer' (but then I lack the capability of enabling/disabling the collection when I need).
          I think you meant to say " I see all threads when I run my task under 'collect' ", correct?
          BTW, there is a way to stop/resume data collection via sending signals - please see 'man collect' for details:

          -y signal[,r]
          Control recording of data with signal. Whenever the
          given signal is delivered to the process, switch
          between paused (no data is recorded) and resumed (data
          is recorded) states. Start in the resumed state if the
          optional ,r flag is given, otherwise start in the
          paused state. This option does not affect the record-
          ing of sample points.

          I understand that it may not be what you want - probably you want to profile only some part of the code,
          from one breakpoint to another.

          Anyway, is there a problem if you run your application under collect, and then filter out uninteresting parts
          of the experiment?

          Thanks.
          Nik
          • 2. Re: dbx collector does not seem to be reporting data for all threads
            823508
            Yes, I meant... when I run my application directly under 'collector', which I had started from 'analyzer'.
            Yes, the purpose of me collecting data from 'dbx' is so that I can collect data from breakpoint to breakpoint, so I can collect data just for the transaction I need.
            Sending signals to collect might be a solution, but then my application server is linked to many other libraries, and I assume I do not necessarily know all the signals the application server is handling, so I wouldn't know which signal is safe to use.
            I can collect data for the entirety of the experiment, and just filter the data I need (the transaction I want to monitor), the only issue with that is that sometimes 'collect/analyzer' may not report accurately the attributed times for a function if it is a function that is called from many execution threads. So I believe that by collecting data only for the transaction I need would make data collection more accurate.
            Thanks! -ay
            • 3. Re: dbx collector does not seem to be reporting data for all threads
              NikMolchanov
              Thank you for the explanation! I'll try to reproduce the problem using our multithreaded tests and let you know.
              BTW, your version of tools is slightly old. You can download and try Oracle Solaris Studio 12.2.

              http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html

              Thanks.
              Nik
              • 4. Re: dbx collector does not seem to be reporting data for all threads
                NikMolchanov
                BTW, what kind of script you pass to dbx?
                Usually we use something like this one:

                collector enable
                stop in main
                run
                collector disable
                stop in test1; stop in test2; stop in test3
                cont
                collector enable
                collector show
                cont
                collector disable
                collector show
                cont
                collector enable
                collector show
                cont
                collector disable
                collector show
                quit

                It is important to pass "collector enable" at the beginning.

                Thanks.
                Nik
                • 5. Re: dbx collector does not seem to be reporting data for all threads
                  823508
                  Yes, that is pretty much the script that I use in dbx.