Skip to content

Commit

Permalink
perf record: Add a fallback to the reference relocation symbol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo committed Apr 2, 2010
1 parent c29ede6 commit 7016213
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ static int __cmd_record(int argc, const char **argv)

err = event__synthesize_kernel_mmap(process_synthesized_event,
session, "_text");
if (err < 0)
err = event__synthesize_kernel_mmap(process_synthesized_event,
session, "_stext");
if (err < 0) {
pr_err("Couldn't record kernel reference relocation symbol.\n");
return err;
Expand Down

0 comments on commit 7016213

Please sign in to comment.