From FujitsuWiki
Jump to: navigation, search

MemoryAnalyzer is a small tool to analyze both the call hierarchy in your project, showing the stack usage of methods including all the calls to subroutines, and methods and variables ROM/RAM consumption. It does so by reading the stack usage files (*.stk) generated by the compiler and the memory map (.mp1) and symbol list (.mps) generated by the linker. It's written in Java.


Folder selection


  • Run the JAR with Java
  • Click on "Select folder..."
  • Select the path containing the stack usage files generated by the Softune compiler


  • Run the JAR and pass the path to the stack usage files as its only parameter

UI explanations and usage

  • Each node in a tree represents a single method
    • Exception: In "Show all methods" mode the root node is a placeholder so that each root method can be drawn
    • The number within each node represents the number of Bytes of stack used by that method and the calls to all sub-methods
    • Red nodes mark the methods under on parent method which use the most stack
  • Edges from one node to another represent a call by the upper node to the lower one
  • A single click on a node marks it and displays the methods attributes in the inspector table on the left
  • A double click on a node collapses it and all methods called by it into one node. Another double click expands it
  • A right click on a node opens a context menu which allows to:
    • Open a new window with the method set as root
    • Collapse/Expand the method (same as double click)
  • The graph can be scaled with the mouse scroll wheel
  • The graph can be moved by dragging inside the graph area

Third-party libraries used


Source can be found in the SVN.