linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / 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 related	[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, other threads:[~2018-12-18 23:25 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).