All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: prasad@linux.vnet.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>,
	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: Thu, 23 Jul 2009 08:50:36 +0800	[thread overview]
Message-ID: <4A67B3DC.5080507@cn.fujitsu.com> (raw)
In-Reply-To: <20090722151759.GA11367@in.ibm.com>



K.Prasad wrote:

> 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.
> 

OK, I'll fix 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;
> +	}
> 

I think below way is simpler:

+	/*
+	/* Clear all breakpoints if:
+	/* 1: echo > ksym_trace_filter
+	/* 2: echo 0 > ksym_trace_filter
+	/* 3: echo "*:---" > ksym_trace_filter 
+	*/
+	strstrip(input_string);
+	if (!input_string[0] || !strcmp(input_string, "0") ||
+	   (!strcmp(input, "*:---")) {
+		__ksym_trace_reset();
+		kfree(input_string);
+		return count;
+	}
+

I'll sent a new patch after do some test for it.

Thanks,
Xiao

> in ksym_trace_filter_write(), and that the patch is already present it
> shouldn't be bothersome to add it.
> 
> Thanks,
> K.Prasad
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

  reply	other threads:[~2009-07-23  0:50 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
2009-07-23  0:50         ` Xiao Guangrong [this message]
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=4A67B3DC.5080507@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=prasad@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=stern@rowland.harvard.edu \
    /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.