[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-8886f42d6d8dabeb488c706c339634a0e3e08df4@git.kernel.org>
Date: Thu, 3 Sep 2009 14:27:37 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, fweisbec@...il.com, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perfcounters/core] perf trace: Fix parsing of perf.data
Commit-ID: 8886f42d6d8dabeb488c706c339634a0e3e08df4
Gitweb: http://git.kernel.org/tip/8886f42d6d8dabeb488c706c339634a0e3e08df4
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Thu, 3 Sep 2009 16:19:57 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 3 Sep 2009 16:19:57 +0200
perf trace: Fix parsing of perf.data
We started parsing perf.data at head 0. This caused -D to
segfault and it could possibly also case incorrect trace
entries to be displayed.
Parse it at data_offset instead.
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
tools/perf/builtin-trace.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d59bf8a..914ab36 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -196,6 +196,7 @@ static int __cmd_trace(void)
exit(0);
}
header = perf_header__read(input);
+ head = header->data_offset;
sample_type = perf_header__sample_type(header);
if (!(sample_type & PERF_SAMPLE_RAW))
--
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