From b2ffd0909e3f5ff6c86ba7d0b37f4c8cf0af8143 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 29 Jan 2011 20:47:46 -0500 Subject: Print percentage of successful predictions. --- libdimension/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdimension') 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); -- cgit v1.2.3