profile: clarify comment around histogram format

gcc/ChangeLog:

	* profile.c (sort_hist_values): Clarify hist format:
	start with a value, not counter.
This commit is contained in:
Sergei Trofimovich 2020-09-04 22:20:57 +01:00
parent f95bd50b4c
commit f234870e1c

View file

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