coreboot-kgpe-d16/util/genprof
Rudolf Marek 73ab60a9d4 Fix ramstage location in trace scripts
The ramstage location has been changed. Reflect this in the script.

Change-Id: I76c9b38a8ffe2188e94146e845d23536625c0979
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Reviewed-on: http://review.coreboot.org/1504
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marcj303@gmail.com>
2012-09-13 10:11:53 +02:00
..
Makefile Add support utils for tracing 2011-09-07 01:27:57 +02:00
README Add support utils for tracing 2011-09-07 01:27:57 +02:00
genprof.c Add support utils for tracing 2011-09-07 01:27:57 +02:00
log2dress Fix ramstage location in trace scripts 2012-09-13 10:11:53 +02:00

README

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:

...
~0x001072e8(0x00100099)
~0x00108bc0(0x0010730a)
...

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/devices/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
that.

Great use is:

make
./genprof /tmp/yourlog ;  gprof ../../build/coreboot_ram |  ./gprof2dot.py -e0 -n0 | dot -Tpng -o output.png

Which generates a PNG with a call graph.