[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-585e3374d9d29376c2c37d821c8b7637dd48ca95@git.kernel.org>
Date: Fri, 1 May 2009 13:27:58 GMT
From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, paulus@...ba.org, hpa@...or.com,
mingo@...hat.com, a.p.zijlstra@...llo.nl, tglx@...utronix.de,
cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perfcounters/core] perf_counter: tool: handle 0-length data files
Commit-ID: 585e3374d9d29376c2c37d821c8b7637dd48ca95
Gitweb: http://git.kernel.org/tip/585e3374d9d29376c2c37d821c8b7637dd48ca95
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Fri, 1 May 2009 12:23:18 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 1 May 2009 13:23:44 +0200
perf_counter: tool: handle 0-length data files
Avoid perf-report barfing on 0-length data files.
[ Impact: fix perf-report SIGBUS ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
LKML-Reference: <20090501102533.196245693@...llo.nl>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
Documentation/perf_counter/perf-report.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Documentation/perf_counter/perf-report.cc b/Documentation/perf_counter/perf-report.cc
index 933a075..911d7f3 100644
--- a/Documentation/perf_counter/perf-report.cc
+++ b/Documentation/perf_counter/perf-report.cc
@@ -402,6 +402,11 @@ int main(int argc, char *argv[])
exit(-1);
}
+ if (!stat.st_size) {
+ fprintf(stderr, "zero-sized file, nothing to do!\n");
+ exit(0);
+ }
+
load_kallsyms();
remap:
--
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