projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f95bd50
)
profile: clarify comment around histogram format
author
Sergei Trofimovich
<siarheit@google.com>
Fri, 4 Sep 2020 21:20:57 +0000
(22:20 +0100)
committer
Sergei Trofimovich
<siarheit@google.com>
Thu, 17 Sep 2020 22:29:53 +0000
(23:29 +0100)
gcc/ChangeLog:
* profile.c (sort_hist_values): Clarify hist format:
start with a value, not counter.
gcc/profile.c
patch
|
blob
|
history
diff --git
a/gcc/profile.c
b/gcc/profile.c
index f5c206813c7edf74984fd09f2edc3f43859164b3..fe8963cc9e93dc9ac49f3c6ab587fcdb34322307 100644
(file)
--- a/
gcc/profile.c
+++ b/
gcc/profile.c
@@
-771,7
+771,7
@@
sort_hist_values (histogram_value hist)
int counters = hist->hvalue.counters[1];
for (int i = 0; i < counters - 1; i++)
/* Hist value is organized as:
- [total_executions, N, counter1, ..., valueN, counterN]
+ [total_executions, N,
value1,
counter1, ..., valueN, counterN]
Use decrease bubble sort to rearrange it. The sort starts from <value1,
counter1> and compares counter first. If counter is same, compares the
value, exchange it if small to keep stable. */