All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/5] perf/urgent fixes
@ 2012-04-14 17:03 Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 1/5] perf session: Skip event correctly for unknown id/machine Arnaldo Carvalho de Melo
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Chanho Park,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Kyungmin Park, Namhyung Kim, Namhyung Kim, Paul Mackerras,
	Pekka Enberg, Peter Zijlstra, Stephane Eranian, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

Thanks,

- Arnaldo

The following changes since commit 7fb0a5ee8889488f7568ffddffeb66ddeb50917e:

  perf kvm: Finding struct machine fails for PERF_RECORD_MMAP (2012-04-11 11:45:12 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-urgent-for-mingo

for you to fetch changes up to e3b6193378e8549d04849eda496129f94406ed36:

  perf archive: Correct cutting of symbolic link (2012-04-14 13:52:15 -0300)

----------------------------------------------------------------
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>

----------------------------------------------------------------
Chanho Park (1):
      perf archive: Correct cutting of symbolic link

Jiri Olsa (2):
      perf session: Skip event correctly for unknown id/machine
      perf tools: Fix parsers' rules to dependencies

Namhyung Kim (1):
      perf tools: Ignore auto-generated bison/flex files

Stephane Eranian (1):
      perf tools: fix NO_GTK2 Makefile config error

 tools/perf/.gitignore      |    2 ++
 tools/perf/Makefile        |   21 +++++++++------------
 tools/perf/perf-archive.sh |    3 ++-
 tools/perf/util/session.c  |    4 ++--
 4 files changed, 15 insertions(+), 15 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] perf session: Skip event correctly for unknown id/machine
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2012-04-14 17:03 ` Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 2/5] perf tools: fix NO_GTK2 Makefile config error Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

In case the perf_session__process_event function fails, we estimate the
next event offset.

This is not necessary for sample event failing on unknown ID or machine.
In such case we know proper size of the event, so we dont need to guess.
Also failure statistics are updated correctly so we don't miss any
information.

Forcing perf_session__process_event to return 0 in case of unknown ID or
machine.

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/1334233262-5679-3-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/session.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 00923cd..1efd3be 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -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:
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] perf tools: fix NO_GTK2 Makefile config error
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 1/5] perf session: Skip event correctly for unknown id/machine Arnaldo Carvalho de Melo
@ 2012-04-14 17:03 ` Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 3/5] perf tools: Fix parsers' rules to dependencies Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Stephane Eranian, David Ahern, Ingo Molnar,
	Pekka Enberg, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Stephane Eranian <eranian@google.com>

In case the user specified NO_GTK2 on the make cmdline, compilation
would fail with undefined symbol because the Makefile would not set the
correct cpp variable: NO_GTK2 vs. NO_GTK2_SUPPORT.

This patch renames the variable to the correct name.

Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120410103513.GA9229@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 820371f..a20d0c5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -527,7 +527,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)
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] perf tools: Fix parsers' rules to dependencies
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 1/5] perf session: Skip event correctly for unknown id/machine Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 2/5] perf tools: fix NO_GTK2 Makefile config error Arnaldo Carvalho de Melo
@ 2012-04-14 17:03 ` Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 4/5] perf tools: Ignore auto-generated bison/flex files Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, Frederic Weisbecker,
	Ingo Molnar, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@redhat.com>

Currently the parsers objects (bison/flex related) are each time perf
is built. No matter the generated files are already in place, the
parser generation is executed every time.

Changing the rules to have proper flex/bison objects generation
dependencies.

The parsers code is not rebuilt until the flex/bison source files
are touched. Also when flex/bison source is changed, only dependent
objects are rebuilt.

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/1334140791-3024-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile |   19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a20d0c5..03059e7 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -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
 
@@ -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'
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] perf tools: Ignore auto-generated bison/flex files
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2012-04-14 17:03 ` [PATCH 3/5] perf tools: Fix parsers' rules to dependencies Arnaldo Carvalho de Melo
@ 2012-04-14 17:03 ` Arnaldo Carvalho de Melo
  2012-04-14 17:03 ` [PATCH 5/5] perf archive: Correct cutting of symbolic link Arnaldo Carvalho de Melo
  2012-04-15  6:04 ` [GIT PULL 0/5] perf/urgent fixes Ingo Molnar
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Ingo Molnar, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung.kim@lge.com>

The commit 65f3e56e0c81 ("perf tools: Remove auto-generated bison/flex
files") removed those files from git, so they'll be listed on untracked
files after building perf. Fix it.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333948274-20043-1-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/.gitignore |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 416684b..26b823b 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -19,3 +19,5 @@ TAGS
 cscope*
 config.mak
 config.mak.autogen
+*-bison.*
+*-flex.*
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] perf archive: Correct cutting of symbolic link
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2012-04-14 17:03 ` [PATCH 4/5] perf tools: Ignore auto-generated bison/flex files Arnaldo Carvalho de Melo
@ 2012-04-14 17:03 ` Arnaldo Carvalho de Melo
  2012-04-15  6:04 ` [GIT PULL 0/5] perf/urgent fixes Ingo Molnar
  5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-14 17:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Chanho Park, Kyungmin Park, Ingo Molnar,
	Paul Mackerras, Peter Zijlstra, Arnaldo Carvalho de Melo

From: Chanho Park <chanho61.park@samsung.com>

If a '$PERF_BUILDID_DIR'(typically $HOME/.debug) is a symbolic link
directory, cutting of the path will fail.

Here is an example where a buildid directory is a symbolic link.

/ # ls -al /root
lrwxrwxrwx    1 root     root            13 Mar 26  2012 /root -> opt/home/root
/ # cd ~
/opt/home/root # perf record -a -g sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.322 MB perf.data (~14057 samples) ]
/opt/home/root # perf archive
tar: Removing leading `/' from member names
Now please run:

$ tar xvf perf.data.tar.bz2 -C ~/.debug

wherever you need to run 'perf report' on.
/opt/home/root # mkdir temp
/opt/home/root # tar xf perf.data.tar.bz2 -C ./temp
/opt/home/root # find ./temp -name "*kernel*"
./temp/opt/home/root/.debug/[kernel.kallsyms]

-> If successfully cut off the path, [kernel.kallsyms] is located
in top of the archived file.

This patch enables to cut correctly even if the buildid directory
is a symbolic link.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333348109-12598-1-git-send-email-chanho61.park@samsung.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/perf-archive.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
index 677e59d..95b6f8b 100644
--- a/tools/perf/perf-archive.sh
+++ b/tools/perf/perf-archive.sh
@@ -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
-- 
1.7.9.2.358.g22243


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [GIT PULL 0/5] perf/urgent fixes
  2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2012-04-14 17:03 ` [PATCH 5/5] perf archive: Correct cutting of symbolic link Arnaldo Carvalho de Melo
@ 2012-04-15  6:04 ` Ingo Molnar
  5 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2012-04-15  6:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Chanho Park, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Kyungmin Park, Namhyung Kim,
	Namhyung Kim, Paul Mackerras, Pekka Enberg, Peter Zijlstra,
	Stephane Eranian, arnaldo.melo, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit 7fb0a5ee8889488f7568ffddffeb66ddeb50917e:
> 
>   perf kvm: Finding struct machine fails for PERF_RECORD_MMAP (2012-04-11 11:45:12 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to e3b6193378e8549d04849eda496129f94406ed36:
> 
>   perf archive: Correct cutting of symbolic link (2012-04-14 13:52:15 -0300)
> 
> ----------------------------------------------------------------
> 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>
> 
> ----------------------------------------------------------------
> Chanho Park (1):
>       perf archive: Correct cutting of symbolic link
> 
> Jiri Olsa (2):
>       perf session: Skip event correctly for unknown id/machine
>       perf tools: Fix parsers' rules to dependencies
> 
> Namhyung Kim (1):
>       perf tools: Ignore auto-generated bison/flex files
> 
> Stephane Eranian (1):
>       perf tools: fix NO_GTK2 Makefile config error
> 
>  tools/perf/.gitignore      |    2 ++
>  tools/perf/Makefile        |   21 +++++++++------------
>  tools/perf/perf-archive.sh |    3 ++-
>  tools/perf/util/session.c  |    4 ++--
>  4 files changed, 15 insertions(+), 15 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-15  6:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14 17:03 [GIT PULL 0/5] perf/urgent fixes Arnaldo Carvalho de Melo
2012-04-14 17:03 ` [PATCH 1/5] perf session: Skip event correctly for unknown id/machine Arnaldo Carvalho de Melo
2012-04-14 17:03 ` [PATCH 2/5] perf tools: fix NO_GTK2 Makefile config error Arnaldo Carvalho de Melo
2012-04-14 17:03 ` [PATCH 3/5] perf tools: Fix parsers' rules to dependencies Arnaldo Carvalho de Melo
2012-04-14 17:03 ` [PATCH 4/5] perf tools: Ignore auto-generated bison/flex files Arnaldo Carvalho de Melo
2012-04-14 17:03 ` [PATCH 5/5] perf archive: Correct cutting of symbolic link Arnaldo Carvalho de Melo
2012-04-15  6:04 ` [GIT PULL 0/5] perf/urgent fixes Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.