aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-05-01 12:23:18 +0200
committerIngo Molnar <mingo@elte.hu>2009-05-01 13:23:44 +0200
commit585e3374d9d29376c2c37d821c8b7637dd48ca95 (patch)
tree475ce31aa831f186ddb8416a29548996a8ded2cf /Documentation
parent63a809a2dc53b91268dd915bbcbd425063893676 (diff)
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@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090501102533.196245693@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/perf_counter/perf-report.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/perf_counter/perf-report.cc b/Documentation/perf_counter/perf-report.cc
index 933a0754453..911d7f3e7a6 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: