[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1324128938-17553-2-git-send-email-sebastian@breakpoint.cc>
Date: Sat, 17 Dec 2011 14:35:38 +0100
From: Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org,
Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
Subject: [RFC 2/2] perf: duct tape a crash on perf kvm --guestmount=$(pwd) report
Data was collected with
|perf kvm --guestmount=$(pwd) record -a -R -g -s -d -T
After executing
|kvm --guestmount=$(pwd) report
I ended up with two segfaults. This patch duct tapes both of them.
Most likely there is some infomration missing.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
---
tools/perf/util/map.c | 2 +-
tools/perf/util/symbol.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index 316aa0a..a57f897 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -693,7 +693,7 @@ char *machine__mmap_name(struct machine *self, char *bf, size_t size)
else if (machine__is_default_guest(self))
snprintf(bf, size, "[%s]", "guest.kernel.kallsyms");
else
- snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
+ snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self ? self->pid : -1);
return bf;
}
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index f2dd916..2760ab1 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1876,8 +1876,12 @@ struct map *machine__new_module(struct machine *machine, u64 start,
const char *filename)
{
struct map *map;
- struct dso *dso = __dsos__findnew(&machine->kernel_dsos, filename);
+ struct dso *dso;
+
+ if (!machine)
+ return NULL;
+ dso = __dsos__findnew(&machine->kernel_dsos, filename);
if (dso == NULL)
return NULL;
--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists