[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161016151616.31451-4-vegard.nossum@oracle.com>
Date: Sun, 16 Oct 2016 17:16:07 +0200
From: Vegard Nossum <vegard.nossum@...cle.com>
To: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.cz>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Luis R . Rodriguez" <mcgrof@...nel.org>,
Vegard Nossum <vegard.nossum@...cle.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH 03/12] ftrace: declare __{start,stop}_mcount_loc as external array
Cc: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
kernel/trace/ftrace.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 2050a765..3c37036 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -13,6 +13,7 @@
* Copyright (C) 2004 Nadia Yvette Chambers
*/
+#include <linux/extarray.h>
#include <linux/stop_machine.h>
#include <linux/clocksource.h>
#include <linux/kallsyms.h>
@@ -5075,10 +5076,10 @@ void ftrace_module_init(struct module *mod)
}
#endif /* CONFIG_MODULES */
+DECLARE_EXTARRAY(unsigned long, mcount_loc);
+
void __init ftrace_init(void)
{
- extern unsigned long __start_mcount_loc[];
- extern unsigned long __stop_mcount_loc[];
unsigned long count, flags;
int ret;
@@ -5088,7 +5089,7 @@ void __init ftrace_init(void)
if (ret)
goto failed;
- count = __stop_mcount_loc - __start_mcount_loc;
+ count = ext_size(mcount_loc);
if (!count) {
pr_info("ftrace: No functions to be traced?\n");
goto failed;
@@ -5100,8 +5101,8 @@ void __init ftrace_init(void)
last_ftrace_enabled = ftrace_enabled = 1;
ret = ftrace_process_locs(NULL,
- __start_mcount_loc,
- __stop_mcount_loc);
+ ext_start(mcount_loc),
+ ext_end(mcount_loc));
set_ftrace_early_filters();
--
2.10.0.479.g221bd91
Powered by blists - more mailing lists