aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-05-01 06:23:18 -0400
committerIngo Molnar <mingo@elte.hu>2009-05-01 07:23:44 -0400
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 933a07544534..911d7f3e7a65 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[])
402 exit(-1); 402 exit(-1);
403 } 403 }
404 404
405 if (!stat.st_size) {
406 fprintf(stderr, "zero-sized file, nothing to do!\n");
407 exit(0);
408 }
409
405 load_kallsyms(); 410 load_kallsyms();
406 411
407remap: 412remap: