Commit 5e1607a0 authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
parent 53664738
...@@ -1466,11 +1466,11 @@ want, depending on your needs. ...@@ -1466,11 +1466,11 @@ want, depending on your needs.
You can put some comments on specific functions by using You can put some comments on specific functions by using
ftrace_printk() For example, if you want to put a comment inside trace_printk() For example, if you want to put a comment inside
the __might_sleep() function, you just have to include the __might_sleep() function, you just have to include
<linux/ftrace.h> and call ftrace_printk() inside __might_sleep() <linux/ftrace.h> and call trace_printk() inside __might_sleep()
ftrace_printk("I'm a comment!\n") trace_printk("I'm a comment!\n")
will produce: will produce:
......
...@@ -329,11 +329,11 @@ extern void ...@@ -329,11 +329,11 @@ extern void
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
/** /**
* ftrace_printk - printf formatting in the ftrace buffer * trace_printk - printf formatting in the ftrace buffer
* @fmt: the printf format for printing * @fmt: the printf format for printing
* *
* Note: __ftrace_printk is an internal function for ftrace_printk and * Note: __trace_printk is an internal function for trace_printk and
* the @ip is passed in via the ftrace_printk macro. * the @ip is passed in via the trace_printk macro.
* *
* This function allows a kernel developer to debug fast path sections * This function allows a kernel developer to debug fast path sections
* that printk is not appropriate for. By scattering in various * 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,14 +341,14 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
* where problems are occurring. * where problems are occurring.
* *
* This is intended as a debugging tool for the developer only. * This is intended as a debugging tool for the developer only.
* Please refrain from leaving ftrace_printks scattered around in * Please refrain from leaving trace_printks scattered around in
* your code. * your code.
*/ */
# define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt) # define trace_printk(fmt...) __trace_printk(_THIS_IP_, fmt)
extern int extern int
__ftrace_printk(unsigned long ip, const char *fmt, ...) __trace_printk(unsigned long ip, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3))); __attribute__ ((format (printf, 2, 3)));
# define ftrace_vprintk(fmt, ap) __ftrace_printk(_THIS_IP_, fmt, ap) # define ftrace_vprintk(fmt, ap) __trace_printk(_THIS_IP_, fmt, ap)
extern int extern int
__ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
extern void ftrace_dump(void); extern void ftrace_dump(void);
...@@ -356,13 +356,13 @@ extern void ftrace_dump(void); ...@@ -356,13 +356,13 @@ extern void ftrace_dump(void);
static inline void static inline void
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { } ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
static inline int static inline int
ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
static inline void tracing_start(void) { } static inline void tracing_start(void) { }
static inline void tracing_stop(void) { } static inline void tracing_stop(void) { }
static inline void ftrace_off_permanent(void) { } static inline void ftrace_off_permanent(void) { }
static inline int static inline int
ftrace_printk(const char *fmt, ...) trace_printk(const char *fmt, ...)
{ {
return 0; return 0;
} }
......
...@@ -48,7 +48,7 @@ unsigned long __read_mostly tracing_thresh; ...@@ -48,7 +48,7 @@ unsigned long __read_mostly tracing_thresh;
* We need to change this state when a selftest is running. * We need to change this state when a selftest is running.
* A selftest will lurk into the ring-buffer to count the * A selftest will lurk into the ring-buffer to count the
* entries inserted during the selftest although some concurrent * entries inserted during the selftest although some concurrent
* insertions into the ring-buffer such as ftrace_printk could occurred * insertions into the ring-buffer such as trace_printk could occurred
* at the same time, giving false positive or negative results. * at the same time, giving false positive or negative results.
*/ */
static bool __read_mostly tracing_selftest_running; static bool __read_mostly tracing_selftest_running;
...@@ -291,7 +291,7 @@ static const char *trace_options[] = { ...@@ -291,7 +291,7 @@ static const char *trace_options[] = {
"block", "block",
"stacktrace", "stacktrace",
"sched-tree", "sched-tree",
"ftrace_printk", "trace_printk",
"ftrace_preempt", "ftrace_preempt",
"branch", "branch",
"annotate", "annotate",
...@@ -3768,7 +3768,7 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args) ...@@ -3768,7 +3768,7 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args)
} }
EXPORT_SYMBOL_GPL(trace_vprintk); EXPORT_SYMBOL_GPL(trace_vprintk);
int __ftrace_printk(unsigned long ip, const char *fmt, ...) int __trace_printk(unsigned long ip, const char *fmt, ...)
{ {
int ret; int ret;
va_list ap; va_list ap;
...@@ -3781,7 +3781,7 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...) ...@@ -3781,7 +3781,7 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...)
va_end(ap); va_end(ap);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(__ftrace_printk); EXPORT_SYMBOL_GPL(__trace_printk);
int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap) int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap)
{ {
......
...@@ -115,7 +115,7 @@ struct userstack_entry { ...@@ -115,7 +115,7 @@ struct userstack_entry {
}; };
/* /*
* ftrace_printk entry: * trace_printk entry:
*/ */
struct print_entry { struct print_entry {
struct trace_entry ent; struct trace_entry ent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment