Re: [PATCH 4/8] perf tools: Add formula interface to interfaceformula definitions
From: Peter Zijlstra
Date: Wed May 15 2013 - 05:14:00 EST
On Wed, May 01, 2013 at 05:15:42PM +0200, Jiri Olsa wrote:
> Each counter (cpi/branch-rate above) defines formula that
> produces the counter number.
>
> Formula grammar:
>
> expr: '-' expr |
> expr '+' expr |
> expr '-' expr |
> expr '*' expr |
> expr '/' expr |
> value |
> name
>
I was going to suggest adding (), but then I saw
> +<expr>{
> +"*" { return '*'; }
> +"-" { return '-'; }
> +"+" { return '+'; }
> +"/" { return '/'; }
> +"(" { return '('; }
> +")" { return ')'; }
> +
> +'(' expr ')'
> +{
> + $$ = $2;
> + pr_debug2("( %F )\n", $$);
> +}
:-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/