* create_gcov tool doesn't currently support dwarf 5 so I made a change in profopt.exp
to pass -gdwarf-4 when compiling the binary to profile.
* I updated the invocation of create_gcov in profopt.exp to pass -gcov_version=2.
I recently made a change to create_gcov to support version 2:
https://github.com/google/autofdo/pull/117 .
* I removed useless -o perf.data from the invocation of gcc-auto-profile in
target-supports.exp.
These changes contribute to fixing PR gcov-profile/71672.
gcc/testsuite/ChangeLog:
* lib/profopt.exp: Pass gdwarf-4 when compiling test to profile; pass -gcov_version=2.
* lib/target-supports.exp: Remove unnecessary -o perf.data passed to gcc-auto-profile.
return
}
set profile_wrapper [profopt-perf-wrapper]
- set profile_option "-g -DFOR_AUTOFDO_TESTING"
+ set profile_option "-gdwarf-4 -DFOR_AUTOFDO_TESTING"
set feedback_option "-fauto-profile -DFOR_AUTOFDO_TESTING -fearly-inlining"
set run_autofdo 1
profopt-execute $src
# convert profile
if { $run_autofdo == 1 } {
set bprefix "afdo."
- set cmd "create_gcov --binary $execname1 --profile=$tmpdir/$base.perf.data -gcov_version=1 --gcov=$tmpdir/$bprefix$base.$ext"
+ set cmd "create_gcov --binary $execname1 --profile=$tmpdir/$base.perf.data -gcov_version=2 --gcov=$tmpdir/$bprefix$base.$ext"
verbose "Running $cmd"
set id [remote_spawn "" $cmd]
if { $id < 0 } {
# 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 -o perf.data -m8 "
+ return "$srcdir/../config/i386/gcc-auto-profile -m8 "
}
# Return true if profiling is supported on the target.