[coreboot] Patch merged into coreboot/master: d37ab45 Implement GCC code coverage analysis
gerrit at coreboot.org
gerrit at coreboot.org
Sat Jan 12 19:09:56 CET 2013
the following patch was just integrated into master:
commit d37ab454d4ea702df276a66d4e0ea9f73d4f6fe0
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Tue Dec 18 16:23:28 2012 -0800
Implement GCC code coverage analysis
In order to provide some insight on what code is executed during
coreboot's run time and how well our test scenarios work, this
adds code coverage support to coreboot's ram stage. This should
be easily adaptable for payloads, and maybe even romstage.
See http://gcc.gnu.org/onlinedocs/gcc/Gcov.html for
more information.
To instrument coreboot, select CONFIG_COVERAGE ("Code coverage
support") in Kconfig, and recompile coreboot. coreboot will then
store its code coverage information into CBMEM, if possible.
Then, run "cbmem -CV" as root on the target system running the
instrumented coreboot binary. This will create a whole bunch of
.gcda files that contain coverage information. Tar them up, copy
them to your build system machine, and untar them. Then you can
use your favorite coverage utility (gcov, lcov, ...) to visualize
code coverage.
For a sneak peak of what will expect you, please take a look
at http://www.coreboot.org/~stepan/coreboot-coverage/
Change-Id: Ib287d8309878a1f5c4be770c38b1bc0bb3aa6ec7
Signed-off-by: Stefan Reinauer <reinauer at google.com>
Reviewed-on: http://review.coreboot.org/2052
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix at chromium.org>
Reviewed-by: Martin Roth <martin at se-eng.com>
Reviewed-by: Ronald G. Minnich <rminnich at gmail.com>
Build-Tested: build bot (Jenkins) at Thu Jan 10 00:47:50 2013, giving +1
Reviewed-By: David Hendricks <dhendrix at chromium.org> at Fri Jan 11 02:51:51 2013, giving +1
Reviewed-By: Ronald G. Minnich <rminnich at gmail.com> at Fri Jan 11 23:24:33 2013, giving +2
See http://review.coreboot.org/2052 for details.
-gerrit
More information about the coreboot
mailing list