memtab_visualizers package¶
Submodules¶
Module contents¶
Memtab Visualizers - A collection of report generators for memory analysis.
- class memtab_visualizers.CategoryMemmapReport¶
Bases:
MemmapReport
Category Memory Map Report.
This class extends
MemmapReport
to provide a category-based memory map visualization, where memory regions are grouped by category.The report shows memory usage organized by memory region categories, helping users understand how memory is allocated across different types of regions.
See Also¶
MemmapReport
: Base class that provides memory map reporting functionality.- report_name = 'categorymemmap'¶
- class memtab_visualizers.ExcelReport¶
Bases:
object
An Excel report generator for Memtab data.
This class creates Excel workbooks from memory table data, with separate worksheets for symbols and regions.
Note
The output Excel file will be named after the input ELF file, with the extension changed from .elf to .xlsx, and will be saved in the current working directory.
Output Format¶
The generated Excel file contains:
A “Symbols” worksheet containing all symbol information from the Memtab
A “Regions” worksheet containing all memory region information from the Memtab
Example¶
>>> report = ExcelReport() >>> report.generate_report(memtab, "output.xlsx") # Creates an Excel file in the current directory with the Memtab data
- generate_report(memtab, filename)¶
creates an excel workbook from the symbols and regions dataframes
- Return type:
None
- Args:
memtab (Memtab): the memory table to write to excel excel (str): the excel filename
- report_name = 'excel'¶
- class memtab_visualizers.MemmapReport¶
Bases:
object
A class that generates memory map visualizations based on analysis results.
The
MemmapReport
class creates interactive memory map visualizations using the Plotly library, showing the memory layout of code from a Memtab object. It can display memory maps based on either categories or ELF sections.- generate_report(memtab, filename)¶
This function generates a memory map visualization based on the analysis results. It uses the Plotly library to create the memory map and saves it as an HTML file. The memory map provides a visual representation of the memory layout of the code. The function first determines whether to use category-based or section-based memory mapping. It then iterates through the unique categories or sections and creates scatter plots for each region. The scatter plots represent the memory regions, symbols, and extra space between symbols.
- Return type:
None
- Args:
response (DataFrame): _description_ html (str): the html filename. this gets prepended with category_memmap_ or section_memmap_ depending on the category_based flag. category_based (bool, optional): _description_. Defaults to False. If True, the memory map is based on categories. If False, it is based on sections.
- report_name = 'memmap'¶
- class memtab_visualizers.MemoryProfilerReport¶
Bases:
object
A memory profiler report class for memtab visualizers.
- generate_report(memtab, filename)¶
Generate a text based memory profile, showing overall RAM and ROM, and then the different categories as a total in KB, and then % of RAM/ROM total
- Return type:
None
- report_name = 'memoryprofiler'¶
- class memtab_visualizers.SummaryReport¶
Bases:
object
A command line summary
- generate_report(memtab, filename)¶
Write a simple, couple-line summary out to stdout. This should be similar to the gnu binutils size command.
- Return type:
None
- Args:
memtab (Any): the memory table to summarize
- report_name = 'summary'¶
- class memtab_visualizers.TreemapReport¶
Bases:
object
A Treemap Report
- generate_report(memtab, filename)¶
This function generates a treemap visualization of the ROM items by category, subcategory, and filename. It uses the Plotly library to create the treemap and saves it as an HTML file. The treemap provides a visual representation of the memory usage by different categories and subcategories. The function first filters the data to include only items with “region”: “ROM”. It then groups the data by category, subcategory, and filename or symbol, and calculates the size of each item.
- Return type:
None
- Args:
response (DataFrame): _description_ html (str): the filename
- report_name = 'treemap'¶