V3 [PATCH 0/5] Support the PGO build for binutils+gdb

H.J. Lu hjl.tools@gmail.com
Sat Dec 19 18:10:31 GMT 2020


Add the --enable-pgo-build[=lto] configure option.  When binutils+gdb
is not built together with GCC, --enable-pgo-build enables the PGO build:

1. First build with -fprofile-generate.
2. Use "make maybe-check-*" to generate profiling data and pass -i to make
to ignore errors when generating profiling data.
3. Use "make clean" to remove the previous build.
4. Rebuild with -fprofile-use.

Tested PGO/LTO builds for GDB and binutils with GCC 11 on Fedora 33.

Changes from V2:

1. Pass PGO_BUILD_TRAINING=yes for PGO build training.
2. Set TESTS to gdb.dwarf2/*.exp for GDB PGO build training.
3. gnulib: Support variables from the top level Makefile.

Changes from V1:

1. Pass -ffat-lto-objects together with -flto=jobserver.
2. Pass -i to make to ignore "make check" errors in PGO training runs.

H.J. Lu (5):
  GCC: Pass --plugin to AR and RANLIB
  Binutils: Pass --plugin to AR and RANLIB
  Support the PGO build for binutils+gdb
  Set TESTS to gdb.dwarf2/*.exp for PGO build training
  gnulib: Support variables from the top level Makefile

 Makefile.in               |  68 ++++++++++++-
 Makefile.tpl              |  63 +++++++++++-
 bfd/configure             |  27 ++++-
 binutils/configure        |  27 ++++-
 config/gcc-plugin.m4      |  28 ++++++
 configure                 | 139 ++++++++++++++++++++++++-
 configure.ac              |  80 +++++++++++++++
 gas/configure             |  27 ++++-
 gdb/testsuite/Makefile.in |   5 +
 gnulib/Makefile.am        |  39 ++++++++
 gnulib/Makefile.in        |  40 ++++++++
 gprof/configure           |  27 ++++-
 ld/configure              |  27 ++++-
 libctf/configure          |  27 ++++-
 libiberty/Makefile.in     |   5 +-
 libiberty/aclocal.m4      |   1 +
 libiberty/configure       |  37 +++++++
 libiberty/configure.ac    |  12 +++
 libtool.m4                |  25 ++++-
 opcodes/configure         |  27 ++++-
 zlib/configure            | 206 +++++++++++++++++++++++++++++++++++++-
 21 files changed, 907 insertions(+), 30 deletions(-)

-- 
2.29.2



More information about the Gdb-patches mailing list