Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Running Heap Analyzer

Heap Analyzer can be used with both simulation targets and Brew MP devices, with the exception of the Split Heap configuration that is not supported by the Simulator.

Prerequisites

  • For the Heap Analyzer to generate a heap dump, there is a minimum memory requirement of 2Mb in the target.
  • After a new version of the Toolset is installed, you must uninstall the outdated Heap Analyzer utility modules using Target Manager (see Installing and Uninstalling Heap Analyzer Utility Modules in the Target Manager Help). Then, either:
    • Reinstall the Heap Analyzer utility modules from Target Manager, or
    • Perform Walk Heap described in To run Heap Analyzer before running Heap Analyzer.

To run Heap Analyzer

  1. Do one of the following:
    • Launch a simulation target.
    • Connect a Brew MP device to your PC.
  2. Do one of the following:
    • Open Target Manager, and select Action > Heap Analyzer.
    • Run HeapAnalyzer.exe from the %Toolset%/bin folder (from a Windows 7 machine, launch Heap Analyzer with administrator privileges).

    Heap Analyzer launches, as shown in the following window.

  3. In the Configuration panel, select a target from the Target Selection drop-down list, as shown in the following example.

    For a target to display in the Target Selection list, it either needs to be a Developer Mode enabled physical device that is connected to your computer or a running simulation target.

  4. Click Walk Heap in the Configuration panel.

    • Running Heap Analyzer in a target for the first time automatically installs required modules to the target and prompts you to manually reset the target. After resetting the target, select it from the Configuration panel and click Walk Heap again.
    • If Heap Analyzer is not being run for the first time in the given target, the heap walk completes normally and the results are saved to a log file.

  5. To use On-device logging:
    1. Before using on-device logging:
      • Turn on the device gateway or connect the device to a PC.
      • Install Heap Analyzer utility modules. See Target Manager Help.
    2. Click Start On-Device Logging to start logging to the device. You can continue doing other tasks.

      Note: You can also perform on-device logging on the target using HeapStatisticsAgent.

    3. Click Stop On-Device Logging when done.
    4. Click Import Heap Log. The log is copied to C:\Users\\AppData\Roaming\Qualcomm\Brew MP\HeapAnalyzer\.
  6. The Available HeapDumps list in the Configuration panel are updated with the new Heap Dump log file, named either Sim_mmdd_*.csv for simulation targets or Device_mmdd_*.csv for physical devices.

  7. Click the new heap dump file listed under Available HeapDumps to view heap statistics.

If you perform multiple heap walks, separate heap dumps are stored without being overwritten.

To open files listed under Available HeapDumps, click Explore and select from the available files. The file opens in Microsoft Excel.