Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305501
b: refs/heads/master
c: 82ba1f2
h: refs/heads/master
i:
  305499: 087bacd
v: v3
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed May 22, 2012
1 parent 56378d7 commit e3e31a1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f50246e2e2e33aacc68ac3ec41cf2d6a08860bc4
refs/heads/master: 82ba1f2f614871b388cb1bd58594507b6f0f2b79
12 changes: 9 additions & 3 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ ifndef PERF_DEBUG
CFLAGS_OPTIMIZE = -O6
endif

CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
ifdef PARSER_DEBUG
PARSER_DEBUG_BISON := -t
PARSER_DEBUG_FLEX := -d
PARSER_DEBUG_CFLAGS := -DPARSER_DEBUG
endif

CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
EXTLIBS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
ALL_LDFLAGS = $(LDFLAGS)
Expand Down Expand Up @@ -216,10 +222,10 @@ FLEX = flex
BISON= bison

$(OUTPUT)util/parse-events-flex.c: util/parse-events.l
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c

$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $(OUTPUT)util/parse-events-bison.c

$(OUTPUT)util/pmu-flex.c: util/pmu.l
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
Expand Down
6 changes: 6 additions & 0 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e3e31a1

Please sign in to comment.