diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-05 04:24:48 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-05 04:24:48 -0500 |
commit | 5e1607a00bd082972629d3d68c95c8bcf902b55a (patch) | |
tree | 2751baf5ee286cdec8f4b1afcb7332f4c1f5f454 | |
parent | 53664738c122bfe8b0e489fddaf2ab265c9133c8 (diff) |
tracing: rename ftrace_printk() => trace_printk()
Impact: cleanup
Use a more generic name - this also allows the prototype to move
to kernel.h and be generally available to kernel developers who
want to do some quick tracing.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | Documentation/ftrace.txt | 6 | ||||
-rw-r--r-- | include/linux/ftrace.h | 18 | ||||
-rw-r--r-- | kernel/trace/trace.c | 8 | ||||
-rw-r--r-- | kernel/trace/trace.h | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt index 2041ee951c1a..22614bef6359 100644 --- a/Documentation/ftrace.txt +++ b/Documentation/ftrace.txt | |||
@@ -1466,11 +1466,11 @@ want, depending on your needs. | |||
1466 | 1466 | ||
1467 | 1467 | ||
1468 | You can put some comments on specific functions by using | 1468 | You can put some comments on specific functions by using |
1469 | ftrace_printk() For example, if you want to put a comment inside | 1469 | trace_printk() For example, if you want to put a comment inside |
1470 | the __might_sleep() function, you just have to include | 1470 | the __might_sleep() function, you just have to include |
1471 | <linux/ftrace.h> and call ftrace_printk() inside __might_sleep() | 1471 | <linux/ftrace.h> and call trace_printk() inside __might_sleep() |
1472 | 1472 | ||
1473 | ftrace_printk("I'm a comment!\n") | 1473 | trace_printk("I'm a comment!\n") |
1474 | 1474 | ||
1475 | will produce: | 1475 | will produce: |
1476 | 1476 | ||
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 1f69ac7c1587..fbb9c364e166 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -329,11 +329,11 @@ extern void | |||
329 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); | 329 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); |
330 | 330 | ||
331 | /** | 331 | /** |
332 | * ftrace_printk - printf formatting in the ftrace buffer | 332 | * trace_printk - printf formatting in the ftrace buffer |
333 | * @fmt: the printf format for printing | 333 | * @fmt: the printf format for printing |
334 | * | 334 | * |
335 | * Note: __ftrace_printk is an internal function for ftrace_printk and | 335 | * Note: __trace_printk is an internal function for trace_printk and |
336 | * the @ip is passed in via the ftrace_printk macro. | 336 | * the @ip is passed in via the trace_printk macro. |
337 | * | 337 | * |
338 | * This function allows a kernel developer to debug fast path sections | 338 | * This function allows a kernel developer to debug fast path sections |
339 | * that printk is not appropriate for. By scattering in various | 339 | * that printk is not appropriate for. By scattering in various |
@@ -341,14 +341,14 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); | |||
341 | * where problems are occurring. | 341 | * where problems are occurring. |
342 | * | 342 | * |
343 | * This is intended as a debugging tool for the developer only. | 343 | * This is intended as a debugging tool for the developer only. |
344 | * Please refrain from leaving ftrace_printks scattered around in | 344 | * Please refrain from leaving trace_printks scattered around in |
345 | * your code. | 345 | * your code. |
346 | */ | 346 | */ |
347 | # define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt) | 347 | # define trace_printk(fmt...) __trace_printk(_THIS_IP_, fmt) |
348 | extern int | 348 | extern int |
349 | __ftrace_printk(unsigned long ip, const char *fmt, ...) | 349 | __trace_printk(unsigned long ip, const char *fmt, ...) |
350 | __attribute__ ((format (printf, 2, 3))); | 350 | __attribute__ ((format (printf, 2, 3))); |
351 | # define ftrace_vprintk(fmt, ap) __ftrace_printk(_THIS_IP_, fmt, ap) | 351 | # define ftrace_vprintk(fmt, ap) __trace_printk(_THIS_IP_, fmt, ap) |
352 | extern int | 352 | extern int |
353 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); | 353 | __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); |
354 | extern void ftrace_dump(void); | 354 | extern void ftrace_dump(void); |
@@ -356,13 +356,13 @@ extern void ftrace_dump(void); | |||
356 | static inline void | 356 | static inline void |
357 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } | 357 | ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } |
358 | static inline int | 358 | static inline int |
359 | ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); | 359 | trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); |
360 | 360 | ||
361 | static inline void tracing_start(void) { } | 361 | static inline void tracing_start(void) { } |
362 | static inline void tracing_stop(void) { } | 362 | static inline void tracing_stop(void) { } |
363 | static inline void ftrace_off_permanent(void) { } | 363 | static inline void ftrace_off_permanent(void) { } |
364 | static inline int | 364 | static inline int |
365 | ftrace_printk(const char *fmt, ...) | 365 | trace_printk(const char *fmt, ...) |
366 | { | 366 | { |
367 | return 0; | 367 | return 0; |
368 | } | 368 | } |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d1ef43999d9e..c0e9c1263393 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -48,7 +48,7 @@ unsigned long __read_mostly tracing_thresh; | |||
48 | * We need to change this state when a selftest is running. | 48 | * We need to change this state when a selftest is running. |
49 | * A selftest will lurk into the ring-buffer to count the | 49 | * A selftest will lurk into the ring-buffer to count the |
50 | * entries inserted during the selftest although some concurrent | 50 | * entries inserted during the selftest although some concurrent |
51 | * insertions into the ring-buffer such as ftrace_printk could occurred | 51 | * insertions into the ring-buffer such as trace_printk could occurred |
52 | * at the same time, giving false positive or negative results. | 52 | * at the same time, giving false positive or negative results. |
53 | */ | 53 | */ |
54 | static bool __read_mostly tracing_selftest_running; | 54 | static bool __read_mostly tracing_selftest_running; |
@@ -291,7 +291,7 @@ static const char *trace_options[] = { | |||
291 | "block", | 291 | "block", |
292 | "stacktrace", | 292 | "stacktrace", |
293 | "sched-tree", | 293 | "sched-tree", |
294 | "ftrace_printk", | 294 | "trace_printk", |
295 | "ftrace_preempt", | 295 | "ftrace_preempt", |
296 | "branch", | 296 | "branch", |
297 | "annotate", | 297 | "annotate", |
@@ -3768,7 +3768,7 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args) | |||
3768 | } | 3768 | } |
3769 | EXPORT_SYMBOL_GPL(trace_vprintk); | 3769 | EXPORT_SYMBOL_GPL(trace_vprintk); |
3770 | 3770 | ||
3771 | int __ftrace_printk(unsigned long ip, const char *fmt, ...) | 3771 | int __trace_printk(unsigned long ip, const char *fmt, ...) |
3772 | { | 3772 | { |
3773 | int ret; | 3773 | int ret; |
3774 | va_list ap; | 3774 | va_list ap; |
@@ -3781,7 +3781,7 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...) | |||
3781 | va_end(ap); | 3781 | va_end(ap); |
3782 | return ret; | 3782 | return ret; |
3783 | } | 3783 | } |
3784 | EXPORT_SYMBOL_GPL(__ftrace_printk); | 3784 | EXPORT_SYMBOL_GPL(__trace_printk); |
3785 | 3785 | ||
3786 | int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap) | 3786 | int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap) |
3787 | { | 3787 | { |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 12cd119cca32..8beff03fda68 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
@@ -115,7 +115,7 @@ struct userstack_entry { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * ftrace_printk entry: | 118 | * trace_printk entry: |
119 | */ | 119 | */ |
120 | struct print_entry { | 120 | struct print_entry { |
121 | struct trace_entry ent; | 121 | struct trace_entry ent; |