mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] ftrace: Handle TRACE_BPUTS in print_graph_comment
Date: Thu, 1 Sep 2016 12:20:56 -0400	[thread overview]
Message-ID: <20160901122056.7aa075ad@gandalf.local.home> (raw)
In-Reply-To: <20160901024354.13720-1-namhyung@kernel.org>

On Thu,  1 Sep 2016 11:43:54 +0900
Namhyung Kim <namhyung@kernel.org> wrote:

> It missed to handle TRACE_BPUTS so messages recorded by trace_bputs()
> will be shown with symbol info unnecessarily.
> 
> You can see it with the trace_printk sample code:
> 
>   # cd /sys/kernel/tracing/
>   # echo sys_sync > set_graph_function
>   # echo 1 > options/sym-offset
>   # echo function_graph > current_tracer
> 
> Note that the sys_sync filter was there to prevent recording other
> functions and the sym-offset option was needed since the first message
> was called from a module init function so kallsyms doesn't have the
> symbol and omitted in the output.
> 
>   # cd ~/build/kernel
>   # insmod samples/trace_printk/trace-printk.ko
> 
>   # cd -
>   # head trace
> 
> Before:
> 
>   # tracer: function_graph
>   #
>   # CPU  DURATION                  FUNCTION CALLS
>   # |     |   |                     |   |   |   |
>    1)               |  /* 0xffffffffa0002000: This is a static string that will use trace_bputs */
>    1)               |  /* This is a dynamic string that will use trace_puts */
>    1)               |  /* trace_printk_irq_work+0x5/0x7b [trace_printk]: (irq) This is a static string that will use trace_bputs */
>    1)               |  /* (irq) This is a dynamic string that will use trace_puts */
>    1)               |  /* (irq) This is a static string that will use trace_bprintk() */
>    1)               |  /* (irq) This is a dynamic string that will use trace_printk */
> 
> After:
> 
>   # tracer: function_graph
>   #
>   # CPU  DURATION                  FUNCTION CALLS
>   # |     |   |                     |   |   |   |
>    1)               |  /* This is a static string that will use trace_bputs */
>    1)               |  /* This is a dynamic string that will use trace_puts */
>    1)               |  /* (irq) This is a static string that will use trace_bputs */
>    1)               |  /* (irq) This is a dynamic string that will use trace_puts */
>    1)               |  /* (irq) This is a static string that will use trace_bprintk() */
>    1)               |  /* (irq) This is a dynamic string that will use trace_printk */
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---

Applied, thanks Namhyung!

-- Steve

      reply	other threads:[~2016-09-01 16:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01  2:43 Namhyung Kim
2016-09-01 16:20 ` Steven Rostedt [this message]

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=20160901122056.7aa075ad@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /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

all inboxes | Powered by JetHome®