From 5c0cf22477eaa890beeb4bc3554e5bebbea4b007 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Thu, 7 Jan 2016 14:30:22 +0100 Subject: perf record: Store data mmaps for dwarf unwind Currently we don't synthesize data mmap by default. It depends on -d option, that enables data address sampling. But we've seen cases (softice) where DWARF unwinder went through non executable mmaps, which we need to lookup in MAP__VARIABLE tree. Making data mmaps to be synthesized for dwarf unwind as well. Reported-by: Noel Grandin Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20160107133022.GA32115@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 9c5cdc2c4..dc4e0ad 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -815,8 +815,12 @@ int record_parse_callchain_opt(const struct option *opt, } ret = parse_callchain_record_opt(arg, &callchain_param); - if (!ret) + if (!ret) { + /* Enable data address sampling for DWARF unwind. */ + if (callchain_param.record_mode == CALLCHAIN_DWARF) + record->sample_address = true; callchain_debug(); + } return ret; } -- cgit v0.10.2