summaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-04-18 12:45:32 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-04-18 12:45:32 +0200
commit8404410b296095c78ed63f163ac5d417ff0647dd (patch)
tree542fcea7d106a8fd608c47da1a8c88255f3e2c5f /kernel/trace/ftrace.c
parentcxl: Delete an unnecessary check before the function call "kfree" (diff)
parentpowerpc/livepatch: Add live patching support on ppc64le (diff)
downloadlinux-8404410b296095c78ed63f163ac5d417ff0647dd.tar.xz
linux-8404410b296095c78ed63f163ac5d417ff0647dd.zip
Merge branch 'topic/livepatch' into next
Merge the support for live patching on ppc64le using mprofile-kernel. This branch has also been merged into the livepatching tree for v4.7.
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b1870fbd2b67..7e8d792da963 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1530,7 +1530,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;