I am trying to parse trace got from heap_trace_init_tohost feature using JTAG USB ESP32S3.
In code:
Code: Select all
esp_log_set_vprintf(&esp_sysview_vprintf);
if(heap_trace_init_tohost() != ESP_OK) {
ESP_LOGE("TAG", "Failed to init heap trace!");
return;
}
heap_trace_start(HEAP_TRACE_ALL);
...
heap_trace_stop();
Code: Select all
~/.espressif/tools/openocd-esp32/v0.11.0-esp32-20220706/openocd-esp32/bin/openocd -f board/esp32s3-builtin.cfg
Code: Select all
~/.espressif/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gdb -x [project-path]/heaptrace-gdbinit [project-path]/build/project.elf
Code: Select all
set pagination off
target remote :3333
mon reset halt
flushregs
tb heap_trace_start
commands
mon esp sysview start file:///[project-path]/trace/pro-cpu.SVDat file:///[project-path]/trace/app-cpu.SVDat 0 -1 1
c
end
tb heap_trace_stop
commands
mon esp sysview stop
end
c
Code: Select all
Info : Trace data processor thread exited with 0
Disconnect targets...
Info : [esp32s3.cpu0] Target halted, PC=0x4038233E, debug_reason=00000000
Info : Set GDB target to 'esp32s3.cpu0'
Info : [esp32s3.cpu1] Target halted, PC=0x4037C5C8, debug_reason=00000000
Info : Targets disconnected.
Tracing is STOPPED. Size is 3725777 of 4294967295 @ 350.894470 (81.648125) KB/s
Data: blocks incomplete 776, lost bytes: 453
Block read time [17.902000..199.517990] ms
Block proc time [0.072000..0.232000] ms
Code: Select all
~/.espressif/python_env/idf5.0_py3.10_env/bin/python ~/esp-idf/tools/esp_app_trace/sysviewtrace_proc.py -p -b [project-path]/build/project.elf [project-path]/trace/pro-cpu.SVDat
Code: Select all
File "~/esp-idf/tools/esp_app_trace/espytrace/sysview.py", line 352, in _read_payload
raise SysViewTraceParseError('Unknown event ID %d!' % self.id)
espytrace.sysview.SysViewTraceParseError: Unknown event ID 463!
Code: Select all
File "~/esp_app_trace/espytrace/sysview.py", line 368, in _read_payload
raise SysViewTraceParseError('Invalid event {}({:d}) payload len {:d}! Must be {:d}.'.format(self.name, self.id, self.plen, params_len))
espytrace.sysview.SysViewTraceParseError: Invalid event xQueueGenericReceive(49) payload len 15! Must be 18.
Or maybe can I improve quality of tracing. I am working on ESP32S3 (ESP32 v5.0).
Small comment:
This site needs update:
https://docs.espressif.com/projects/esp ... based-mode
ex.:
- 'esp sysview start' takes 2 files as argument not 1 as it is in example
- vscode and eclipse plugins for heap tracing seems to be completely not fallowing this latest esp-idf v.5.0