A sane profiler for large AIR/Flex projects
ActionScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LeanAIRProfiler
Preloader
ProfilerLib
ProfilerTestApp
readme
screenshot.png

readme

The MIT License

Copyright (c) 2011 Stephen Milligan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


The LeanAirProfiler consists of 2 FlashBuilder projects:

LeanAIRProfiler - An AIR project that provides the UI to control profiling behavior and display profiling results. This project requires Flex 4.1 or higher.

Preloader - An ActionScript project that provides a swf that collects the profiling data.

QuickStart:
1. Add both projects to Flash Builder 
   - This will ensure that they are added to the global FlashPlayerTrust directory which is necessary for the preloader to work correctly.
2. Update LeanAirProfiler.mxml so the value of PRELOADER_PATH points to the bin-debug directory of your Preloader project.
   - This is the simplest way to get the preloader added to mm.cfg.
3. Make a back-up copy of mm.cfg in your user profile directory if it already exists.
   - This should ensure that you don't lose anything if the LeanAirProfiler misbehaves.
4. Build both projects
   - This should ensure that you have a valid and working Preloader.swf and LeanAirProfiler app
5. Debug or run the LeanAirProfiler app
   - Debugging is probably a better idea in case anything breaks
6. Click on the Listen button in the LeanAirProfiler app and optionall check the checkbox to tell it to start profiling as soon as an app connects.
   - This makes sure that when you launch the app you want to profile, the preloader can make a socket connection to the LeanAirProfiler.
7. Debug or run the app you want to profile.
   - You should see a message in the LeanAirProfiler telling you that the app connected.
8. In the text box change "::SomeLeakyClassName" to the name of a class you think might be leaking objects and click the "watch button". The :: at the start should limit the number of erroneous camples created since that's what appears before each class name in a profiling stack trace frame.
9. If you didn't check the auto-start checkbox, click the start button in the LeanAirprofiler app.
   - This tells the preloader to start collecting profiling data.
9. Click the "Loitering Objects" button in the LeanAirProfiler app to see allocation traces for any objects that have been created by your leaking class (including the class itself), but have not been garbage collected.