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

--- Comment #20 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
And thanks for the gcov-analysis improvemnets. It is quite handy tool now :)
and it is interesting to know where the many-target calls are. Clearly there is
not much to win on walk_tree, but I guess it all depends whether program has a
clal that is important or not.

== Stats for firefox-gcda/ ==
stats for indirect_call:
  total: 160441 freq: 855229359
  not executed at all: 134863
  invalid: 541 (0.34%) freq:283079441 (33.10%)
  only one target: 20073 (12.51%) freq:212875999 (24.89%)
  useful values (with not one target):
    0 values:       86 times (0.05%) freq:    12966679 (1.52%)
    1 values:     2698 times (1.68%) freq:   266471761 (31.16%)
    2 values:     2077 times (1.29%) freq:    79089916 (9.25%)
    3 values:      102 times (0.06%) freq:      745555 (0.09%)
    4 values:        1 times (0.00%) freq:           8 (0.00%)

Top 10 invalid counters:
  freq: 16.51%: [141240244, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 1.63%: [13975904, 0, -1, 5684106, 16, 1665101193, 1253058, 1825880508,
18401625]
  freq: 1.14%: [9754922, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 1.02%: [8735262, 0, -1, 0, 0, 1236703056, 236175, 0, 0]
  freq: 1.02%: [8705490, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.96%: [8202145, 0, -1, 0, 0, 610851079, 9411, 0, 0]
  freq: 0.82%: [7017709, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.53%: [4542412, 0, -1, 0, 0, 0, 0, 1111754726, 423371]
  freq: 0.47%: [4049191, 1442160442, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.45%: [3874984, 0, -1, 0, 0, 0, 0, 0, 0]


stats for topn:
  total: 6620 freq: 16644468
  not executed at all: 6236
  invalid: 27 (0.41%) freq:2384107 (14.32%)
  only one target: 196 (2.96%) freq:3618218 (21.74%)
  useful values (with not one target):
    0 values:       32 times (0.48%) freq:     4727351 (28.40%)
    1 values:       73 times (1.10%) freq:     5762016 (34.62%)
    2 values:       54 times (0.82%) freq:      138553 (0.83%)
    3 values:        2 times (0.03%) freq:       14223 (0.09%)
    4 values:        0 times (0.00%) freq:           0 (0.00%)

Top 10 invalid counters:
  freq: 4.81%: [801313, 0, -1, 8, 386462, 0, 0, 0, 0]
  freq: 3.08%: [512299, 0, -1, 2048, 564657, 8192, 166154, 128, 8816]
  freq: 2.53%: [421331, 1784, -1, 0, 0, 0, 0, 0, 0]
  freq: 2.42%: [402980, 16, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.45%: [75216, 0, -1, 47, 174422, 0, 0, 0, 0]
  freq: 0.23%: [37551, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.23%: [37551, 0, -1, 0, 0, 0, 0, 0, 0]
  freq: 0.17%: [28092, 0, -1, 0, 0, 47, 39898, 0, 0]
  freq: 0.06%: [9703, 0, -1, 47, 13860, 0, 0, 2, 6264]
  freq: 0.06%: [9561, 0, -1, 0, 0, 16, 7612, 4, 9640]


and hacked libgcov build:

== Stats for firefox-gcda-hacked/ ==
stats for indirect_call:
  total: 160441 freq: 851736881
  not executed at all: 134832
  invalid: 0 (0.00%) freq:0 (0.00%)
  only one target: 20051 (12.50%) freq:106338877 (12.48%)
  useful values (with not one target):
    0 values:      108 times (0.07%) freq:    15676696 (1.84%)
    1 values:     2944 times (1.83%) freq:   595969787 (69.97%)
    2 values:     2307 times (1.44%) freq:   127252058 (14.94%)
    3 values:      177 times (0.11%) freq:     6339867 (0.74%)
    4 values:       22 times (0.01%) freq:      159596 (0.02%)

Top 10 invalid counters:
Traceback (most recent call last):
  File "/aux/hubicka/gcov-dump-analysis.py", line 100, in <module>
    print('  freq: %.2f%%: %s' % (100 * all_invalid[i][0] / sum,
all_invalid[i]))

I guess we do not need rest of the dump.
It is interesting that 1 useful value target goes up from 34% to 69%, so we
seem to lose almost half of useful speculation info still.

I am not sure why the "only one useful target" stat changes significantly.
Maybe here is some bug in detection of it?

Reply via email to