I wrote something like this for SAM-UI (http://osflash.org/samui). Indeed, the profiling part was quite easy but the biggest challenge was to send the result to the profiler UI. You can read more about it on blog (french) -> http://www.liguorien.com/blog/archives_99.html
The profiler is rather basic, it can only profile a part of the execution, this is not in realtime. The callstack history is displayed in a JTree and you can sort classes/methods/methods calls by available stats. Here is a screenshot of what it looks like -> http://www.liguorien.com/samui/images/samui-03.jpg It is not 100% stable, it depends of the SWF structure. But the source is hosted on OSFlash so you can fix the bugs if you want ;) Nicolas ----- Original Message ----- From: "Scott Hyndman" <[EMAIL PROTECTED]> To: "Open Source Flash Mailing List" <[email protected]> Sent: Thursday, December 15, 2005 6:04 PM Subject: Re: [osflash] WAS: OT: Memory leaks I believe the AS2Lib might have something like this for runtime profiling. I think that it uses AOP to wrap methods. And if they don't have one, it would be pretty easy to write (once you've read quite a bit, but it's worthwhile). Their AOP framework is quite nice. Scott -----Original Message----- From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Thu 12/15/2005 5:33 PM To: Open Source Flash Mailing List Cc: Subject: Re: [osflash] WAS: OT: Memory leaks Thanks for the response. That would be a great tool but oh well. On December 15, 2005 03:17 pm, David Rorex wrote: > On 12/15/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > Is there an open source memory and resource profiler for flash projects? > > Or do I just try to profile it with such tools as top in Linux? > > I don't believe there are any memory profilers for flash, I don't know > if such a thing is even possible. I know there is a cpu time profiler > for flash, but it only worked on older (like flash 6 IIRC). Maybe bug > Nicolas to add some profiling features to his compilers... > Basically, you need to insert a small amount of code, at the start & > end of each function, which logs the time (using getTimer()) that that > point was passed. After you are done, you can compile the report > (which should be HUGE...2 lines for each function call) to see where > the cpu time is being spent. The hardest part is inserting the tracing > code into each and every function definition. If it could be done > automatically by the compiler, it would be nice. > > -David R > > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org _______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org -------------------------------------------------------------------------------- > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org > _______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
