[RFC PATCH -tip 1/5] perf tools: handle '-' and '*' in trace parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Keiichi Kii <k-keiichi@xxxxxxxxxxxxx>

add '-' and '*' to parsing in trace parsing.

Signed-off-by: Keiichi Kii <k-keiichi@xxxxxxxxxxxxx>
---

 tools/perf/util/trace-event-parse.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 0a7ed5b..447f7c0 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -2162,6 +2162,12 @@ static unsigned long long eval_num_arg(void *data, int size,
 		case '+':
 			val = left + right;
 			break;
+		case '*':
+			val = left * right;
+			break;
+		case '/':
+			val = left / right;
+			break;
 		default:
 			die("unknown op '%s'", arg->op.op);
 		}


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]