Here's the latest zomgsofast OpenOcd.exe:
https://github.com/rsaxvc/openocd-esp32 ... 6763071220 , click "Upload Artifact", then "Artifact download URL:
https://github.com/rsaxvc/openocd-esp32 ... 2545220858"
Steps:
[*] unzip OpenOCD, I put mine in c:\Espressif\tools\openocd-esp32\rsaxvc-zomgsofast
[*] Open ESP-IDF CMD and "set OPENOCD_SCRIPTS=c:\Espressif\tools\openocd-esp32\rsaxvc-zomgsofast\openocd-esp32\share\openocd\scripts"
[*] Run OpenOCD, I used "c:\Espressif\tools\openocd-esp32\rsaxvc-zomgsofast\openocd-esp32\bin\openocd.exe -f board\esp32s3-builtin.cfg"
[*] Connect to OpenOCD with Putty/Telnet
[*] Optionally in OpenOCD, select CPU0/CPU1 to profile.
[*] In OpenOCD, run "profile 5 gmon.out" - should take 80-120k samples with builtin-JTAG.
[*] Select the elf section for analysis. From my project folder, I copied the ELF while renaming with: 'xtensa-esp32s3-elf-objcopy.exe --rename-section .flash.text=.text build\blitz_app.elf blitz_app.elf'. TBH This step needs improvement, but the work probably would be best done in gprof either by processing sections according to PROGBITS+EXEC flags or allowing section names on the command line. By default gprof only searches the ELF for ".text", which ESP-IDF does not emit(instead it has things like .flash.text, .iram.text, .rom.text, ... which should all be loadable if GPROF knew to do it.
[*] Produce the report with 'xtensa-esp32s3-elf-gprof.exe blitz_app.elf gmon.out'