Fixes for perf/urgent:

. 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 <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJPiayHAAoJENZQFvNTUqpAU+MP/RSDuLTNxhYf0VDvKi55gKnQ
 NK+1IjfnBbEo3uz2/WnlaXfj0TtiCNp0+r0dQqn3Hzuw9sc7zVOE+V1KlPvKMSml
 ruFn1NHEAc4J+/pa5t/tNEzFUm4IhtemclroWA+NplVS9trVzfVwwypieVOe+wkM
 ICRke30dfY+xvHOk+dAo3PQ/5qiycRH2GF4PYgivdU0psGPrTIbXICEjf0LRZzIZ
 B0a41Q9gASKNEXWQ6jEH7eGSyAZHuJ3V/tt4y1Nlnh94AgUwogHMohKf+ASTFI52
 BorwuDECIJGi1X9pdaP0A/Y6IdCNK0/sNGWl06FKW/wQ4qCpBucZrVv+CRkQX3B5
 vq23CrmOSNy6KH6s63z05v/v/v8mdnhofCRITXwztjnsdPDTosj742b/BKc7y8HY
 RY5mxinJgJptWRoBvpkVT/+xqn2Pn9Wup2XyM7vQAMoqqV7otpuGMQZ6V/ozymR2
 aBWzT8O+JerYmTb3HoBqjHSUIgTENGTawCYoXY3YPPH6gz9IDfPqCiyKRyWIhPnP
 Iw9L5gWQIodJNsmRfuK9qt4sTbMl7XvfXuyFYb2/YANNDkR7OyQktJnXMF3jj1cJ
 yAXV7sMPv4OWCDUBAgtDLsJHOuSovImM7M10UpzGnBKRNnYrjf6VT9BdWMQD22lP
 QDn7GRoElJT2tGn5CfeV
 =eQKW
 -----END PGP SIGNATURE-----

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 <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2012-04-15 08:02:36 +02:00
commit 7ea6411f4c
4 changed files with 15 additions and 15 deletions

View file

@ -19,3 +19,5 @@ TAGS
cscope*
config.mak
config.mak.autogen
*-bison.*
*-flex.*

View file

@ -237,21 +237,20 @@ export PERL_PATH
FLEX = $(CROSS_COMPILE)flex
BISON= $(CROSS_COMPILE)bison
event-parser:
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
$(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
$(OUTPUT)util/parse-events-flex.c: event-parser
$(OUTPUT)util/parse-events-bison.c: event-parser
$(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
pmu-parser:
$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-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
$(OUTPUT)util/pmu-flex.c: pmu-parser
$(OUTPUT)util/pmu-bison.c: pmu-parser
$(OUTPUT)util/pmu-bison.c: util/pmu.y
$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
$(OUTPUT)util/parse-events.o: event-parser pmu-parser
$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
LIB_FILE=$(OUTPUT)libperf.a
@ -527,7 +526,7 @@ else
endif
ifdef NO_GTK2
BASIC_CFLAGS += -DNO_GTK2
BASIC_CFLAGS += -DNO_GTK2_SUPPORT
else
FLAGS_GTK2=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(shell pkg-config --libs --cflags gtk+-2.0)
ifneq ($(call try-cc,$(SOURCE_GTK2),$(FLAGS_GTK2)),y)
@ -852,8 +851,6 @@ help:
@echo ' html - make html documentation'
@echo ' info - make GNU info documentation (access with info <foo>)'
@echo ' pdf - make pdf documentation'
@echo ' event-parser - make event parser code'
@echo ' pmu-parser - make pmu format parser code'
@echo ' TAGS - use etags to make tag information for source browsing'
@echo ' tags - use ctags to make tag information for source browsing'
@echo ' cscope - use cscope to make interactive browsing database'

View file

@ -29,13 +29,14 @@ if [ ! -s $BUILDIDS ] ; then
fi
MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)
PERF_BUILDID_LINKDIR=$(readlink -f $PERF_BUILDID_DIR)/
cut -d ' ' -f 1 $BUILDIDS | \
while read build_id ; do
linkname=$PERF_BUILDID_DIR.build-id/${build_id:0:2}/${build_id:2}
filename=$(readlink -f $linkname)
echo ${linkname#$PERF_BUILDID_DIR} >> $MANIFEST
echo ${filename#$PERF_BUILDID_DIR} >> $MANIFEST
echo ${filename#$PERF_BUILDID_LINKDIR} >> $MANIFEST
done
tar cfj $PERF_DATA.tar.bz2 -C $PERF_BUILDID_DIR -T $MANIFEST

View file

@ -876,11 +876,11 @@ static int perf_session_deliver_event(struct perf_session *session,
dump_sample(session, event, sample);
if (evsel == NULL) {
++session->hists.stats.nr_unknown_id;
return -1;
return 0;
}
if (machine == NULL) {
++session->hists.stats.nr_unprocessable_samples;
return -1;
return 0;
}
return tool->sample(tool, event, sample, evsel, machine);
case PERF_RECORD_MMAP: