public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-27 19:28 ` mpolacek at gcc dot gnu.org
  2020-03-29 14:19 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-03-27 19:28 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #13 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The fix hasn't been backported to gcc 8 but the problem exists there too. 
Martin, will you fix 8 too?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
  2020-03-27 19:28 ` [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov mpolacek at gcc dot gnu.org
@ 2020-03-29 14:19 ` marxin at gcc dot gnu.org
  2020-03-29 17:19 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-29 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |NEW
      Known to fail|                            |8.4.0

--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
Ah, sorry, I probably wrongly identified which versions are affected. Yes, I'm
gonna backport that.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
  2020-03-27 19:28 ` [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov mpolacek at gcc dot gnu.org
  2020-03-29 14:19 ` marxin at gcc dot gnu.org
@ 2020-03-29 17:19 ` cvs-commit at gcc dot gnu.org
  2020-03-29 17:20 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-29 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:40aa944391dfec4529fb6970b9e78d5805f88fc5

commit r8-10149-g40aa944391dfec4529fb6970b9e78d5805f88fc5
Author: Martin Liska <mliska@suse.cz>
Date:   Sun Mar 29 19:19:09 2020 +0200

    Backport 9297e013293e4d332fc7c40859ea4dd9616e0d88

            Backport from mainline
            2019-09-02  Martin Liska  <mliska@suse.cz>

            PR gcov-profile/91601
            * gcov.c (path_contains_zero_cycle_arc): Rename to ...
            (path_contains_zero_or_negative_cycle_arc): ... this and handle
            also negative edges.
            (circuit): Handle also negative edges as they can happen
            in some situations.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-03-29 17:19 ` cvs-commit at gcc dot gnu.org
@ 2020-03-29 17:20 ` marxin at gcc dot gnu.org
  2020-09-16  1:09 ` i at maskray dot me
  2020-10-19 12:17 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-29 17:20 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
      Known to fail|8.4.0                       |
      Known to work|                            |8.4.1

--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on GCC 8 branch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-03-29 17:20 ` marxin at gcc dot gnu.org
@ 2020-09-16  1:09 ` i at maskray dot me
  2020-10-19 12:17 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: i at maskray dot me @ 2020-09-16  1:09 UTC (permalink / raw)
  To: gcc-bugs

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

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #17 from Fangrui Song <i at maskray dot me> ---
The algorithm is Donald B. Johnson's "Finding all the elementary circuits of a
directed graph" (1975). (Hawick and James's just implemented the same algorithm
by changing the representation of graphs).

I am wondering why we enumerate every elementary cycle, find the minimum edge,
reduce edge weighs, and repeat the process.

What do we lose if we don't use the costly algorithm? (The time complexity is
O(n*e*(c+1)). However, many implementations (Boost and gcov.c) do not use a
hash set for the blocked list, and thus I suspect the actual complexity is
higher). Do we have other low-cost approaches? (e.g. repeatedly finding
strongly connected components and reducing)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov.
       [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-09-16  1:09 ` i at maskray dot me
@ 2020-10-19 12:17 ` marxin at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-19 12:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Fangrui Song from comment #17)
> The algorithm is Donald B. Johnson's "Finding all the elementary circuits of
> a directed graph" (1975). (Hawick and James's just implemented the same
> algorithm by changing the representation of graphs).
> 
> I am wondering why we enumerate every elementary cycle, find the minimum
> edge, reduce edge weighs, and repeat the process.

I basically taken the original patch submission and finished it.

> 
> What do we lose if we don't use the costly algorithm? (The time complexity
> is O(n*e*(c+1)). However, many implementations (Boost and gcov.c) do not use
> a hash set for the blocked list, and thus I suspect the actual complexity is
> higher). Do we have other low-cost approaches? (e.g. repeatedly finding
> strongly connected components and reducing)

Do you have a test-case where it is significant?
Feel free to provide a patch which can make it faster, I'll appreciate and
review it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-19 12:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-91601-4@http.gcc.gnu.org/bugzilla/>
2020-03-27 19:28 ` [Bug gcov-profile/91601] gcov: ICE in handle_cycle, at gcov.c:699 happen which get code coverage with lcov mpolacek at gcc dot gnu.org
2020-03-29 14:19 ` marxin at gcc dot gnu.org
2020-03-29 17:19 ` cvs-commit at gcc dot gnu.org
2020-03-29 17:20 ` marxin at gcc dot gnu.org
2020-09-16  1:09 ` i at maskray dot me
2020-10-19 12:17 ` marxin at gcc dot gnu.org

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).