public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "seongbae dot park at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov/profile/28441] Need atomic increment of gcov counters for MP programs
Date: Sun, 23 Jul 2006 17:27:00 -0000	[thread overview]
Message-ID: <20060723172742.28173.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28441-7044@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from seongbae dot park at gmail dot com  2006-07-23 17:27 -------
It seems that you didn't change libgcov.c,
which suggests that you didn't address __gcov_{pow2,interval}_profiler.
Without such change, -fprofile-generate will cause the mismatch between
the value counters and edge counters, 
so it would be very nice if you can fix that as well 
(this is just a suggestion).

In case someone wants to address that issue,
I think there are three choices:

#1 make above profiler routines to use atomic increment *always*
#2 introduce a new environment variable to pick atomic/non-atomic increment
#3 make atomic increment version of those routines and -fprofile-multithread to
generate codes to call them.

I prefer #3, but #1 might be simple enough without much bad affect.

Another comment is about the name of -fprofile-multithread.
There's an alternative MT-safe profiling scheme of making counters TLS.
So I'd prefer if the option for atomic increment is more explicit, 
something like -fprofile-atomic-increment.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28441


  parent reply	other threads:[~2006-07-23 17:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-20  0:47 [Bug gcov/profile/28441] New: " gnb at sgi dot com
2006-07-20  1:09 ` [Bug gcov/profile/28441] " pinskia at gcc dot gnu dot org
2006-07-20  1:51 ` gnb at sgi dot com
2006-07-20  3:45 ` bangerth at dealii dot org
2006-07-21 18:05 ` ian at airs dot com
2006-07-23 17:27 ` seongbae dot park at gmail dot com [this message]
2006-07-24  2:23 ` gnb at sgi dot com
2006-07-26  0:28 ` pinskia at gcc dot gnu dot org
2006-07-29  0:41 ` steven at gcc dot gnu dot org
2006-07-29  5:21 ` ian at airs dot com
2006-07-31  1:18 ` gnb at sgi dot com
2006-12-06 20:50 ` [Bug gcov-profile/28441] " gnb at melbourne dot sgi dot com
2007-01-10  1:25 ` gnb at melbourne dot sgi dot com
2007-03-14 23:03 ` hubicka at gcc dot gnu dot org
2008-08-22 18:18 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060723172742.28173.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).