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.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 72a6cabb4d5b..55e6d63d46d0 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -286,10 +286,16 @@ struct ftrace_rec_iter *ftrace_rec_iter_start(void);
286struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter); 286struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter);
287struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter); 287struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter);
288 288
289#define for_ftrace_rec_iter(iter) \
290 for (iter = ftrace_rec_iter_start(); \
291 iter; \
292 iter = ftrace_rec_iter_next(iter))
293
294
289int ftrace_update_record(struct dyn_ftrace *rec, int enable); 295int ftrace_update_record(struct dyn_ftrace *rec, int enable);
290int ftrace_test_record(struct dyn_ftrace *rec, int enable); 296int ftrace_test_record(struct dyn_ftrace *rec, int enable);
291void ftrace_run_stop_machine(int command); 297void ftrace_run_stop_machine(int command);
292int ftrace_location(unsigned long ip); 298unsigned long ftrace_location(unsigned long ip);
293 299
294extern ftrace_func_t ftrace_trace_function; 300extern ftrace_func_t ftrace_trace_function;
295 301
@@ -308,11 +314,14 @@ ftrace_set_early_filter(struct ftrace_ops *ops, char *buf, int enable);
308/* defined in arch */ 314/* defined in arch */
309extern int ftrace_ip_converted(unsigned long ip); 315extern int ftrace_ip_converted(unsigned long ip);
310extern int ftrace_dyn_arch_init(void *data); 316extern int ftrace_dyn_arch_init(void *data);
317extern void ftrace_replace_code(int enable);
311extern int ftrace_update_ftrace_func(ftrace_func_t func); 318extern int ftrace_update_ftrace_func(ftrace_func_t func);
312extern void ftrace_caller(void); 319extern void ftrace_caller(void);
313extern void ftrace_call(void); 320extern void ftrace_call(void);
314extern void mcount_call(void); 321extern void mcount_call(void);
315 322
323void ftrace_modify_all_code(int command);
324
316#ifndef FTRACE_ADDR 325#ifndef FTRACE_ADDR
317#define FTRACE_ADDR ((unsigned long)ftrace_caller) 326#define FTRACE_ADDR ((unsigned long)ftrace_caller)
318#endif 327#endif
@@ -485,8 +494,12 @@ static inline void __ftrace_enabled_restore(int enabled)
485 extern void trace_preempt_on(unsigned long a0, unsigned long a1); 494 extern void trace_preempt_on(unsigned long a0, unsigned long a1);
486 extern void trace_preempt_off(unsigned long a0, unsigned long a1); 495 extern void trace_preempt_off(unsigned long a0, unsigned long a1);
487#else 496#else
488 static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { } 497/*
489 static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { } 498 * Use defines instead of static inlines because some arches will make code out
499 * of the CALLER_ADDR, when we really want these to be a real nop.
500 */
501# define trace_preempt_on(a0, a1) do { } while (0)
502# define trace_preempt_off(a0, a1) do { } while (0)
490#endif 503#endif
491 504
492#ifdef CONFIG_FTRACE_MCOUNT_RECORD 505#ifdef CONFIG_FTRACE_MCOUNT_RECORD