diff mbox series

profile: clarify comment around histogram format

Message ID 20200904212423.3921626-1-slyfox@gentoo.org
State New
Headers show
Series profile: clarify comment around histogram format | expand

Commit Message

Sergei Trofimovich Sept. 4, 2020, 9:24 p.m. UTC
From: Sergei Trofimovich <siarheit@google.com>

gcc/ChangeLog:

	* gcc/profile.c (sort_hist_values): Clarify hist format:
	start with a value, not counter.
---
 gcc/profile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Law Sept. 17, 2020, 9:48 p.m. UTC | #1
On 9/4/20 3:24 PM, Sergei Trofimovich via Gcc-patches wrote:
> From: Sergei Trofimovich <siarheit@google.com>
>
> gcc/ChangeLog:
>
> 	* gcc/profile.c (sort_hist_values): Clarify hist format:
> 	start with a value, not counter.

OK

jeff
diff mbox series

Patch

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.  */