aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index e5ca8ef50e9b..99d0fbcbaf79 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -89,6 +89,9 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
89 * that the call back has its own recursion protection. If it does 89 * that the call back has its own recursion protection. If it does
90 * not set this, then the ftrace infrastructure will add recursion 90 * not set this, then the ftrace infrastructure will add recursion
91 * protection for the caller. 91 * protection for the caller.
92 * STUB - The ftrace_ops is just a place holder.
93 * INITIALIZED - The ftrace_ops has already been initialized (first use time
94 * register_ftrace_function() is called, it will initialized the ops)
92 */ 95 */
93enum { 96enum {
94 FTRACE_OPS_FL_ENABLED = 1 << 0, 97 FTRACE_OPS_FL_ENABLED = 1 << 0,
@@ -98,6 +101,8 @@ enum {
98 FTRACE_OPS_FL_SAVE_REGS = 1 << 4, 101 FTRACE_OPS_FL_SAVE_REGS = 1 << 4,
99 FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, 102 FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5,
100 FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, 103 FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6,
104 FTRACE_OPS_FL_STUB = 1 << 7,
105 FTRACE_OPS_FL_INITIALIZED = 1 << 8,
101}; 106};
102 107
103struct ftrace_ops { 108struct ftrace_ops {
@@ -108,6 +113,7 @@ struct ftrace_ops {
108#ifdef CONFIG_DYNAMIC_FTRACE 113#ifdef CONFIG_DYNAMIC_FTRACE
109 struct ftrace_hash *notrace_hash; 114 struct ftrace_hash *notrace_hash;
110 struct ftrace_hash *filter_hash; 115 struct ftrace_hash *filter_hash;
116 struct mutex regex_lock;
111#endif 117#endif
112}; 118};
113 119
@@ -259,8 +265,10 @@ struct ftrace_probe_ops {
259 void (*func)(unsigned long ip, 265 void (*func)(unsigned long ip,
260 unsigned long parent_ip, 266 unsigned long parent_ip,
261 void **data); 267 void **data);
262 int (*callback)(unsigned long ip, void **data); 268 int (*init)(struct ftrace_probe_ops *ops,
263 void (*free)(void **data); 269 unsigned long ip, void **data);
270 void (*free)(struct ftrace_probe_ops *ops,
271 unsigned long ip, void **data);
264 int (*print)(struct seq_file *m, 272 int (*print)(struct seq_file *m,
265 unsigned long ip, 273 unsigned long ip,
266 struct ftrace_probe_ops *ops, 274 struct ftrace_probe_ops *ops,
@@ -394,7 +402,6 @@ ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
394 size_t cnt, loff_t *ppos); 402 size_t cnt, loff_t *ppos);
395ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, 403ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
396 size_t cnt, loff_t *ppos); 404 size_t cnt, loff_t *ppos);
397loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int whence);
398int ftrace_regex_release(struct inode *inode, struct file *file); 405int ftrace_regex_release(struct inode *inode, struct file *file);
399 406
400void __init 407void __init
@@ -567,6 +574,8 @@ static inline int
567ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } 574ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; }
568#endif /* CONFIG_DYNAMIC_FTRACE */ 575#endif /* CONFIG_DYNAMIC_FTRACE */
569 576
577loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence);
578
570/* totally disable ftrace - can not re-enable after this */ 579/* totally disable ftrace - can not re-enable after this */
571void ftrace_kill(void); 580void ftrace_kill(void);
572 581