lkml.org 
[lkml]   [2010]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC][PATCH 1/2] [PATCH 1/2] tracing: Rename trace_printk to ftrace_printk
    From: Steven Rostedt <srostedt@redhat.com>

    In order to make a bit more generic trace_printk(), this patch
    simply renames the trace_printk() macro to its original ftrace_printk()
    name, since it only writes into the ftrace ring buffer.

    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    include/linux/kernel.h | 14 +++++++-------
    1 files changed, 7 insertions(+), 7 deletions(-)

    diff --git a/include/linux/kernel.h b/include/linux/kernel.h
    index b6de9a6..12151e5 100644
    --- a/include/linux/kernel.h
    +++ b/include/linux/kernel.h
    @@ -318,11 +318,11 @@ do { \
    } while (0)

    /**
    - * trace_printk - printf formatting in the ftrace buffer
    + * ftrace_printk - printf formatting in the ftrace buffer
    * @fmt: the printf format for printing
    *
    - * Note: __trace_printk is an internal function for trace_printk and
    - * the @ip is passed in via the trace_printk macro.
    + * Note: __trace_printk is an internal function for ftrace_printk and
    + * the @ip is passed in via the ftrace_printk macro.
    *
    * This function allows a kernel developer to debug fast path sections
    * that printk is not appropriate for. By scattering in various
    @@ -330,11 +330,11 @@ do { \
    * where problems are occurring.
    *
    * This is intended as a debugging tool for the developer only.
    - * Please refrain from leaving trace_printks scattered around in
    + * Please refrain from leaving ftrace_printks scattered around in
    * your code.
    */

    -#define trace_printk(fmt, args...) \
    +#define ftrace_printk(fmt, args...) \
    do { \
    __trace_printk_check_format(fmt, ##args); \
    if (__builtin_constant_p(fmt)) { \
    @@ -383,14 +383,14 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
    extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode);
    #else
    static inline int
    -trace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
    +ftrace_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 void trace_dump_stack(void) { }
    static inline int
    -trace_printk(const char *fmt, ...)
    +ftrace_printk(const char *fmt, ...)
    {
    return 0;
    }
    --
    1.7.1



    \
     
     \ /
      Last update: 2010-11-18 05:13    [W:0.021 / U:30.784 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site