aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/gcov
diff options
context:
space:
mode:
authorYuan Pengfei <coolypf@qq.com>2014-06-10 18:18:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-10 18:34:46 -0400
commita992bf836f9c3039a16f4bd068d161c86c6c3e2c (patch)
treeebe4e7b553b45191df5b9fe25a446390a5a8376c /kernel/gcov
parent79deb3c148e0ed0ac3dab9e953777b096d58b443 (diff)
gcov: add support for GCC 4.9
This patch handles the gcov-related changes in GCC 4.9: A new counter (time profile) is added. The total number is 9 now. A new profile merge function __gcov_merge_time_profile is added. See gcc/gcov-io.h and libgcc/libgcov-merge.c For the first change, the layout of struct gcov_info is affected. For the second one, a dummy function is added to kernel/gcov/base.c similarly. Signed-off-by: Yuan Pengfei <coolypf@qq.com> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/gcov')
-rw-r--r--kernel/gcov/base.c6
-rw-r--r--kernel/gcov/gcc_4_7.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
index f45b75b713c0..b358a802fd18 100644
--- a/kernel/gcov/base.c
+++ b/kernel/gcov/base.c
@@ -85,6 +85,12 @@ void __gcov_merge_ior(gcov_type *counters, unsigned int n_counters)
85} 85}
86EXPORT_SYMBOL(__gcov_merge_ior); 86EXPORT_SYMBOL(__gcov_merge_ior);
87 87
88void __gcov_merge_time_profile(gcov_type *counters, unsigned int n_counters)
89{
90 /* Unused. */
91}
92EXPORT_SYMBOL(__gcov_merge_time_profile);
93
88/** 94/**
89 * gcov_enable_events - enable event reporting through gcov_event() 95 * gcov_enable_events - enable event reporting through gcov_event()
90 * 96 *
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index 2c6e4631c814..826ba9fb5e32 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -18,7 +18,12 @@
18#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
19#include "gcov.h" 19#include "gcov.h"
20 20
21#if __GNUC__ == 4 && __GNUC_MINOR__ >= 9
22#define GCOV_COUNTERS 9
23#else
21#define GCOV_COUNTERS 8 24#define GCOV_COUNTERS 8
25#endif
26
22#define GCOV_TAG_FUNCTION_LENGTH 3 27#define GCOV_TAG_FUNCTION_LENGTH 3
23 28
24static struct gcov_info *gcov_info_head; 29static struct gcov_info *gcov_info_head;