All of lore.kernel.org
 help / color / mirror / Atom feed
From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter
Date: Wed, 22 Jul 2009 20:47:59 +0530	[thread overview]
Message-ID: <20090722151759.GA11367@in.ibm.com> (raw)
In-Reply-To: <4A66E261.2090105@cn.fujitsu.com>

On Wed, Jul 22, 2009 at 05:56:49PM +0800, Xiao Guangrong wrote:
> 
> 
> K.Prasad wrote:
> > On Wed, Jul 22, 2009 at 11:25:14AM +0800, Xiao Guangrong wrote:
> >> It's rather bored to clear symbol one by one in ksym_trace_filter
> >> file, so, this patch can let ksym_trace_filter file support quick
> >> clear, we can write "0" to this file, it can clear all symbols
> >>
> >> for example:
> >>  # cat ksym_trace_filter
> >>  ksym_filter_head:rw-
> >>  global_trace:rw-
> >>  # echo 0 > ksym_trace_filter
> >>  # cat ksym_trace_filter
> >>  #
> >>
> > 
> > It's nice to have this feature added and the other patches fix issues in
> > ksym tracer. Can you have this patch add the capability to clear all
> > breakpoints in one-shot through wild-cards?
> > 
> 
> It already can clear all breakpoints in one-shot by write "0" to
> ksym_trace_filter file, do you means that we need to support other
> way for it? like:
> 
> echo > ksym_trace_filter
> echo "*:---" > ksym_trace_filter
> 
> IMHO, one way to clear all breakpoints is enough, no need to add
> more code for the same function, for example, in trace events filter,
> only echo 0 > filter can properly clear all filters.
> 
> Are you sure other way is necessary? 
> 
> Thanks,
> Xiao
>

As I stated before, the ability to support
echo "*:---" > ksym_trace_filter was Ingo Molnar's suggestion, so if
he's not particular about having it now we may skip it.

However, given that it requires just a few lines of code in addition,
say

+	/* Clear all breakpoints if echo "*:---" > ksym_trace_filter */
+	if ((strncmp(ksymname, "*", strlen("*")) == 0) && (op == 0)) {
+		ksym_trace_reset(NULL);
+		kfree(input_string);
+		return count;
+	}

in ksym_trace_filter_write(), and that the patch is already present it
shouldn't be bothersome to add it.

Thanks,
K.Prasad


  reply	other threads:[~2009-07-22 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22  3:21 [PATCH 1/3] tracing/ksym_tracer: fix the output of ksym tracer Xiao Guangrong
2009-07-22  3:23 ` [PATCH 2/3] tracing/ksym_tracer: fix write operation of ksym_trace_filter Xiao Guangrong
2009-11-21 13:35   ` [tip:perf/core] " tip-bot for Xiao Guangrong
2009-07-22  3:25 ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter Xiao Guangrong
2009-07-22  5:06   ` K.Prasad
2009-07-22  9:56     ` Xiao Guangrong
2009-07-22 15:17       ` K.Prasad [this message]
2009-07-23  0:50         ` Xiao Guangrong
2009-07-23  4:01   ` [PATCH 3/3] tracing/ksym_tracer: support quick clear for ksym_trace_filter -- v2 Xiao Guangrong
2009-07-24  0:46     ` Steven Rostedt
2009-07-24  2:06       ` Xiao Guangrong
2009-07-24  2:11         ` Steven Rostedt
2009-11-21 13:35     ` [tip:perf/core] " tip-bot for Xiao Guangrong
2009-11-21 13:35 ` [tip:perf/core] tracing/ksym_tracer: fix the output of ksym tracer tip-bot for Xiao Guangrong

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=20090722151759.GA11367@in.ibm.com \
    --to=prasad@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=stern@rowland.harvard.edu \
    --cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.