public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH,RFC,V5 0/6] Support for CTF in GCC
@ 2019-09-09  4:28 Indu Bhagat
  2019-09-09  4:28 ` [PATCH,RFC,V5 5/6] Update CTF testsuite Indu Bhagat
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Indu Bhagat @ 2019-09-09  4:28 UTC (permalink / raw)
  To: gcc-patches

Hello,

This patch series adds support for CTF generation in GCC.

[Changes from V4]

1. Patch 4 brings in a number of bug fixes and enhancements. Few of them are:
   - Use DECL_UID () instead of htab_hash_pointer () for _DECL
   - Handle boolean and zero-sized bitfields
   - Do not inform () when skipping types.  Arguably this was intended for the
     GCC developer and not for the end user.
   - Other bugfixes around de-dupilication at the time of CTF Array or CTF
     function generation.

2. Patch 5 has added testcases.

3. Patch 6 is a new patch added for handling CTF section when LTO is enabled.

Work on CTF spec document is also in progress; will share something very soon.
In the interim, https://sourceware.org/ml/binutils/2019-04/msg00277.html may be
helpful.

For more context, please also see previous posting
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg01209.html

NickA recently posted a changeset to the binutils mailing list that adds initial
support for linking CTF sections. Please see
https://sourceware.org/ml/binutils/2019-09/msg00045.html

( This current GCC  patch set has the ctf.h in sync with the above-mentioned
   binutils patch set. )

I will be connecting online to talk about the CTF support in GNU toolchain at
Cauldron 2019.  Posting these patches so that there is added context.

Testing :
Apart from the usual bootstrap and regression testing on x86_64/linux,
sparc64/linux, I have now compiled more codebases with -gt.

Thanks

Indu Bhagat (6):
  Add new function lang_GNU_GIMPLE
  Add CTF command line options : -gtLEVEL
  Setup for CTF generation and emission
  CTF generation for a single compilation unit
  Update CTF testsuite
  Handle CTF sections when LTO is enabled

 gcc/ChangeLog                                      |   97 +
 gcc/Makefile.in                                    |    5 +
 gcc/cgraphunit.c                                   |   12 +-
 gcc/common.opt                                     |    9 +
 gcc/ctfcreate.c                                    |  557 ++++++
 gcc/ctfout.c                                       | 1941 ++++++++++++++++++++
 gcc/ctfout.h                                       |  364 ++++
 gcc/ctfutils.c                                     |  198 ++
 gcc/doc/invoke.texi                                |   16 +
 gcc/flag-types.h                                   |   13 +
 gcc/gengtype.c                                     |    4 +-
 gcc/langhooks.c                                    |    9 +
 gcc/langhooks.h                                    |    1 +
 gcc/opts.c                                         |   26 +
 gcc/passes.c                                       |    7 +-
 gcc/testsuite/ChangeLog                            |   46 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-1.c             |    6 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-2.c             |   10 +
 .../gcc.dg/debug/ctf/ctf-anonymous-struct-1.c      |   23 +
 .../gcc.dg/debug/ctf/ctf-anonymous-union-1.c       |   26 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-array-1.c       |   31 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-array-2.c       |   39 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-1.c   |   30 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-2.c   |   39 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-3.c   |   16 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-4.c   |   22 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-complex-1.c     |   22 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c   |   44 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-2.c   |   30 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-3.c   |   41 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-4.c   |   21 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-enum-1.c        |   21 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-enum-2.c        |   26 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-float-1.c       |   16 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-1.c     |   36 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-2.c     |   16 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-3.c     |   21 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-func-index-1.c  |   25 +
 .../gcc.dg/debug/ctf/ctf-function-pointers-1.c     |   24 +
 .../gcc.dg/debug/ctf/ctf-function-pointers-2.c     |   18 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-functions-1.c   |   34 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-int-1.c         |   17 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-objt-index-1.c  |   29 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-pointers-1.c    |   26 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-preamble-1.c    |   11 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-skip-types-1.c  |   33 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-str-table-1.c   |   26 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-struct-1.c      |   25 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-struct-2.c      |   30 +
 .../gcc.dg/debug/ctf/ctf-struct-array-1.c          |   36 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-typedef-1.c     |   23 +
 .../gcc.dg/debug/ctf/ctf-typedef-struct-1.c        |   12 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-union-1.c       |   14 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf-variables-1.c   |   25 +
 gcc/testsuite/gcc.dg/debug/ctf/ctf.exp             |   41 +
 gcc/testsuite/gcc.dg/debug/dwarf2-ctf-1.c          |    7 +
 gcc/toplev.c                                       |   18 +
 include/ChangeLog                                  |    9 +
 include/ctf.h                                      |  510 +++++
 libiberty/ChangeLog                                |    5 +
 libiberty/simple-object.c                          |    3 +
 61 files changed, 4836 insertions(+), 6 deletions(-)
 create mode 100644 gcc/ctfcreate.c
 create mode 100644 gcc/ctfout.c
 create mode 100644 gcc/ctfout.h
 create mode 100644 gcc/ctfutils.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-anonymous-struct-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-anonymous-union-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-array-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-array-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-3.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-bitfields-4.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-complex-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-3.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-4.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-enum-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-enum-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-float-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-forward-3.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-func-index-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-function-pointers-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-function-pointers-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-functions-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-int-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-objt-index-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-pointers-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-preamble-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-skip-types-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-str-table-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-struct-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-struct-2.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-struct-array-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-typedef-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-typedef-struct-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-union-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf-variables-1.c
 create mode 100644 gcc/testsuite/gcc.dg/debug/ctf/ctf.exp
 create mode 100644 gcc/testsuite/gcc.dg/debug/dwarf2-ctf-1.c
 create mode 100644 include/ctf.h

-- 
1.8.3.1

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

end of thread, other threads:[~2019-09-09  4:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09  4:28 [PATCH,RFC,V5 0/6] Support for CTF in GCC Indu Bhagat
2019-09-09  4:28 ` [PATCH,RFC,V5 5/6] Update CTF testsuite Indu Bhagat
2019-09-09  4:28 ` [PATCH,RFC,V5 2/6] Add CTF command line options : -gtLEVEL Indu Bhagat
2019-09-09  4:28 ` [PATCH,RFC,V5 3/6] Setup for CTF generation and emission Indu Bhagat
2019-09-09  4:28 ` [PATCH,RFC,V5 1/6] Add new function lang_GNU_GIMPLE Indu Bhagat
2019-09-09  4:28 ` [PATCH,RFC,V5 6/6] Handle CTF sections when LTO is enabled Indu Bhagat
2019-09-09  4:29 ` [PATCH,RFC,V5 4/6] CTF generation for a single compilation unit Indu Bhagat

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