summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-08-18 20:47:32 +0000
committerJustin Bogner <mail@justinbogner.com>2014-08-18 20:47:32 +0000
commit8da47ac82ecac7892466421279d33725e17b531c (patch)
tree71549d12461e19c6d0fd6bfe57002ffe6253b5a6
parent4834653872e2173cce998a5864a687b0e1e6164d (diff)
downloadbcm5719-llvm-8da47ac82ecac7892466421279d33725e17b531c.tar.gz
bcm5719-llvm-8da47ac82ecac7892466421279d33725e17b531c.zip
profile: Improve error messages on bad GCDA files
llvm-svn: 215933
-rw-r--r--compiler-rt/lib/profile/GCDAProfiling.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
index 5cd22c78a8f..45fbd07e544 100644
--- a/compiler-rt/lib/profile/GCDAProfiling.c
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
@@ -389,13 +389,17 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
if (val != (uint32_t)-1) {
/* There are counters present in the file. Merge them. */
if (val != 0x01a10000) {
- fprintf(stderr, "profiling:invalid arc tag (0x%08x)\n", val);
+ fprintf(stderr, "profiling: %s: cannot merge previous GCDA file: "
+ "corrupt arc tag (0x%08x)\n",
+ filename, val);
return;
}
val = read_32bit_value();
if (val == (uint32_t)-1 || val / 2 != num_counters) {
- fprintf(stderr, "profiling:invalid number of counters (%d)\n", val);
+ fprintf(stderr, "profiling: %s: cannot merge previous GCDA file: "
+ "mismatched number of counters (%d)\n",
+ filename, val);
return;
}
@@ -437,13 +441,17 @@ void llvm_gcda_summary_info() {
if (val != (uint32_t)-1) {
/* There are counters present in the file. Merge them. */
if (val != 0xa1000000) {
- fprintf(stderr, "profiling:invalid object tag (0x%08x)\n", val);
+ fprintf(stderr, "profiling: %s: cannot merge previous run count: "
+ "corrupt object tag (0x%08x)\n",
+ filename, val);
return;
}
val = read_32bit_value(); /* length */
if (val != obj_summary_len) {
- fprintf(stderr, "profiling:invalid object length (%d)\n", val);
+ fprintf(stderr, "profiling: %s: cannot merge previous run count: "
+ "mismatched object length (%d)\n",
+ filename, val);
return;
}
OpenPOWER on IntegriCloud