I need to profile an application running in an STM32 (Cortex-M4) MCU.
Usually the tooling for such embedded CPUs is not as high-quality as those for developing regular PC code, so it looks like I'll have to roll my own solution.
By following this tutorial and making some changes along the way, I finally arrived at file containing a dump of the ITM data (a sequence of PC samples), which look like after processing through itmdump:
...
DWT - 0x8008c44PC - 0x8008c44
DWT - 0x8008e6aPC - 0x8008e6a
DWT - 0x8008e9aPC - 0x8008e9a
DWT - 0x8008c8aPC - 0x8008c8a
DWT - 0x8008e78PC - 0x8008e78
DWT - 0x8008e82PC - 0x8008e82
DWT - 0x80051eePC - 0x80051ee
DWT - 0x8008e56PC - 0x8008e56
...
I have picked random PC values and ran them through arm-none-eabi-addr2line and the mapping to source files looks reasonable.
I know such PC samples are at the heart of data collected by apps such as Intel VTune, Apple Instruments or Linux perf. Additionally I really love the visualization provided by these apps, or e.g. Hotspot.
My question is: is there a simple file format understood by e.g. Hotspot or one of the other mentioned apps? I am planning to write a converter from the ITM format to such a file format, so that I can open the output file on one of these apps to visualize the profiling data.