[Bug gcov-profile/96913] gcc-11: __gcov_merge_topn hangs

slyfox at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 4 21:31:44 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96913

--- Comment #3 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Specifically I think this is already a wrong format on disk:

> _json.gcda:    01a70000:   0:COUNTERS topn 0 counts
> _json.gcda:    01a90000:  48:COUNTERS indirect_call 24 counts
> _json.gcda:                   0: 1 1 140325305737168 1 1 140325305737200 0 0
> _json.gcda:                   8: 0 0 0 0 0 0 0 0
> _json.gcda:                  16: 0 0 0 0 0 0 0 0
> ...

Assuming indirect_call is in a 'hist' value format it should  be in form of:

  [total_executions, N, value1, counter1, ..., valueN, counterN]

Main problem: we have more than one entry here (which might be ok):
- record1 (ok):  total_executions=1 N=1 value1=140325305737168 counter1=1
- record2 (bad): total_executions=1 N=140325305737200 counter=0 ...

This is where we trip over enormous N.


More information about the Gcc-bugs mailing list