[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1311602552.3526.17.camel@gandalf.stny.rr.com>
Date: Mon, 25 Jul 2011 10:02:32 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Cc: Michael Rubin <mrubin@...gle.com>,
David Sharp <dhsharp@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] trace-cmd: Support '+' opcode in print format
On Fri, 2011-07-15 at 20:00 -0700, Vaibhav Nagarnaik wrote:
> The '+' opcode is not supported in the arguments for the print format.
> This patch adds support for it.
Thanks! This was on my todo list.
-- Steve
>
> Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
> ---
> parse-events.c | 12 ++++++++++++
> 1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/parse-events.c b/parse-events.c
> index 068c77f..2e39415 100644
> --- a/parse-events.c
> +++ b/parse-events.c
> @@ -2033,6 +2033,18 @@ static int arg_num_eval(struct print_arg *arg, long long *val)
> break;
> *val = left - right;
> break;
> + case '+':
> + if (arg->op.left->type == PRINT_NULL)
> + left = 0;
> + else
> + ret = arg_num_eval(arg->op.left, &left);
> + if (!ret)
> + break;
> + ret = arg_num_eval(arg->op.right, &right);
> + if (!ret)
> + break;
> + *val = left + right;
> + break;
> default:
> do_warning("unknown op '%s'", arg->op.op);
> ret = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists