Memory Analysis editor
Double-clicking a session name opens the Memory Analysis editor for the selected session.
The top part of the editor shows the details for the data selected in the bottom part. The bottom part shows an overview of the entire memory analysis session data set:
If the process does many allocations and deallocations, it could take some time for the traces and events to be registered, indexed, and shown.
- Allocations tab — trace information about allocations and deallocations.
- Bins tab — counters that track the general size of allocations and deallocations.
- Bands tab — counters that track the allocator's preallocated memory bands.
- Usage tab — information about the application's memory usage over time.
- Settings tab — settings for the running process.
To select data in the overview, click and drag over the region you're interested in.
The Memory Analysis perspective updates the details to reflect the data region you've selected.
Control the page layout
The Memory Analysis editor has several icons that you can use to control the view:
|Use this icon:||To:|
|Set the Chart and Detail Pane to a horizontal layout, one beside the other|
|Set the Chart and Detail Pane to a vertical layout, one above the other|
|Shows the Detail Pane if it's currently hidden|
|Hide the Detail Pane so the Chart pane has more display room|
|Hide the Chart pane so the Detail Pane has more display room|
|Toggle the Overview pane on and off|
Control the overview
Right-click on the Overview pane to change the view options.
This menu includes:
- By Timestamp
- Show the events sorted by their timestamp. Because several memory events can occur with the same time stamp, it might present the events in a confusing order (for example, a buffer's allocation and deallocation events could be shown in the wrong order if they happen during the sampling interval).
- By Count
- Show events sorted by their event index. This is the default ordering in the Overview pane.
- Filter the events shown by size, type, or both. You can also hide the matching allocations and deallocations, so that you see only the unmatched ones:
- Zoom In
- Zoom in on the selected range of events.
- Zoom Out
- Zoom out to the set of memory events that you previously zoomed in on.
Control the detail pane
- Right-click on the Detail pane.
Choose a graph from the Chart Types menu:
Option Description BarChart — a plain bar chart BarChart_3D — a 3D-bar chart Differentiator — a plain differentiator chart Differentiator_3D — a 3D differentiator chart
The Allocations tab shows allocation and deallocation events over time. Select a range of events to show a chart and details for that specific range of events. Details (list of allocations and deallocations) are shown in the Memory Events view.
The Allocations Overview can be wide, so it could be divided into pages. You can use the Page field to move from one page to another, and you can specify the number of points to show on each page.
By changing the chart type and selecting a specific region to view, you con observe more information.
The Bins tab is available only to users working with a System Developer's profile
The allocator keeps counters for allocations of various sizes to help gather statistics about how your application is using memory. These counters track blocks up to each power of two (2, 4, 8, 16, and so on, up to 4096) and large blocks (anything over 4 KB).
The Bins tab shows the values for these counters over time:
The counters are listed at the top of the Bins tab. Click the circle to the left of each counter to enable or disable the counter in the current view.
When the Bins tab is shown, the Chart pane shows allocations and deallocations for each bin at the time selected in the Details pane. The Details pane lists the memory events for the selected region of the Bins tab.
- Play the selected range of the Use Bins; the Bins Statistics chart shows the usage dynamically.
Because of the logging that's done for each allocation and deallocation, tracing can be slow, and it may change the timing of the application. You might want to do a first pass with the bins snapshots enabled to determine the hotspots or ranges, and on the second pass reduce the tracing to a certain range (minimum, maximum) to filter and reduce the log set.
The Bands tab is available only to users working with a System Developer's profile
For efficiency, the QNX allocator preallocates bands of memory (small buffers) for satisfying requests for small allocations. This saves you a trip through the kernel's memory manager for small blocks, thus improving your performance.
The bands handle allocations of up to 16, 24, 32, 48, 64, 80, 96, and 128 bytes in size, any activity in these bands is shown on the Bands tab:
The Usage tab is available only to users working with a System Developer's profile
The Usage tab shows your application's overall memory usage over time.
The Settings tab is available only to users working with a System Developer's profile
You can configure the Memory Analysis settings for a running program from the Settings tab:
|Update the current display with the latest data.|
|Determine whether the Momentics IDE automatically refreshes the displayed information when streaming data from the target. When selected, you need to click Refresh to update the information.|
|Gather information about any memory leaks encountered.|
|Take a snapshot of the current results.|
|Obtain a stack trace.|
|Memory Errors group||This group of configuration options controls the Memory Analysis tool's behavior when memory errors are detected.|
|Enable error detection||Detect memory allocation, deallocation, and access errors:
|When an error is detected||Memory Analysis takes the selected action when a memory error is detected. By default, it reports the error and attempts to continue, but you can also choose to launch the debugging tool or terminate the process.|
|Limit trace-back depth to||Specify the number of stack frames to record when logging a memory error.|
|Perform leak check every (ms)||Specify how often you want to check for leaks. This checking comes with a performance penalty.|
|Perform leak check when process exits||When selected, look for memory leaks when the process exits, before the operating system cleans up the process's resources.|
|Memory Tracing group||This group of configuration options controls the Memory Analysis tool's memory tracing features.|
|Enable memory allocation/deallocation tracing||When selected, trace all memory allocations and deallocations.|
|Limit back-trace depth to||Specify the number of stack frames to record when tracing memory events.|
|Minimum allocation to trace||The size, in bytes, of the smallest allocation to trace. Use 0 to trace all allocations.|
|Maximum allocation to trace||The size, in bytes, of the largest allocation to trace. Use 0 to trace all allocations.|
|Perform tracing every (ms)||How often to collect information about your program's allocation and deallocation activity. When setting this, consider how often your program allocates and deallocates memory, and for how long you plan to run the program.|
|Memory Snapshots group||Control the Memory Analysis tool's memory snapshot feature to capture memory information at a specific time.|
|Memory Snapshots||Enable the capture of memory information to create a snapshot.|
|Perform snapshot every (ms)||Specify the number of milliseconds between each memory snapshot.|
|Bins counters (comma separated) ex: 8, 16, 32, 1024 ...||A comma-separated list of the memory bins you want to trace.|
Last modified: 2015-07-24