Hi Cinly, I think you need to go in the route you are already in (gprof, etc).
As a side note, for those trying to profiling the target board instead of the host, please take a look at this project: https://github.com/orbcode/orbuculum Using it the author was able to profile the NuttX RTOS to track each functions was wasting CPU time: https://groups.google.com/g/nuttx/c/XwzRjsgq1rA/m/Kcpe4vydAgAJ BTW, this is the older mailing list, the new one in under Apache Foundation. BR, Alan On 5/18/21, Ooi, Cinly <[email protected]> wrote: > Hi > > Does anyone has experience profiling OpenOCD and can share the experience, > i.e. tools etc? > > The reason for asking is the driver that I am developing, aji_client > (https://github.com/intel/aji_openocd) is slow under some circumstances. > Good news is those circumstances are consistently reproducible. I want to > use profiling tool to identify the bottleneck and where I have to make > improvement to my driver. The conventional wisdom is to run a profiling tool > over the workload to get a picture of which functions take the longest time, > the bottleneck etc instead of stabbing in the dark for solution. I tried > gprof (1) and sprof (2) and are having issues with them. See notes. > > Many thanks in advance and best regards > Cinly > > Note: > > 1. gprof might be the wrong tool to use as my driver calls shared library > libaji_client.so (https://github.com/intel/libaji_client), which for this > task I need to profile as well. Chatter on the internet says gprof cannot > handle shared library > 2. sprof is giving me problems. I did not manage to get it to work for > anything more complex than a simple toy program. >
