2 Replies Latest reply on Jun 14, 2010 2:12 PM by leiy

    How to start/stop profiling at specific macro time?

    ols6000@sbcglobal.net
      For a long-running app, I need to profile from 20 min to 35 min after app is started.

      I have a very large app that I'm trying to optimize. It executes in phases, and I can see that one phase takes longest. Therefore, I want to profile just that phase.

      The phase of interest begins about 20 min after the app is started. How do I tell CodeAnalyst to begin collecting data at this time? Since the phase of interest lasts for a few hours, I can manually signal or start CodeAnalyst at the desired time if necessary. I could also modify the app to set a memory location or perform some action at the appropriate time.

      Last, I need a way to stop data collection after, say, 15 min.

      The test system is a dual-processor, each a 4-core Xeon, running under WinXP64.

      How can I profile for the period as I have described?

        • How to start/stop profiling at specific macro time?

          Hello,

          I suggest that you use the included API to generate your profile and then import the profile into CodeAnalyst. 

          So you would use fnEnableProfiling(), fnSetTimerConfiguration(), fnSetProfileOutputFile(), fnStartProfiling (startPaused), and then fnResumeProfiling () when you get to the part of your code in which you wish to start profiling.  When you are done taking your profile, call fnStopProfiling() and fnReleaseProfiling ().

          Open the CodeAnalyst Gui and import the data file you specified for fnSetProfileOutputFile.

          There is sample code included in the installation demonstrating how to use the API.

          Thanks,

          -=Frank

          • How to start/stop profiling at specific macro time?
            leiy

            I think using "start-dealy" and "profile duration" can achieve you want.

            1) If you want CodeAnalyst GUI to launch the app for you, then setup the following options in the "Session Setting":

            1200 in "start delay" -- this will let CodeAnalyst not collect data in first 20 minutes.

            set 3600 in "profile duration" -- this will let CodeAnalyst collect about 1 hour data after start delay.

             

            2) Manually signal start.

            Leave blank for "launch" area.

            set 3600 in "profile duration" -- profile for 1 hour

            Then run your app stanalone outside CodeAnalyst. At the time of interest area, Click "start" in COdeAnalyst GUI to profile 1 hour.

             

            -Lei