[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACV3sbK7jUCDZxGBs3RUYnQ4s+VyEt7VYeRKD50F07zZrYKgCg@mail.gmail.com>
Date: Wed, 11 Jul 2012 09:06:55 +0800
From: Jovi Zhang <bookjovi@...il.com>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] perf: fix perf-lock report coredump
>From 4b363bf16c12b76788fbace1475123b7214ae58d Mon Sep 17 00:00:00 2001
From: Jovi Zhang <bookjovi@...il.com>
Date: Wed, 11 Jul 2012 16:53:57 +0800
Subject: [PATCH] perf: fix perf-lock report coredump
Check sample type event raw_data is existed in perf.data firstly,
then invoke process_raw_event, otherwise it will coredump.
Signed-off-by: Jovi Zhang <bookjovi@...il.com>
---
tools/perf/builtin-lock.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index fd53319..4b0c230 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -860,7 +860,9 @@ static int process_sample_event(struct perf_tool
*tool __used,
return -1;
}
- process_raw_event(sample->raw_data, sample->cpu, sample->time, thread);
+ if (sample->raw_data)
+ process_raw_event(sample->raw_data, sample->cpu, sample->time,
+ thread);
return 0;
}
--
1.7.9.7
--
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