3 Replies Latest reply on Sep 30, 2011 11:39 AM by Flex harUI

    flash.sampler does not collect samples during actionscript execution

    cmason1978

      Hi.

       

      It seems that straight actionscript code that does not call any native player methods (in other words, that is only executing user bytecode) does not cause any performance samples (BaseSample) to be recorded.  I have a unit test that takes 20-25 seconds to execute, and when I profile it, it shows none of the methods that are executed in the test.

       

      See screenshot at http://www.cmason.com/tmp/FlashProfiler_noSamples.png

       

      Note that the largest cumulative time method is only 665 msecs, but that the execution time of the test is over 20 seconds.

       

      I've tried this on players 10,3,183,0 (mac; firefox), 10,0,45,2 (mac; safari), and 10,1,53,64 (win7; ie).  I've tried both swfs loaded directly from disk and via the web. I've also tried the "projector debugger" version 10.3.183.7.

       

      I've tried with the FlashBuilder 4 profiler, with PBLabsProfiler (https://github.com/bengarney/PBLabsProfiler/), and with Flash Preload Profiler (http://jpauclair.net/flashpreloadprofiler/).  Flash Preload Profiler has the option to copy all of the samples to the clipboard.  See

       

      http://www.cmason.com/tmp/flash_profiler_samples.txt

       

      The first two columns are absolute time, and time difference.  Notice the huge time difference at 12511191030; no samples are recorded during the bulk of the execution time.

       

      My guess is that the player isn't able to interrupt running actionscript code to take a sample. I believe this person is seeing the same issue: http://forums.adobe.com/message/3795790  He's trying to start sampling and then immediately collect samples and no samples have been collected because he hasn't called any platform (native) methods.

       

      Any ideas here would be most appreciated.

       

      -c

       

      PS - I did a little digging around in the tamarin source and it seems like it should be able to take samples on every function call, but that clearly isn't happening here.