summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-01-29 20:47:46 -0500
committerTavian Barnes <tavianator@gmail.com>2011-01-29 20:47:46 -0500
commitb2ffd0909e3f5ff6c86ba7d0b37f4c8cf0af8143 (patch)
tree634530366773aa62f2df7c8c3d3b4ee443457a1a
parentc32ac45dbc4e67a659da4eebecdc5b69ce013dc8 (diff)
downloaddimension-b2ffd0909e3f5ff6c86ba7d0b37f4c8cf0af8143.tar.xz
Print percentage of successful predictions.
-rw-r--r--libdimension/profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/profile.c b/libdimension/profile.c
index c88e3ef..5e34931 100644
--- a/libdimension/profile.c
+++ b/libdimension/profile.c
@@ -89,8 +89,8 @@ dmnsn_print_bad_prediction(void *ptr)
double rate = ((double)info->predicted)/info->branches;
if (rate < 0.75 || info->branches < 100000) {
fprintf(stderr,
- "Bad branch prediction: %s: %" PRIu64 "/%" PRIu64 "\n",
- info->location, info->predicted, info->branches);
+ "Bad branch prediction: %s: %" PRIu64 "/%" PRIu64 " (%g%%)\n",
+ info->location, info->predicted, info->branches, 100.0*rate);
}
dmnsn_free(info->location);