]> Pileus Git - ~andy/linux/blobdiff - include/linux/ftrace.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[~andy/linux] / include / linux / ftrace.h
index 3f79bc458bffe46788a3a3ac674afa3e2f7a3d26..028e26f0bf0817b3b37f874d59d17991c9007d1e 100644 (file)
@@ -173,10 +173,7 @@ struct dyn_ftrace {
                unsigned long           ip; /* address of mcount call-site */
                struct dyn_ftrace       *freelist;
        };
-       union {
-               unsigned long           flags;
-               struct dyn_ftrace       *newlist;
-       };
+       unsigned long           flags;
        struct dyn_arch_ftrace          arch;
 };
 
@@ -205,6 +202,15 @@ enum {
        FTRACE_UPDATE_MAKE_NOP,
 };
 
+enum {
+       FTRACE_ITER_FILTER      = (1 << 0),
+       FTRACE_ITER_NOTRACE     = (1 << 1),
+       FTRACE_ITER_PRINTALL    = (1 << 2),
+       FTRACE_ITER_DO_HASH     = (1 << 3),
+       FTRACE_ITER_HASH        = (1 << 4),
+       FTRACE_ITER_ENABLED     = (1 << 5),
+};
+
 void arch_ftrace_update_code(int command);
 
 struct ftrace_rec_iter;
@@ -220,6 +226,18 @@ int ftrace_location(unsigned long ip);
 
 extern ftrace_func_t ftrace_trace_function;
 
+int ftrace_regex_open(struct ftrace_ops *ops, int flag,
+                 struct inode *inode, struct file *file);
+ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
+                           size_t cnt, loff_t *ppos);
+ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
+                            size_t cnt, loff_t *ppos);
+loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int origin);
+int ftrace_regex_release(struct inode *inode, struct file *file);
+
+void __init
+ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable);
+
 /* defined in arch */
 extern int ftrace_ip_converted(unsigned long ip);
 extern int ftrace_dyn_arch_init(void *data);
@@ -314,6 +332,25 @@ static inline int ftrace_text_reserved(void *start, void *end)
 {
        return 0;
 }
+
+/*
+ * Again users of functions that have ftrace_ops may not
+ * have them defined when ftrace is not enabled, but these
+ * functions may still be called. Use a macro instead of inline.
+ */
+#define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; })
+#define ftrace_set_early_filter(ops, buf, enable) do { } while (0)
+
+static inline ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
+                           size_t cnt, loff_t *ppos) { return -ENODEV; }
+static inline ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf,
+                            size_t cnt, loff_t *ppos) { return -ENODEV; }
+static inline loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int origin)
+{
+       return -ENODEV;
+}
+static inline int
+ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; }
 #endif /* CONFIG_DYNAMIC_FTRACE */
 
 /* totally disable ftrace - can not re-enable after this */