diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-31 00:13:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-31 00:13:26 +0000 |
commit | 34e1549e1b8bfe70492e7c23ecec1277fcf677b2 (patch) | |
tree | b2d48a4dcdb7d7462faf93dfb51075208674449d /llvm/tools/llvm-prof/llvm-prof.cpp | |
parent | 0575f97e4b4d7aaf571f6518e5ae7cd153ab9bd1 (diff) | |
download | bcm5719-llvm-34e1549e1b8bfe70492e7c23ecec1277fcf677b2.tar.gz bcm5719-llvm-34e1549e1b8bfe70492e7c23ecec1277fcf677b2.zip |
Add percentage info
llvm-svn: 9624
Diffstat (limited to 'llvm/tools/llvm-prof/llvm-prof.cpp')
-rw-r--r-- | llvm/tools/llvm-prof/llvm-prof.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-prof/llvm-prof.cpp b/llvm/tools/llvm-prof/llvm-prof.cpp index a63137b284a..e9f6d991462 100644 --- a/llvm/tools/llvm-prof/llvm-prof.cpp +++ b/llvm/tools/llvm-prof/llvm-prof.cpp @@ -155,12 +155,13 @@ int main(int argc, char **argv) { std::cout << "Top 20 most frequently executed basic blocks:\n\n"; // Print out the function frequencies... - printf(" ## \tFrequency\n"); + printf(" ## %%%% \tFrequency\n"); unsigned BlocksToPrint = Counts.size(); if (BlocksToPrint > 20) BlocksToPrint = 20; for (unsigned i = 0; i != BlocksToPrint; ++i) { Function *F = Counts[i].first->getParent(); - printf("%3d. %5u/%llu\t%s() - %s\n", i+1, + printf("%3d. %5.2f%% %5u/%llu\t%s() - %s\n", i+1, + Counts[i].second/(double)TotalExecutions*100, Counts[i].second, TotalExecutions, F->getName().c_str(), Counts[i].first->getName().c_str()); FunctionsToPrint.insert(F); |