Skip to content

Commit

Permalink
tarmac-profile: force at least one space between columns.
Browse files Browse the repository at this point in the history
If you profile a 64-bit image whose code addresses are at least
0x1000000000, then each function address occupies the whole of the
12-character 'Address' column in the tabular output, or more. So the
number in the 'Count' column is concatenated to the end, making the
display ambiguous and hard to read.

Now we reliably print at least one space between the numbers, even if
they're wide enough to make the alignment go wonky.
  • Loading branch information
statham-arm committed Jun 4, 2024
1 parent 8ed9c34 commit ed55765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/profileinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ class Profiler : public CallTreeVisitor {
ostringstream addr;
addr << "0x" << hex << p.first;

cout << left << setw(12) << addr.str();
cout << left << setw(12) << p.second.Count;
cout << left << setw(12) << p.second.CumulatedCycleCount;
cout << left << setw(11) << addr.str() << ' ';
cout << left << setw(11) << p.second.Count << ' ';
cout << left << setw(11) << p.second.CumulatedCycleCount << ' ';
cout << left << CT.getFunctionName(p.first);
cout << '\n';
}
Expand Down

0 comments on commit ed55765

Please sign in to comment.