lkml.org 
[lkml]   [2016]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/12] ftrace: declare __{start,stop}_mcount_loc as external array
Date
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.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
\
 
 \ /
  Last update: 2016-10-16 17:17    [W:0.287 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site