aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-prof
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-31 00:34:05 +0000
committerChris Lattner <sabre@nondot.org>2003-10-31 00:34:05 +0000
commit9088de7357c3e618685af21d79ce5e598304dab0 (patch)
treef53c59be95f8b8cd397db596f18f129486f3471b /tools/llvm-prof
parent3b7f41631db5a63d6d48027aacd4c73b4fc336ae (diff)
never print zero executions blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-prof')
-rw-r--r--tools/llvm-prof/llvm-prof.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp
index 80eb36bd63..672e0f6922 100644
--- a/tools/llvm-prof/llvm-prof.cpp
+++ b/tools/llvm-prof/llvm-prof.cpp
@@ -159,6 +159,7 @@ int main(int argc, char **argv) {
unsigned BlocksToPrint = Counts.size();
if (BlocksToPrint > 20) BlocksToPrint = 20;
for (unsigned i = 0; i != BlocksToPrint; ++i) {
+ if (Counts[i].second == 0) break;
Function *F = Counts[i].first->getParent();
printf("%3d. %5.2f%% %5u/%llu\t%s() - %s\n", i+1,
Counts[i].second/(double)TotalExecutions*100,