[37/45] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap

Message ID 20230807111029.2320238-38-arsen@aarsen.me
State New
Headers
Series Synchronize shared build infrastructure with GCC tree |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Arsen Arsenović Aug. 7, 2023, 11:07 a.m. UTC
  From: Eugene Rozenfeld <erozen@microsoft.com>

When we collect just user events for autofdo with lbr we get some events where branch
sources are kernel addresses and branch targets are user addresses. Without kernel MMAP
events create_gcov can't make sense of kernel addresses. Currently create_gcov fails if
it can't map at least 95% of events. We sometimes get below this threshold with just
user events. The change is to collect both user events and kernel events.

Tested on x86_64-pc-linux-gnu.

ChangeLog:

	* Makefile.in: Collect both kernel and user events for autofdo
	* Makefile.tpl: Collect both kernel and user events for autofdo
---
 Makefile.in  | 2 +-
 Makefile.tpl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/Makefile.in b/Makefile.in
index a00ca072b47..406bc40274f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -405,7 +405,7 @@  MAKEINFO = @MAKEINFO@
 EXPECT = @EXPECT@
 RUNTEST = @RUNTEST@
 
-AUTO_PROFILE = gcc-auto-profile -c 10000000
+AUTO_PROFILE = gcc-auto-profile --all -c 10000000
 
 # This just becomes part of the MAKEINFO definition passed down to
 # sub-makes.  It lets flags be given on the command line while still
diff --git a/Makefile.tpl b/Makefile.tpl
index 485b2f16fd2..45facbac6a9 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -408,7 +408,7 @@  MAKEINFO = @MAKEINFO@
 EXPECT = @EXPECT@
 RUNTEST = @RUNTEST@
 
-AUTO_PROFILE = gcc-auto-profile -c 10000000
+AUTO_PROFILE = gcc-auto-profile --all -c 10000000
 
 # This just becomes part of the MAKEINFO definition passed down to
 # sub-makes.  It lets flags be given on the command line while still