Skip to content

Commit 7ea6411

Browse files
author
Ingo Molnar
committed
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf tooling fixes from Arnaldo Carvalho de Melo: . Properly handle ~/.debug, the build id cache, when it is a symlink, fix from Chanho Park . Fixes for the parser generation process, from Jiri Olsa and Namhyung Kim . Fix build when NO_GTK2 is specified, From Stephane Eranian . When a machine is not found, bump the relevant error stat but return 0, so that we correctly move to the next perf event. Fix from Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2 parents bfecc60 + e3b6193 commit 7ea6411

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

tools/perf/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ TAGS
1919
cscope*
2020
config.mak
2121
config.mak.autogen
22+
*-bison.*
23+
*-flex.*

tools/perf/Makefile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,20 @@ export PERL_PATH
237237
FLEX = $(CROSS_COMPILE)flex
238238
BISON= $(CROSS_COMPILE)bison
239239

240-
event-parser:
241-
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
240+
$(OUTPUT)util/parse-events-flex.c: util/parse-events.l
242241
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
243242

244-
$(OUTPUT)util/parse-events-flex.c: event-parser
245-
$(OUTPUT)util/parse-events-bison.c: event-parser
243+
$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
244+
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
246245

247-
pmu-parser:
248-
$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
246+
$(OUTPUT)util/pmu-flex.c: util/pmu.l
249247
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
250248

251-
$(OUTPUT)util/pmu-flex.c: pmu-parser
252-
$(OUTPUT)util/pmu-bison.c: pmu-parser
249+
$(OUTPUT)util/pmu-bison.c: util/pmu.y
250+
$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
253251

254-
$(OUTPUT)util/parse-events.o: event-parser pmu-parser
252+
$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
253+
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
255254

256255
LIB_FILE=$(OUTPUT)libperf.a
257256

@@ -527,7 +526,7 @@ else
527526
endif
528527

529528
ifdef NO_GTK2
530-
BASIC_CFLAGS += -DNO_GTK2
529+
BASIC_CFLAGS += -DNO_GTK2_SUPPORT
531530
else
532531
FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0)
533532
ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y)
@@ -852,8 +851,6 @@ help:
852851
@echo ' html - make html documentation'
853852
@echo ' info - make GNU info documentation (access with info <foo>)'
854853
@echo ' pdf - make pdf documentation'
855-
@echo ' event-parser - make event parser code'
856-
@echo ' pmu-parser - make pmu format parser code'
857854
@echo ' TAGS - use etags to make tag information for source browsing'
858855
@echo ' tags - use ctags to make tag information for source browsing'
859856
@echo ' cscope - use cscope to make interactive browsing database'

tools/perf/perf-archive.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ if [ ! -s $BUILDIDS ] ; then
2929
fi
3030

3131
MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)
32+
PERF_BUILDID_LINKDIR=$(readlink -f $PERF_BUILDID_DIR)/
3233

3334
cut -d ' ' -f 1 $BUILDIDS | \
3435
while read build_id ; do
3536
linkname=$PERF_BUILDID_DIR.build-id/${build_id:0:2}/${build_id:2}
3637
filename=$(readlink -f $linkname)
3738
echo ${linkname#$PERF_BUILDID_DIR} >> $MANIFEST
38-
echo ${filename#$PERF_BUILDID_DIR} >> $MANIFEST
39+
echo ${filename#$PERF_BUILDID_LINKDIR} >> $MANIFEST
3940
done
4041

4142
tar cfj $PERF_DATA.tar.bz2 -C $PERF_BUILDID_DIR -T $MANIFEST

tools/perf/util/session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session,
876876
dump_sample(session, event, sample);
877877
if (evsel == NULL) {
878878
++session->hists.stats.nr_unknown_id;
879-
return -1;
879+
return 0;
880880
}
881881
if (machine == NULL) {
882882
++session->hists.stats.nr_unprocessable_samples;
883-
return -1;
883+
return 0;
884884
}
885885
return tool->sample(tool, event, sample, evsel, machine);
886886
case PERF_RECORD_MMAP:

0 commit comments

Comments
 (0)