Skip to content

Commit

Permalink
gcov: add support for gcc 4.7 gcov format
Browse files Browse the repository at this point in the history
The gcov in-memory format changed in gcc 4.7.  The biggest change, which
requires this special implementation, is that gcov_info no longer contains
array of counters for each counter type for all functions and gcov_fn_info
is not used for mapping of function's counters to these arrays(offset).
Now each gcov_fn_info contans it's counters, which makes things a little
bit easier.

This is heavily based on the previous gcc_3_4.c implementation and patches
provided by Peter Oberparleiter.  Specially the buffer gcda implementation
for iterator.

[[email protected]: use kmemdup() and kcalloc()]
[[email protected]: gcc_4_7.c needs vmalloc.h]
Signed-off-by: Frantisek Hrbata <[email protected]>
Cc: Jan Stancek <[email protected]>
Cc: Kees Cook <[email protected]>
Reviewed-by: Peter Oberparleiter <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Andy Gospodarek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Frantisek Hrbata authored and torvalds committed Nov 13, 2013
1 parent 8cbce37 commit 5f41ea0
Show file tree
Hide file tree
Showing 2 changed files with 566 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/gcov/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ void __gcov_merge_delta(gcov_type *counters, unsigned int n_counters)
}
EXPORT_SYMBOL(__gcov_merge_delta);

void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters)
{
/* Unused. */
}
EXPORT_SYMBOL(__gcov_merge_ior);

/**
* gcov_enable_events - enable event reporting through gcov_event()
*
Expand Down
Loading

0 comments on commit 5f41ea0

Please sign in to comment.