blob: d4159c2fd6bb52a9d0e7a4f96d525c30baa04959 [file] [log] [blame]
Function tracing
Enable CONFIG_TRACE in debug menu. Run the compiled image on target. You will get
a log with a lot of lines like:
First address is address of function which was just entered, the second address
is address of functions which call that.
You can use the log2dress to dress the log again:
src/arch/x86/lib/c_start.S:85 calls /home/ruik/coreboot/src/boot/selfboot.c:367
/home/ruik/coreboot/src/boot/selfboot.c:370 calls /home/ruik/coreboot/src/device/device.c:325
Alternatively, you can use genprof to generate a gmon.out file, which can be used
by gprof to show the call traces. You will need to install uthash library to compile
Great use is:
./genprof /tmp/yourlog ; gprof ../../build/ramstage | ./ -e0 -n0 | dot -Tpng -o output.png
Which generates a PNG with a call graph.