[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 30 18:26:17 PST 2003
Changes in directory llvm/tools/llvm-prof:
llvm-prof.cpp updated: 1.11 -> 1.12
---
Log message:
Add percentage info
---
Diffs of the changes: (+3 -2)
Index: llvm/tools/llvm-prof/llvm-prof.cpp
diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.11 llvm/tools/llvm-prof/llvm-prof.cpp:1.12
--- llvm/tools/llvm-prof/llvm-prof.cpp:1.11 Thu Oct 30 18:06:57 2003
+++ llvm/tools/llvm-prof/llvm-prof.cpp Thu Oct 30 18:13:26 2003
@@ -155,12 +155,13 @@
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);
More information about the llvm-commits
mailing list