gcov: Adding support for coverage information

This patch introduce coverage support to Xen.
Currently it allows to compile Xen with coverage support but there is no
way to extract them.

The declarations came from Linux source files (as you can see from file
headers).

The idea is to have some operations mainly
- get coverage information size
- read coverage information
- reset coverage counters

Linux use a file system to export these information. The information will
be a blob to handle with some tools (as usually tools require a bunch of
files but Xen does not handle files at all). I'll pack them to make things
simpler as possible.

These information cannot be put in a specific section (allowing a safe
mapping) as gcc use .rodata, .data, .text and .ctors sections.

I added code to handle constructors used in this case to initialize a
linked list of files.

I excluded %.init.o files as they are used before Xen start and should
not have section like .text or .data.

I used a "coverage" configuration option to mimic the "debug" one.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
This commit is contained in:
Frediano Ziglio authored and Keir committed 2013-02-21 16:15:40 +00:00
1 parent 68ca0bc4ba
commit 26c9d03dd4
8 files changed
+169

No files matched your search

+2
View File
@@ -13,6 +13,8 @@
*.tmp
*.spot
*.spit
*.gcno
*.gcda
TAGS
GTAGS
GRTAGS
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.