mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH v3 3/2] ftrace: ftrace_printk doc moved
Date: Fri, 1 Aug 2008 13:49:05 -0700	[thread overview]
Message-ID: <20080801134905.bff99511.randy.dunlap@oracle.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0808011644410.2547@gandalf.stny.rr.com>

On Fri, 1 Aug 2008 16:45:49 -0400 (EDT) Steven Rostedt wrote:

> 
> Based on Randy Dunlap's suggestion, the ftrace_printk kernel-doc belongs
> with the ftrace_printk macro that should be used. Not with the
> __ftrace_printk internal function.
> 
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

> ---
>  include/linux/ftrace.h |   19 ++++++++++++++++++-
>  kernel/trace/trace.c   |   16 ----------------
>  2 files changed, 18 insertions(+), 17 deletions(-)
> 
> Index: linux-tip.git/include/linux/ftrace.h
> ===================================================================
> --- linux-tip.git.orig/include/linux/ftrace.h	2008-08-01 12:20:56.000000000 -0400
> +++ linux-tip.git/include/linux/ftrace.h	2008-08-01 16:43:56.000000000 -0400
> @@ -137,7 +137,24 @@ static inline void tracer_disable(void)
>  extern void
>  ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
>  extern void ftrace_dump(void);
> -# define ftrace_printk(x...) __ftrace_printk(_THIS_IP_, x)
> +
> +/**
> + * ftrace_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.
> + *
> + * 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
> + * your code.
> + */
> +# define ftrace_printk(fmt...) __ftrace_printk(_THIS_IP_, fmt)
>  extern int
>  __ftrace_printk(unsigned long ip, const char *fmt, ...)
>  	__attribute__ ((format (printf, 2, 3)));
> Index: linux-tip.git/kernel/trace/trace.c
> ===================================================================
> --- linux-tip.git.orig/kernel/trace/trace.c	2008-08-01 12:20:56.000000000 -0400
> +++ linux-tip.git/kernel/trace/trace.c	2008-08-01 14:10:36.000000000 -0400
> @@ -3243,22 +3243,6 @@ void ftrace_dump(void)
>  	(sizeof(struct trace_field) - offsetof(struct trace_field, print.buf))
>  #define TRACE_CONT_BUF_SIZE sizeof(struct trace_field)
>  
> -/**
> - * ftrace_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.
> - *
> - * 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 reframe from leaving ftrace_printks scattered around in
> - * your code.
> - */
>  int __ftrace_printk(unsigned long ip, const char *fmt, ...)
>  {
>  	struct trace_array *tr = &global_trace;


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

  reply	other threads:[~2008-08-01 20:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01 16:26 [PATCH v2 0/2] ftrace: printk formatted recording Steven Rostedt
2008-08-01 16:26 ` [PATCH v2 1/2] ftrace: new continue entry - separate out from trace_entry Steven Rostedt
2008-08-01 16:26 ` [PATCH v2 2/2] ftrace: printk formatting infrastructure Steven Rostedt
2008-08-01 16:43   ` Randy Dunlap
2008-08-01 16:53     ` Steven Rostedt
2008-08-01 17:52       ` Randy Dunlap
2008-08-01 18:17         ` [PATCH v2 3/2] ftrace: ftrace_printk doc moved Steven Rostedt
2008-08-01 20:34           ` Randy Dunlap
2008-08-01 20:42             ` Steven Rostedt
2008-08-01 20:45             ` [PATCH v3 " Steven Rostedt
2008-08-01 20:49               ` Randy Dunlap [this message]
2008-08-15 15:00 ` [PATCH v2 0/2] ftrace: printk formatted recording Ingo Molnar
2008-08-15 15:49   ` [PATCH] ftrace: build fix Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080801134905.bff99511.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome