summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-05-21 11:12:50 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-05-22 18:21:17 +0400
commit82ba1f2f614871b388cb1bd58594507b6f0f2b79 (patch)
tree27947bb93455777ebc75f14afc1f2f1b97d3186e /tools/perf/util
parentf50246e2e2e33aacc68ac3ec41cf2d6a08860bc4 (diff)
downloadlinux-82ba1f2f614871b388cb1bd58594507b6f0f2b79.tar.xz
perf tools: Add support for displaying event parser debug info
Adding PARSER_DEBUG Makefile variable to enable building event scanner/ parser with debug enabled. This results in verbose output right out of the scanner/parser. It's useful for debuging the event parser. Keeping this only for event parser so far. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1337584373-2741-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/parse-events.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index c7fc18a33d54..6704978736cc 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -23,6 +23,9 @@ struct event_symbol {
const char *alias;
};
+#ifdef PARSER_DEBUG
+extern int parse_events_debug;
+#endif
int parse_events_parse(struct list_head *list, struct list_head *list_tmp,
int *idx);
@@ -768,6 +771,9 @@ int parse_events(struct perf_evlist *evlist, const char *str, int unset __used)
buffer = parse_events__scan_string(str);
+#ifdef PARSER_DEBUG
+ parse_events_debug = 1;
+#endif
ret = parse_events_parse(&list, &list_tmp, &idx);
parse_events__flush_buffer(buffer);