I want to determine the execution time of some methods in a program written in C++. The program runs in the simulator.
My first attempt was xta. While this works for some methods, xta gives up in some cases.
xta script:
Code: Select all
load <binary>
analyze function <mangled-method-name>
set required - 10 ms
print summary
exit
Code: Select all
>xta -source script.xta
>Route(1) function: <mangled-method-name>
Fail (timing violation), Num Paths: 4, Violation: Unresolved, Required: 100,0 ms, Worst: Unresolved, Min Core Frequency: Unresolved
Code: Select all
>xsim --gprof --max-cycles 100000 <binary>
>xobjdump --split <binary>
>gprof image_n0c0_2.elf tile\[0\]_core0.gprof --demangle > profile
># repeat for each core
Code: Select all
Each sample counts as 2e-06 milliseconds.
% cumulative self self total
time milliseco millisec calls um/call um/call name
47.08 0.00 0.00 1 288.13 288.13 <mangled-method-name>
Code: Select all
Route(1) function: _ZN11Transformer15run_processDataEv
Fail (missing loop iterations) with 36 unknowns, Num Paths: 128, Slack: 10,0 ms, Required: 10,0 ms, Worst: 4,2 us, Min Core Frequency: 0 MHz