diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2016-03-24 22:04:01 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-14 15:47:05 +1000 |
commit | 04cf31a759ef575f750a63777cee95500e410994 (patch) | |
tree | ee5dbbf8b9ac93c0b0e28a21b59db58cd4b19bcf /kernel/trace | |
parent | 8c50b72a3b4f1f7cdfdfebd233b1cbd121262e65 (diff) | |
download | linux-04cf31a759ef575f750a63777cee95500e410994.tar.gz linux-04cf31a759ef575f750a63777cee95500e410994.tar.bz2 linux-04cf31a759ef575f750a63777cee95500e410994.zip |
ftrace: Make ftrace_location_range() global
In order to support live patching on powerpc we would like to call
ftrace_location_range(), so make it global.
Signed-off-by: Torsten Duwe <duwe@suse.de>
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index eca592f977b2..e1b3f2312db0 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1533,7 +1533,19 @@ static int ftrace_cmp_recs(const void *a, const void *b) return 0; } -static unsigned long ftrace_location_range(unsigned long start, unsigned long end) +/** + * ftrace_location_range - return the first address of a traced location + * if it touches the given ip range + * @start: start of range to search. + * @end: end of range to search (inclusive). @end points to the last byte + * to check. + * + * Returns rec->ip if the related ftrace location is a least partly within + * the given address range. That is, the first address of the instruction + * that is either a NOP or call to the function tracer. It checks the ftrace + * internal tables to determine if the address belongs or not. + */ +unsigned long ftrace_location_range(unsigned long start, unsigned long end) { struct ftrace_page *pg; struct dyn_ftrace *rec; |