[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-b48285980de2070948c8ac73629c605ad9202589@git.kernel.org>
Date: Mon, 21 May 2012 02:41:32 -0700
From: tip-bot for Vaibhav Nagarnaik <vnagarnaik@...gle.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, vnagarnaik@...gle.com, hpa@...or.com,
mingo@...nel.org, peterz@...radead.org, dhsharp@...gle.com,
namhyung.kim@....com, bp@...en8.de, jolsa@...hat.com,
fweisbec@...il.com, acme@...radead.org, mrubin@...gle.com,
rostedt@...dmis.org, tglx@...utronix.de, asharma@...com
Subject: [tip:perf/core] parse-events: Support '+' opcode in print format
Commit-ID: b48285980de2070948c8ac73629c605ad9202589
Gitweb: http://git.kernel.org/tip/b48285980de2070948c8ac73629c605ad9202589
Author: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
AuthorDate: Fri, 6 Apr 2012 00:48:03 +0200
Committer: Frederic Weisbecker <fweisbec@...il.com>
CommitDate: Wed, 25 Apr 2012 13:35:38 +0200
parse-events: Support '+' opcode in print format
The '+' opcode is not supported in the arguments for the print format.
This patch adds support for it.
Cc: Michael Rubin <mrubin@...gle.com>
Cc: David Sharp <dhsharp@...gle.com>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Link: http://lkml.kernel.org/r/1310785241-3799-4-git-send-email-vnagarnaik@google.com
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Arun Sharma <asharma@...com>
Cc: Namhyung Kim <namhyung.kim@....com>
Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
---
tools/lib/traceevent/event-parse.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 4d5092f..476626a 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2047,6 +2047,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