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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
f50246e2e2
commit
82ba1f2f61
@@ -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);
|
||||
|
Reference in New Issue
Block a user