public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/68080] New: gcov returns negative counts
@ 2015-10-24 19:07 Pidgeot18 at gmail dot com
  2015-10-24 19:08 ` [Bug gcov-profile/68080] " Pidgeot18 at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: Pidgeot18 at gmail dot com @ 2015-10-24 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 68080
           Summary: gcov returns negative counts
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Pidgeot18 at gmail dot com
  Target Milestone: ---

Created attachment 36576
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36576&action=edit
File to run

(See also bug 67937 for bad things that happen when this occurs).

I finally minimized a test case that causes negative counts to happen. If you
name the attached file TestDeadlockDetector.cpp and run:
 rm -rf *.gcda && c++ --coverage -std=c++11 -pthread -Os
TestDeadlockDetector.cpp && ./a.out && gcov -a -b -p TestDeadlockDetector.gcda
&& grep -- '-[0-9][0-9]*:' TestDeadlockDetector.cpp.gcov

you should usually see ContentionNoDeadlock_thread have negative counts. The
exact count changes from each run (and sometimes, it's not negative).

The -Os is in the c++ command line is definitely required.


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

end of thread, other threads:[~2015-10-24 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-24 19:07 [Bug gcov-profile/68080] New: gcov returns negative counts Pidgeot18 at gmail dot com
2015-10-24 19:08 ` [Bug gcov-profile/68080] " Pidgeot18 at gmail dot com

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