public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3271] profile: clarify comment around histogram format
@ 2020-09-17 22:30 Sergei Trofimovich
0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2020-09-17 22:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f234870e1ca68ee793a3094cb9b2ab89addf8d43
commit r11-3271-gf234870e1ca68ee793a3094cb9b2ab89addf8d43
Author: Sergei Trofimovich <siarheit@google.com>
Date: Fri Sep 4 22:20:57 2020 +0100
profile: clarify comment around histogram format
gcc/ChangeLog:
* profile.c (sort_hist_values): Clarify hist format:
start with a value, not counter.
Diff:
---
gcc/profile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/profile.c b/gcc/profile.c
index f5c206813c7..fe8963cc9e9 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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-17 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 22:30 [gcc r11-3271] profile: clarify comment around histogram format Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).