public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Various GCOV/PGO improvements
@ 2016-08-01  8:50 marxin
  2016-08-01  8:49 ` [PATCH 3/4] Fix typo in gcov.texi marxin
                   ` (4 more replies)
  0 siblings, 5 replies; 95+ messages in thread
From: marxin @ 2016-08-01  8:50 UTC (permalink / raw)
  To: gcc-patches; +Cc: jh, nathan

Hi.

My attempt in the following small series is to cover couple of issues
I've recently observed. I'll briefly describe changes in respect to
an individual patch:

marxin (4):
  Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch

As mentioned in [1], our current implementation can produce a corrupted
profile due to a massive usage of threads. Well, the absolutely robust
solution would be to either utilize TLS or to use atomics & locking
mechanism. However, as David Li pointed out, the most interesting
counters that can suffer from multithreading are -fprofile-arcs counters
and indirect call counters. I've just cherry picked the functionality
from google/gcc-4_9 branch.

[1] https://gcc.gnu.org/ml/gcc/2016-07/msg00131.html

  Remove __gcov_indirect_call_profiler

The profiler function is unused, thus can be removed.

  Fix typo in gcov.texi

Just a small typo in names of functions that one can call from
a user application.

  Add tests for __gcov_dump and __gcov_reset

Adding tests for the aforementioned functions.

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests
(tested together).

Thoughts?
Thanks,
Martin

marxin (4):
  Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch
  Remove __gcov_indirect_call_profiler
  Fix typo in gcov.texi
  Add tests for __gcov_dump and __gcov_reset

 gcc/common.opt                             |  9 ++++
 gcc/doc/gcov-tool.texi                     |  2 +-
 gcc/doc/gcov.texi                          |  6 +--
 gcc/doc/invoke.texi                        | 11 +++++
 gcc/gcov-io.h                              | 22 ++++++++++
 gcc/testsuite/g++.dg/gcov/gcov-dump-1.C    | 23 ++++++++++
 gcc/testsuite/g++.dg/gcov/gcov-dump-2.C    | 32 ++++++++++++++
 gcc/testsuite/g++.dg/gcov/gcov-threads-1.C | 46 ++++++++++++++++++++
 gcc/tree-profile.c                         | 62 ++++++++++++++++++---------
 libgcc/Makefile.in                         |  6 ++-
 libgcc/libgcov-profiler.c                  | 67 ++++++++++++++++++------------
 libgcc/libgcov-util.c                      |  3 +-
 libgcc/libgcov.h                           |  4 +-
 13 files changed, 238 insertions(+), 55 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/gcov/gcov-dump-1.C
 create mode 100644 gcc/testsuite/g++.dg/gcov/gcov-dump-2.C
 create mode 100644 gcc/testsuite/g++.dg/gcov/gcov-threads-1.C

-- 
2.9.2

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

end of thread, other threads:[~2016-11-11 15:11 UTC | newest]

Thread overview: 95+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-01  8:50 [PATCH 0/4] Various GCOV/PGO improvements marxin
2016-08-01  8:49 ` [PATCH 3/4] Fix typo in gcov.texi marxin
2016-08-01  8:50 ` [PATCH 2/4] Remove __gcov_indirect_call_profiler marxin
2016-08-01  8:50 ` [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch marxin
2016-08-01 12:22   ` Nathan Sidwell
2016-08-01 13:29     ` Martin Liška
2016-08-04 14:48       ` Nathan Sidwell
2016-08-04 15:34         ` Martin Liška
2016-08-04 16:43           ` Nathan Sidwell
2016-08-04 17:03             ` Nathan Sidwell
2016-08-05  8:55               ` Martin Liška
2016-08-05 12:38                 ` Nathan Sidwell
2016-08-05 12:48                   ` Martin Liška
2016-08-05 13:14                     ` Nathan Sidwell
2016-08-05 13:43                       ` Martin Liška
2016-08-08 13:59                         ` [PATCH 5/N] Add new *_atomic counter update function, (-fprofile-update=atomic) Martin Liška
2016-08-08 15:24                           ` Nathan Sidwell
2016-08-08 16:51                             ` Martin Liška
2016-08-08 17:03                               ` Martin Liška
2016-08-09 12:36                                 ` Nathan Sidwell
2016-08-08 16:56                             ` [PATCH] Fix POW2 histogram Martin Liška
2016-08-09  8:41                               ` [PATCH 2/N] Fix usage of " Martin Liška
2016-08-09 12:37                                 ` Nathan Sidwell
2016-08-09 12:34                               ` [PATCH] Fix " Nathan Sidwell
2016-08-09 11:24                         ` [PATCH] Set -fprofile-update=atomic when -pthread is present Martin Liška
2016-08-09 12:40                           ` Nathan Sidwell
2016-08-09 19:04                           ` Andi Kleen
2016-08-12 13:31                             ` Martin Liška
2016-08-18  3:16                               ` Jeff Law
2016-08-18 11:02                                 ` Nathan Sidwell
2016-08-18 15:51                                 ` Andi Kleen
2016-08-18 15:53                                   ` Jeff Law
2016-10-03 12:13                                     ` Martin Liška
2016-10-03 12:26                                       ` Nathan Sidwell
2016-10-03 16:46                                         ` Jeff Law
2016-10-03 17:52                                           ` Andi Kleen
2016-10-04 12:05                                         ` Martin Liška
2016-10-05 17:54                                           ` Jeff Law
2016-10-13 15:34                                           ` [PATCH] Introduce -fprofile-update=maybe-atomic Martin Liška
2016-10-31  9:13                                             ` Martin Liška
2016-11-10 13:19                                               ` Martin Liška
2016-11-10 15:43                                                 ` Nathan Sidwell
2016-11-10 15:55                                                   ` David Edelsohn
2016-11-10 16:18                                                     ` Nathan Sidwell
2016-11-10 15:58                                                   ` Martin Liška
2016-11-10 16:17                                                     ` David Edelsohn
2016-11-10 16:24                                                       ` Martin Liška
2016-11-10 17:31                                                         ` Nathan Sidwell
2016-11-11 10:48                                                           ` Martin Liška
2016-11-11 15:11                                                             ` Nathan Sidwell
2016-11-10 16:14                                                   ` Nathan Sidwell
2016-11-10 16:16                                                     ` David Edelsohn
2016-08-18 15:54                                   ` [PATCH] Set -fprofile-update=atomic when -pthread is present Jakub Jelinek
2016-08-18 16:06                                     ` Richard Biener
2016-09-07 11:41                                       ` Martin Liška
     [not found]                                         ` <CAFiYyc0UaSzXhZmyG9QRkHGT4JFowxBfE2yb-NvXE=hR1xafdA@mail.gmail.com>
2016-09-15 10:18                                           ` [RFC] Speed-up -fprofile-update=atomic Martin Liška
2016-10-04  9:45                                             ` Richard Biener
2016-10-12 13:53                                               ` Martin Liška
2016-10-13  9:43                                                 ` Richard Biener
2016-10-17 11:47                                                   ` Martin Liška
     [not found]                                                     ` <CAFiYyc3eDT4g926PPZuktz5fEW=k-PibAcxhigx4GBcxoXNJFQ@mail.gmail.com>
2016-10-24 12:09                                                       ` Martin Liška
     [not found]                                                         ` <CAFiYyc1tSdTdqqkHcMp+dgE43+8tHL6kY8E07TCHoZBeUT-ggQ@mail.gmail.com>
2016-10-25 14:32                                                           ` Martin Liška
2016-10-26  9:29                                                             ` Richard Biener
2016-10-26  9:32                                                               ` Richard Biener
2016-08-18 16:04                                   ` [PATCH] Set -fprofile-update=atomic when -pthread is present Richard Biener
2016-08-10 12:57                         ` [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch Nathan Sidwell
2016-08-13 12:14                         ` [BUILDROBOT] avr broken (was: [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch) Jan-Benedict Glaw
     [not found]                           ` <4455937b-eba7-fe66-fe1a-3172567dd1e4@suse.cz>
2016-08-16 13:36                             ` [BUILDROBOT] avr broken Nathan Sidwell
     [not found]                               ` <617e8799-b7db-fefd-b3a3-842e9a7decfd@suse.cz>
2016-08-16 14:31                                 ` Nathan Sidwell
2016-08-16 17:05                                   ` Jan-Benedict Glaw
2016-08-16 18:26                                     ` Nathan Sidwell
2016-08-17  7:21                                       ` Denis Chertykov
2016-08-17  7:22                                         ` Martin Liška
2016-08-17  8:11                                       ` Jan-Benedict Glaw
2016-08-16 12:56                         ` [PATCH] Detect whether target can use -fprofile-update=atomic Martin Liška
2016-08-16 14:31                           ` Nathan Sidwell
2016-09-06 10:57                             ` Martin Liška
2016-09-06 11:17                               ` David Edelsohn
2016-09-06 12:15                                 ` Nathan Sidwell
2016-09-06 12:39                                   ` Jakub Jelinek
2016-09-06 12:43                                     ` David Edelsohn
2016-09-06 12:41                                   ` David Edelsohn
2016-09-06 12:51                                     ` Martin Liška
2016-09-06 13:13                                       ` Jakub Jelinek
2016-09-06 13:15                                         ` Martin Liška
2016-09-06 13:45                                           ` Jakub Jelinek
2016-09-06 13:50                                             ` Martin Liška
2016-09-06 14:06                                               ` Jakub Jelinek
2016-09-07  7:52                                               ` Christophe Lyon
2016-09-07  9:35                                                 ` Martin Liška
2016-09-07 16:06                                                   ` Christophe Lyon
2016-09-12 20:20                                                   ` Jeff Law
2016-09-29  8:31                                               ` Rainer Orth
2016-08-01  8:50 ` [PATCH 4/4] Add tests for __gcov_dump and __gcov_reset marxin
2016-08-01 12:11 ` [PATCH 0/4] Various GCOV/PGO improvements Nathan Sidwell

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