]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Collect both user and kernel events for autofdo tests and autoprofiledbootstrap
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 30 Jun 2023 02:38:41 +0000 (19:38 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Fri, 7 Jul 2023 20:06:28 +0000 (13:06 -0700)
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

gcc/testsuite/ChangeLog:

* lib/target-supports.exp: Collect both kernel and user events for autofdo

Makefile.in
Makefile.tpl
gcc/testsuite/lib/target-supports.exp

index f19a9db621e3b5182145968f026c07aacaa90cc5..04307ca561bedc7b33d0e01b974957e2c61cc1b7 100644 (file)
@@ -404,7 +404,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
index 3a5b7ed3c9209b0c1fddba2f4a4f789d697ed937..d0fe7e2fb778b3c3fa2cc8742e06cf1f78fdc5f2 100644 (file)
@@ -407,7 +407,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
index 4d04df2a70991e00ae69c68438e54728cb499a29..b16853d76df9d8af951c8f0dfd05ca4b1e32c143 100644 (file)
@@ -704,7 +704,7 @@ proc check_effective_target_keeps_null_pointer_checks { } {
 # this allows parallelism of 16 and higher of parallel gcc-auto-profile
 proc profopt-perf-wrapper { } {
     global srcdir
-    return "$srcdir/../config/i386/gcc-auto-profile -m8 "
+    return "$srcdir/../config/i386/gcc-auto-profile --all -m8 "
 }
 
 # Return true if profiling is supported on the target.