mirror of
https://github.com/esphome/esphome.git
synced 2026-02-21 08:55:36 -07:00
Merge branch 'top_30_symbols_analyze_memory' into integration
This commit is contained in:
@@ -155,13 +155,12 @@ class MemoryAnalyzerCLI(MemoryAnalyzer):
|
||||
|
||||
def _add_top_symbols(self, lines: list[str]) -> None:
|
||||
"""Add a section showing the top largest symbols in the binary."""
|
||||
# Collect all symbols from all components
|
||||
all_symbols: list[
|
||||
tuple[str, str, int, str, str]
|
||||
] = [] # (symbol, demangled, size, section, component)
|
||||
for component, symbols in self._component_symbols.items():
|
||||
for symbol, demangled, size, section in symbols:
|
||||
all_symbols.append((symbol, demangled, size, section, component))
|
||||
# Collect all symbols from all components: (symbol, demangled, size, section, component)
|
||||
all_symbols = [
|
||||
(symbol, demangled, size, section, component)
|
||||
for component, symbols in self._component_symbols.items()
|
||||
for symbol, demangled, size, section in symbols
|
||||
]
|
||||
|
||||
# Get top N symbols by size using heapq for efficiency
|
||||
top_symbols = heapq.nlargest(
|
||||
|
||||
Reference in New Issue
Block a user