mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 11:11:35 +01:00
readme: move compiler optimization section under Buildroot
This commit is contained in:
40
README.adoc
40
README.adoc
@@ -3629,26 +3629,6 @@ TODO: why doesn't this exist:
|
|||||||
ls /sys/devices/system/cpu/cpu0/cpufreq
|
ls /sys/devices/system/cpu/cpu0/cpufreq
|
||||||
....
|
....
|
||||||
|
|
||||||
==== Enable compiler optimizations
|
|
||||||
|
|
||||||
If you are benchmarking compiled programs instead of hand written assembly, remember that we configure Buildroot to disable optimizations by default with:
|
|
||||||
|
|
||||||
....
|
|
||||||
BR2_OPTIMIZE_0=y
|
|
||||||
....
|
|
||||||
|
|
||||||
to improve the debugging experience.
|
|
||||||
|
|
||||||
You will likely want to change that to:
|
|
||||||
|
|
||||||
....
|
|
||||||
BR2_OPTIMIZE_3=y
|
|
||||||
....
|
|
||||||
|
|
||||||
and do a full rebuild.
|
|
||||||
|
|
||||||
TODO is it possible to compile a single package with optimizations enabled? In any case, this wouldn't be very representative, since calls to an unoptimized libc will also have an impact on performance. Kernel-wise it should be fine though, since the kernel requires `O=2`.
|
|
||||||
|
|
||||||
==== Interesting benchmarks
|
==== Interesting benchmarks
|
||||||
|
|
||||||
Buildroot built-in libraries, mostly under Libraries > Other:
|
Buildroot built-in libraries, mostly under Libraries > Other:
|
||||||
@@ -4542,6 +4522,26 @@ We provide the following mechanisms:
|
|||||||
|
|
||||||
You will then likely want to make those more permanent with: <<retype>>
|
You will then likely want to make those more permanent with: <<retype>>
|
||||||
|
|
||||||
|
==== Enable compiler optimizations
|
||||||
|
|
||||||
|
If you are benchmarking compiled programs instead of hand written assembly, remember that we configure Buildroot to disable optimizations by default with:
|
||||||
|
|
||||||
|
....
|
||||||
|
BR2_OPTIMIZE_0=y
|
||||||
|
....
|
||||||
|
|
||||||
|
to improve the debugging experience.
|
||||||
|
|
||||||
|
You will likely want to change that to:
|
||||||
|
|
||||||
|
....
|
||||||
|
BR2_OPTIMIZE_3=y
|
||||||
|
....
|
||||||
|
|
||||||
|
and do a full rebuild.
|
||||||
|
|
||||||
|
TODO is it possible to compile a single package with optimizations enabled? In any case, this wouldn't be very representative, since calls to an unoptimized libc will also have an impact on performance. Kernel-wise it should be fine though due to: <<kernel-o0>>
|
||||||
|
|
||||||
=== Find Buildroot options with make menuconfig
|
=== Find Buildroot options with make menuconfig
|
||||||
|
|
||||||
`make menuconfig` is a convenient way to find Buildroot configurations:
|
`make menuconfig` is a convenient way to find Buildroot configurations:
|
||||||
|
|||||||
Reference in New Issue
Block a user