diff options
author | Sergei Trofimovich <siarheit@google.com> | 2020-09-04 22:20:57 +0100 |
---|---|---|
committer | Sergei Trofimovich <siarheit@google.com> | 2020-09-17 23:29:53 +0100 |
commit | f234870e1ca68ee793a3094cb9b2ab89addf8d43 (patch) | |
tree | 5246a90ef7407b1c1d414424f3f97225cf4cb9f8 /gcc | |
parent | f95bd50b4c1879ca96f0d3f0a60fcebe4afc9aef (diff) | |
download | gcc-f234870e1ca68ee793a3094cb9b2ab89addf8d43.zip gcc-f234870e1ca68ee793a3094cb9b2ab89addf8d43.tar.gz gcc-f234870e1ca68ee793a3094cb9b2ab89addf8d43.tar.bz2 |
profile: clarify comment around histogram format
gcc/ChangeLog:
* profile.c (sort_hist_values): Clarify hist format:
start with a value, not counter.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index f5c2068..fe8963c 100644 --- 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. */ |