aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-11-25 14:13:11 -0500
committerSteven Rostedt <rostedt@goodmis.org>2015-11-25 15:24:16 -0500
commitb05086c77a162dd8ef79606cb4723f1fc1448bb1 (patch)
treee3939af4c5377ceb2efe4fc791cdc797ee2c13b9 /include/linux/ftrace.h
parent02a392a0439ffdc62b4d8f17bd18d68736b166a9 (diff)
ftrace: Add variable ftrace_expected for archs to show expected code
When an anomaly is found while modifying function code, ftrace_bug() is called which disables the function tracing infrastructure and reports information about what failed. If the code that is to be replaced does not match what is expected, then actual code is shown. Currently there is no arch generic way to show what was expected. Add a new variable pointer calld ftrace_expected that the arch code can set to point to what it expected so that ftrace_bug() can report the actual text as well as the text that was expected to be there. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 870c8eea38cd..134f8d45b35b 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -305,6 +305,12 @@ enum ftrace_bug_type {
305}; 305};
306extern enum ftrace_bug_type ftrace_bug_type; 306extern enum ftrace_bug_type ftrace_bug_type;
307 307
308/*
309 * Archs can set this to point to a variable that holds the value that was
310 * expected at the call site before calling ftrace_bug().
311 */
312extern const void *ftrace_expected;
313
308void ftrace_bug(int err, struct dyn_ftrace *rec); 314void ftrace_bug(int err, struct dyn_ftrace *rec);
309 315
310struct seq_file; 316struct seq_file;