[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <000d01cf6e42$b2fac6f0$18f054d0$@sei.pku.edu.cn>
Date: Tue, 13 May 2014 08:31:36 +0800
From: "Yuan Pengfei" <yuanpf12@....pku.edu.cn>
To: "'Peter Oberparleiter'" <oberpar@...ux.vnet.ibm.com>
Cc: <linux-kernel@...r.kernel.org>
Subject: [PATCH v2] gcov: add support for GCC 4.9
From: Yuan Pengfei <coolypf@...com>
This patch handles the gcov-related changes in GCC 4.9:
A new counter (time profile) is added.
See http://gcc.gnu.org/gcc-4.9/changes.html
Signed-off-by: Yuan Pengfei <coolypf@...com>
---
kernel/gcov/base.c | 6 ++++++
kernel/gcov/gcc_4_7.c | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
index f45b75b..b358a80 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)
}
EXPORT_SYMBOL(__gcov_merge_ior);
+void __gcov_merge_time_profile(gcov_type *counters, unsigned int
n_counters)
+{
+ /* Unused. */
+}
+EXPORT_SYMBOL(__gcov_merge_time_profile);
+
/**
* gcov_enable_events - enable event reporting through gcov_event()
*
diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index 7465944..7f74b59 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -18,7 +18,12 @@
#include <linux/vmalloc.h>
#include "gcov.h"
+#if __GNUC__ == 4 && __GNUC_MINOR__ >= 9
+#define GCOV_COUNTERS 9
+#else
#define GCOV_COUNTERS 8
+#endif
+
#define GCOV_TAG_FUNCTION_LENGTH 3
static struct gcov_info *gcov_info_head;
--
2.0.0.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists