diff options
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 19 |
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); | |||
286 | struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter); | 286 | struct ftrace_rec_iter *ftrace_rec_iter_next(struct ftrace_rec_iter *iter); |
287 | struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter); | 287 | struct 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 | |||
289 | int ftrace_update_record(struct dyn_ftrace *rec, int enable); | 295 | int ftrace_update_record(struct dyn_ftrace *rec, int enable); |
290 | int ftrace_test_record(struct dyn_ftrace *rec, int enable); | 296 | int ftrace_test_record(struct dyn_ftrace *rec, int enable); |
291 | void ftrace_run_stop_machine(int command); | 297 | void ftrace_run_stop_machine(int command); |
292 | int ftrace_location(unsigned long ip); | 298 | unsigned long ftrace_location(unsigned long ip); |
293 | 299 | ||
294 | extern ftrace_func_t ftrace_trace_function; | 300 | extern 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 */ |
309 | extern int ftrace_ip_converted(unsigned long ip); | 315 | extern int ftrace_ip_converted(unsigned long ip); |
310 | extern int ftrace_dyn_arch_init(void *data); | 316 | extern int ftrace_dyn_arch_init(void *data); |
317 | extern void ftrace_replace_code(int enable); | ||
311 | extern int ftrace_update_ftrace_func(ftrace_func_t func); | 318 | extern int ftrace_update_ftrace_func(ftrace_func_t func); |
312 | extern void ftrace_caller(void); | 319 | extern void ftrace_caller(void); |
313 | extern void ftrace_call(void); | 320 | extern void ftrace_call(void); |
314 | extern void mcount_call(void); | 321 | extern void mcount_call(void); |
315 | 322 | ||
323 | void 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 |