lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160222152303.02f79376@gandalf.local.home>
Date:	Mon, 22 Feb 2016 15:23:03 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Daniel Bristot de Oliveira <bristot@...hat.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Juri Lelli <juri.lelli@...il.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-rt-users <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH 4/4] tools lib traceevent: Implements '%' operation

On Mon, 22 Feb 2016 14:08:22 -0300
Daniel Bristot de Oliveira <bristot@...hat.com> wrote:

> The operation '%' is not implemented on event-parse.c, causing
> an error on the parse of events with '%' operation on its
> printk format. For example,
> 
> # perf record -e sched:sched_deadline_yield ~/y
>   Warning: [sched:sched_deadline_yield] unknown op '%'
> ....
> # perf script
>   Warning: [sched:sched_deadline_yield] unknown op '%'
> 	y  1641 [006]  3364.109319: sched:sched_deadline_yield: \
> 			[FAILED TO PARSE] now=3364109314595 	\
> 			deadline=3364139295135 runtime=19975597
> 
> This patch implements the '%' operation. With this patch, we see the
> correct output:
> 
> # perf record -e sched:sched_deadline_yield ~/y
>   No Warning
> 
> # perf script
> 	y  4005 [001]  4623.650978: sched:sched_deadline_yield: \
> 		now=4623.650974050				\
> 		deadline=4623.680957364 remaining_runtime=19979611
> 
> Signed-off-by: Daniel Bristot de Oliveira <bristot@...hat.com>

Arnaldo,

This patch is not dependent on the rest of the series and looks like a
good general fix.

Can you pull this one into your tree, and please add my:

Reviewed-by: Steven Rostedt <rsotedt@...dmis.org>

Thanks!

-- Steve

> ---
>  tools/lib/traceevent/event-parse.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index c3bd294..575e751 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -1951,6 +1951,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
>  		   strcmp(token, "*") == 0 ||
>  		   strcmp(token, "^") == 0 ||
>  		   strcmp(token, "/") == 0 ||
> +		   strcmp(token, "%") == 0 ||
>  		   strcmp(token, "<") == 0 ||
>  		   strcmp(token, ">") == 0 ||
>  		   strcmp(token, "<=") == 0 ||
> @@ -3689,6 +3690,9 @@ eval_num_arg(void *data, int size, struct event_format *event, struct print_arg
>  		case '/':
>  			val = left / right;
>  			break;
> +		case '%':
> +			val = left % right;
> +			break;
>  		case '*':
>  			val = left * right;
>  			break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ