Smarterasemi Profiling (VS Code Extension)
Import a simulator run folder containing a .log file and inspect NPU profiling data in a VS Code webview: summary, NPU cards, execution timeline, aggregate table, and a lazily loaded Perfetto trace.
The parser is built into the extension process. No Python runtime is required.
Features
- Command:
Smarterasemi Profiling: Import Run Folder
- Command:
Smarterasemi Profiling: Configure ELF Mapping
- Explorer context menu action for folders
- Generates
profiling-result.json and profiling-result.trace.json
- Dashboard panel opens immediately; the Perfetto trace panel opens only when requested
- PC-to-source lookup through
addr2line and a per-run ELF sidecar
Development
npm install
npm run build
Press F5 in VS Code and run Smarterasemi Profiling: Import Run Folder.
Settings
| Setting |
Default |
Description |
smarterasemiProfiler.writeOutputToRunFolder |
true |
Write profiling-result.json and profiling-result.trace.json into the imported run folder. When disabled, output is written to a temp folder. |
smarterasemiProfiler.addr2linePath |
"" |
Optional path to the addr2line executable. Leave empty to auto-detect a RISC-V toolchain or PATH entry. |
ELF Sidecar
PC-to-source lookup needs a debug-info ELF for each die. The extension stores this mapping in profiling-elf-config.json inside the imported run folder, so it stays with the run even when output JSON is written to a temp folder.
When you click a PC and no mapping exists, the extension opens a lazy mapping editor. For multi-die runs it shows every die in one table so you can review, browse, pattern-fill, apply one ELF to all dies, and save once. Convention-detected ELF candidates are only prefilled for confirmation; they are never silently associated.
You can also open the same editor manually with Smarterasemi Profiling: Configure ELF Mapping after importing a run folder.
Example profiling-elf-config.json:
{
"version": 1,
"elf_config": [
{
"die_id": 0,
"elf_path": "D:/firmware/case_die0.elf",
"load_addr": "0x4000000000",
"elf_image_base": "0x20000000"
}
]
}
die_id matches the trace event pid / logical core. Omit it only for a shared single-die fallback.
load_addr overrides the run log load address. Usually it can be omitted.
elf_image_base maps raw binary offset 0 to an ELF VMA. Complete objcopy -O binary images are usually inferred from ELF PT_LOAD; section-filtered images may need this explicit value.
All PC, load-address, and ELF-address math uses BigInt internally, with hexadecimal strings at JSON boundaries.