Linux-Trace-Devel Archive on lore.kernel.org
 help / Atom feed
* [PATCH] trace-cmd: fix deletion of histogram triggers
@ 2018-12-18 10:39 Tzvetomir Stoyanov
  2018-12-18 23:25 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Tzvetomir Stoyanov @ 2018-12-18 10:39 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

This patch fixes the clear_trigger() function to delete
configured histograms. Unlike other triggers, histograms
must be deleted specifying the whole trigger string.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 tracecmd/trace-record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index a9bcd8d..37a2d1d 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -1680,7 +1680,7 @@ static void clear_trigger(const char *file)
 	 * to the file for each trigger.
 	 */
 	do {
-		len = find_trigger(file, trigger+1, BUFSIZ-1, 1);
+		len = find_trigger(file, trigger+1, BUFSIZ-1, 3);
 		if (len)
 			write_trigger(file, trigger);
 	} while (len);
-- 
2.19.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] trace-cmd: fix deletion of histogram triggers
  2018-12-18 10:39 [PATCH] trace-cmd: fix deletion of histogram triggers Tzvetomir Stoyanov
@ 2018-12-18 23:25 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2018-12-18 23:25 UTC (permalink / raw)
  To: Tzvetomir Stoyanov; +Cc: linux-trace-devel

On Tue, 18 Dec 2018 12:39:28 +0200
Tzvetomir Stoyanov <tstoyanov@vmware.com> wrote:

> This patch fixes the clear_trigger() function to delete
> configured histograms. Unlike other triggers, histograms
> must be deleted specifying the whole trigger string.
> 
> Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>

Applied. Thanks Tzvetomir!

-- Steve

> ---
>  tracecmd/trace-record.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
> index a9bcd8d..37a2d1d 100644
> --- a/tracecmd/trace-record.c
> +++ b/tracecmd/trace-record.c
> @@ -1680,7 +1680,7 @@ static void clear_trigger(const char *file)
>  	 * to the file for each trigger.
>  	 */
>  	do {
> -		len = find_trigger(file, trigger+1, BUFSIZ-1, 1);
> +		len = find_trigger(file, trigger+1, BUFSIZ-1, 3);
>  		if (len)
>  			write_trigger(file, trigger);
>  	} while (len);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 10:39 [PATCH] trace-cmd: fix deletion of histogram triggers Tzvetomir Stoyanov
2018-12-18 23:25 ` Steven Rostedt

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox