lkml.org 
[lkml]   [2009]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:perf/core] perf tools: Handle - and + in parsing trace print format
Commit-ID:  afdf1a404eed236d6f762ee44cc0f1dcc97206e0
Gitweb: http://git.kernel.org/tip/afdf1a404eed236d6f762ee44cc0f1dcc97206e0
Author: Steven Rostedt <srostedt@redhat.com>
AuthorDate: Wed, 14 Oct 2009 15:43:43 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 15 Oct 2009 10:42:40 +0200

perf tools: Handle - and + in parsing trace print format

The opterators '-' and '+' are not handled in the trace print
format.

To do: '++' and '--'.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20091014194400.330843045@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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 fde1a43..2d424ff 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -2106,6 +2106,12 @@ static unsigned long long eval_num_arg(void *data, int size,
die("unknown op '%s'", arg->op.op);
val = left == right;
break;
+ case '-':
+ val = left - right;
+ break;
+ case '+':
+ val = left + right;
+ break;
default:
die("unknown op '%s'", arg->op.op);
}

\
 
 \ /
  Last update: 2009-10-15 11:15    [W:0.117 / U:4.636 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site