Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140863
b: refs/heads/master
c: 5e1607a
h: refs/heads/master
i:
  140861: 7c18416
  140859: 4f840e0
  140855: c4afaf2
  140847: adc9016
  140831: f8c4606
  140799: 06625dc
v: v3
  • Loading branch information
Ingo Molnar committed Mar 5, 2009
1 parent 2465b3f commit 35dcd73
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53664738c122bfe8b0e489fddaf2ab265c9133c8
refs/heads/master: 5e1607a00bd082972629d3d68c95c8bcf902b55a
6 changes: 3 additions & 3 deletions trunk/Documentation/ftrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1466,11 +1466,11 @@ want, depending on your needs.


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
<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:

Expand Down
18 changes: 9 additions & 9 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,40 +329,40 @@ extern void
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
*
* Note: __ftrace_printk is an internal function for ftrace_printk and
* the @ip is passed in via the ftrace_printk macro.
* Note: __trace_printk is an internal function for trace_printk and
* the @ip is passed in via the trace_printk macro.
*
* This function allows a kernel developer to debug fast path sections
* that printk is not appropriate for. By scattering in various
* printk like tracing in the code, a developer can quickly see
* where problems are occurring.
*
* 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.
*/
# define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt)
# define trace_printk(fmt...) __trace_printk(_THIS_IP_, fmt)
extern int
__ftrace_printk(unsigned long ip, const char *fmt, ...)
__trace_printk(unsigned long ip, const char *fmt, ...)
__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
__ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
extern void ftrace_dump(void);
#else
static inline void
ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
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_stop(void) { }
static inline void ftrace_off_permanent(void) { }
static inline int
ftrace_printk(const char *fmt, ...)
trace_printk(const char *fmt, ...)
{
return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ unsigned long __read_mostly tracing_thresh;
* We need to change this state when a selftest is running.
* A selftest will lurk into the ring-buffer to count the
* 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.
*/
static bool __read_mostly tracing_selftest_running;
Expand Down Expand Up @@ -291,7 +291,7 @@ static const char *trace_options[] = {
"block",
"stacktrace",
"sched-tree",
"ftrace_printk",
"trace_printk",
"ftrace_preempt",
"branch",
"annotate",
Expand Down Expand Up @@ -3768,7 +3768,7 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args)
}
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;
va_list ap;
Expand All @@ -3781,7 +3781,7 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...)
va_end(ap);
return ret;
}
EXPORT_SYMBOL_GPL(__ftrace_printk);
EXPORT_SYMBOL_GPL(__trace_printk);

int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct userstack_entry {
};

/*
* ftrace_printk entry:
* trace_printk entry:
*/
struct print_entry {
struct trace_entry ent;
Expand Down

0 comments on commit 35dcd73

Please sign in to comment.