linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/2] perf/urgent fixes
@ 2012-04-16 20:29 Arnaldo Carvalho de Melo
  2012-04-16 20:29 ` [PATCH 1/2] perf report: Fix crash showing warning related to kernel maps Arnaldo Carvalho de Melo
  2012-04-16 20:29 ` [PATCH 2/2] perf tools: Drop CROSS_COMPILE from flex and bison calls Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-16 20:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern, Ingo Molnar,
	Namhyung Kim, Otavio Salvador, Peter Zijlstra, Stephane Eranian,
	arnaldo.melo, Arnaldo Carvalho de Melo


Hi Ingo,

	Please consider pulling,

Thanks,

- Arnaldo

The following changes since commit 7ea6411f4ceb62e5e53170d59d10996dca20c599:

  Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2012-04-15 08:02:36 +0200)

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 6ffd7bdbf8516d691974d21098278af65d4817a5:

  perf tools: Drop CROSS_COMPILE from flex and bison calls (2012-04-16 16:10:22 -0300)

----------------------------------------------------------------
Fixes for perf/urgent

. No need to use $CROSS_COMPILE for bison and flex, fix from Otavio Salvador

. Fix crash when kernel_map is NULL in perf report, that happened in pipe
  mode, code made more robust by David Ahern.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
David Ahern (1):
      perf report: Fix crash showing warning related to kernel maps

Otavio Salvador (1):
      perf tools: Drop CROSS_COMPILE from flex and bison calls

 tools/perf/Makefile         |    4 ++--
 tools/perf/builtin-report.c |   17 ++++++++++++-----
 2 files changed, 14 insertions(+), 7 deletions(-)

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

* [PATCH 1/2] perf report: Fix crash showing warning related to kernel maps
  2012-04-16 20:29 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2012-04-16 20:29 ` Arnaldo Carvalho de Melo
  2012-04-16 20:29 ` [PATCH 2/2] perf tools: Drop CROSS_COMPILE from flex and bison calls Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-16 20:29 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Ingo Molnar, Peter Zijlstra,
	Stephane Eranian, Namhyung Kim, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

While testing https://lkml.org/lkml/2012/4/10/123 I hit this crash:

(gdb) bt
 0  0x000000000042000f in __cmd_report (rep=0x7fff80cec580) at builtin-report.c:380
 1  cmd_report (argc=0, argv=<optimized out>, prefix=<optimized out>) at builtin-report.c:759
 2  0x0000000000414513 in run_builtin (p=0x7724a8, argc=3, argv=0x7fff80ceca70) at perf.c:273
 3  0x0000000000413d41 in handle_internal_command (argv=0x7fff80ceca70, argc=3) at perf.c:345
 4  run_argv (argv=0x7fff80cec880, argcp=0x7fff80cec88c) at perf.c:389
 5  main (argc=3, argv=0x7fff80ceca70) at perf.c:487

kernel_map can be NULL, so need to handle it while dumping a warning
to user.

v2:
- fixed RB_EMPTY_ROOT check -- desc takes the altnerative output when RB_EMPTY_ROOT is false.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Link: http://lkml.kernel.org/r/1334544855-55021-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-report.c |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 2e31743..cdae9b2 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -374,16 +374,23 @@ static int __cmd_report(struct perf_report *rep)
 	    (kernel_map->dso->hit &&
 	     (kernel_kmap->ref_reloc_sym == NULL ||
 	      kernel_kmap->ref_reloc_sym->addr == 0))) {
-		const struct dso *kdso = kernel_map->dso;
+		const char *desc =
+		    "As no suitable kallsyms nor vmlinux was found, kernel samples\n"
+		    "can't be resolved.";
+
+		if (kernel_map) {
+			const struct dso *kdso = kernel_map->dso;
+			if (!RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION])) {
+				desc = "If some relocation was applied (e.g. "
+				       "kexec) symbols may be misresolved.";
+			}
+		}
 
 		ui__warning(
 "Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n"
 "Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n"
 "Samples in kernel modules can't be resolved as well.\n\n",
-			    RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION]) ?
-"As no suitable kallsyms nor vmlinux was found, kernel samples\n"
-"can't be resolved." :
-"If some relocation was applied (e.g. kexec) symbols may be misresolved.");
+		desc);
 	}
 
 	if (dump_trace) {
-- 
1.7.9.2.358.g22243


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

* [PATCH 2/2] perf tools: Drop CROSS_COMPILE from flex and bison calls
  2012-04-16 20:29 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
  2012-04-16 20:29 ` [PATCH 1/2] perf report: Fix crash showing warning related to kernel maps Arnaldo Carvalho de Melo
@ 2012-04-16 20:29 ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-04-16 20:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Otavio Salvador, Arnaldo Carvalho de Melo

From: Otavio Salvador <otavio@ossystems.com.br>

The flex and bison tools generate arch-independent C code so its
binaries are not prefixed with the target-arch prefix. With this patch
the Linux 3.4-rc2 can be successfuly build on OE-Core.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Link: http://lkml.kernel.org/r/1334148270-13139-1-git-send-email-otavio@ossystems.com.br
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 03059e7..9bf3fc7 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -234,8 +234,8 @@ endif
 
 export PERL_PATH
 
-FLEX = $(CROSS_COMPILE)flex
-BISON= $(CROSS_COMPILE)bison
+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
-- 
1.7.9.2.358.g22243


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

end of thread, other threads:[~2012-04-16 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 20:29 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
2012-04-16 20:29 ` [PATCH 1/2] perf report: Fix crash showing warning related to kernel maps Arnaldo Carvalho de Melo
2012-04-16 20:29 ` [PATCH 2/2] perf tools: Drop CROSS_COMPILE from flex and bison calls Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).