aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-03-30 17:27:39 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-04-02 15:28:06 -0400
commit70162138c91b040da3162fe1f34fe8aaf6506f10 (patch)
treef37100455c6d9ab84464409ad89e2c893b28c7d4
parentc29ede615fd35a640e771fbbb1778e915fac43a7 (diff)
perf record: Add a fallback to the reference relocation symbol
Usually "_text" is enough, but I received reports that its not always available, so fallback to "_stext" for the symbol we use to check if we need to apply any relocation to all the symbols in the kernel symtab, for when, for instance, kexec is being used. Reported-by: Darren Hart <dvhltc@us.ibm.com> Cc: Darren Hart <dvhltc@us.ibm.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/builtin-record.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 60ecdd3dd26d..80dc444031df 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -575,6 +575,9 @@ static int __cmd_record(int argc, const char **argv)
575 575
576 err = event__synthesize_kernel_mmap(process_synthesized_event, 576 err = event__synthesize_kernel_mmap(process_synthesized_event,
577 session, "_text"); 577 session, "_text");
578 if (err < 0)
579 err = event__synthesize_kernel_mmap(process_synthesized_event,
580 session, "_stext");
578 if (err < 0) { 581 if (err < 0) {
579 pr_err("Couldn't record kernel reference relocation symbol.\n"); 582 pr_err("Couldn't record kernel reference relocation symbol.\n");
580 return err; 583 return err;