Skip to content

Commit

Permalink
gcov: support GCC 7.1
Browse files Browse the repository at this point in the history
Starting from GCC 7.1, __gcov_exit is a new symbol expected to be
implemented in a profiling runtime.

[[email protected]: coding-style fixes]
[[email protected]: v2]
  Link: http:https://lkml.kernel.org/r/[email protected]
Link: http:https://lkml.kernel.org/r/[email protected]
Signed-off-by: Martin Liska <[email protected]>
Acked-by: Peter Oberparleiter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
marxin authored and torvalds committed May 12, 2017
1 parent 8d35bb3 commit 0538421
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions kernel/gcov/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters)
}
EXPORT_SYMBOL(__gcov_merge_icall_topn);

void __gcov_exit(void)
{
/* Unused. */
}
EXPORT_SYMBOL(__gcov_exit);

/**
* gcov_enable_events - enable event reporting through gcov_event()
*
Expand Down
4 changes: 3 additions & 1 deletion kernel/gcov/gcc_4_7.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include <linux/vmalloc.h>
#include "gcov.h"

#if (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#if (__GNUC__ >= 7)
#define GCOV_COUNTERS 9
#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
#define GCOV_COUNTERS 10
#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
#define GCOV_COUNTERS 9
Expand Down

0 comments on commit 0538421

Please sign in to comment.