View previous topic :: View next topic |
Author |
Message |
gso321 n00b
Joined: 02 Jan 2023 Posts: 15
|
Posted: Wed Mar 15, 2023 1:13 am Post subject: PGO kernel using GCC? |
|
|
Does anyone here have manage to use Profile Guided Optimizations for modern Linux kernel with GCC?
Most websites i seen are either outdated or not specific like coolypf and Yuan's paper. I decided to follow Yuan's approach till i got stuck part at "a shell script is used to collect
profile data files from DebugFS" in phase 2. My original question was going to be "What is the shell script is used to collect profile data files from DebugFS?" but i didn't want to get blamed for taking the XY problem.
To be more specific, i used sys-kernel/gentoo-sources-6.2.5 with experimental use flag. I turn on CONFIG_GCOV_KERNEL and CONFIG_GCOV_PROFILE_ALL, complied the kernel, then reboot. The *.gcda files show up in /sys/kernel/debug/gcov/usr/src/linux. I disable CONFIG_GCOV_KERNEL and CONFIG_GCOV_PROFILE_ALL. Then i edit Code: | KCFLAGS = "fprofile-use -fprofile-correction" | and, after compiling, the problem occurs with Code: | error: ‘/usr/src/linux-6.2.5-gentoo/tools/objtool/weak.gcda’ profile count data file not found |
|
|
Back to top |
|
|
kuhitori n00b
Joined: 24 May 2023 Posts: 1
|
Posted: Wed May 24, 2023 12:00 pm Post subject: |
|
|
gso321, I use 6.1.28 wtih PGO, you need to copy the .gcda files to /usr/src/kernel before compiling.
Please read this for proper use of GCC PGO
Kuhitori |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|