mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	linux-kernel@vger.kernel.org, yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH 2/2] trace-cmd: [BUGFIX] Don't die if an instance does not have 'current_tracer' file
Date: Fri, 27 Jun 2014 15:17:18 -0400	[thread overview]
Message-ID: <20140627151718.22f22685@gandalf.local.home> (raw)
In-Reply-To: <20140624022345.14037.44275.stgit@yuno-kbuild.novalocal>

On Tue, 24 Jun 2014 02:23:45 +0000
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> wrote:

> Current trace-cmd requires 'current_tracer' file for an instance, and if
> the file is nothing, trace-cmd dies. However, current_tracer file was
> introduced from 607e2ea167e patch in Linux kernel 3.14-rc3, so current
> trace-cmd cannot use multiple buffers for old kernels.
> 
> This patch avoids to die if current_tracer file is nothing in an instance
> and the plugin name is "nop". This is because old kernels always trace
> as nop mode in an instance.
> 
> <How to test>
> 1) # ./trace-cmd record -B foo -e sched
> 
> Before introducing this patch, following error message is output in an old
> kernel:
> 
>  trace-cmd: Permission denied
>    writing to '/sys/kernel/debug/tracing/instances/foo/current_tracer'
> 
> trace-cmd dies in disable_trace() calling set_plugin("nop").
> After introducing this patch, trace-cmd works fine in both old kernels and
> current kernel.
> 
> 2) # ./trace-cmd record -B foo -e sched -p nop
> 
> It also works fine after introducing this patch in both old kernels and current
> kernel.
> 
> 3) # ./trace-cmd record -B foo -e sched -p function
> 
> For old kernels, it dies because an user should not set plugin tracer.
> For current kernel, it works fine.
> 
> Note that this patch was tested for kernel 3.11.9-200 and 3.15.0-rc2+.
> 
> Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>

Applied, thanks!

-- Steve

      reply	other threads:[~2014-06-27 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  2:23 [ PATCH 0/2] [BUGFIX] trace-cmd: Fix two small bugs Yoshihiro YUNOMAE
2014-06-24  2:23 ` [PATCH 1/2] trace-cmd: [BUGFIX] Initialize handle->options list in tracecmd_attach_cpu_data_fd() Yoshihiro YUNOMAE
2014-06-27 19:14   ` Steven Rostedt
2014-06-24  2:23 ` [PATCH 2/2] trace-cmd: [BUGFIX] Don't die if an instance does not have 'current_tracer' file Yoshihiro YUNOMAE
2014-06-27 19:17   ` 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=20140627151718.22f22685@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=yoshihiro.yunomae.ez@hitachi.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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®