[PATCH v3 12/12] libtraceevent: add libtraceevent prefix in warning message

From: zhangwei(Jovi)
Date: Tue Apr 09 2013 - 23:28:49 EST


From: "zhangwei(Jovi)" <jovi.zhangwei@xxxxxxxxxx>

Now using perf tracepoint, perf output some warning message
which hard to understand what's wrong in perf.

[root@jovi perf]# ./perf stat -e timer:* ls
Warning: unknown op '{'
Warning: unknown op '{'
...

Actually these warning message is caused by libtraceevent format
parsing code.

So add libtraceevent prefix to identify this more clearly.

(we should remove all those warning message when running perf stat in future,
it's not necessary to parse event format when running perf stat)

Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@xxxxxxxxxx>
---
tools/lib/traceevent/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 82b0606..a3971d2 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -47,7 +47,7 @@ static int show_warning = 1;
#define do_warning(fmt, ...) \
do { \
if (show_warning) \
- warning(fmt, ##__VA_ARGS__); \
+ warning("libtraceevent: "fmt, ##__VA_ARGS__); \
} while (0)

static void init_input_buf(const char *buf, unsigned long long size)
--
1.7.9.7


--
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/