RFC pgo: Add PGO support for module profile data
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | pgo: Expose module sections for clang PGO instumentation.include/ kernel/ kernel/ | +28 | 0 replies | |
| 2/5 | pgo: Make serializing functions to take prf_objectkernel/ kernel/ kernel/ | +142 | 0 replies | |
| 3/5 | pgo: Wire up the new more generic code for moduleskernel/ kernel/ kernel/ | +60 | 2 replies | |
| 4/5 | pgo: Add module notifier machinerykernel/ kernel/ | +122 | 2 replies | |
| 5/5 | pgo: Cleanup code in pgo/fs.ckernel/ | +23 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/5] pgo: Add PGO support for module profile data
This patch series intends to extend the current Clang PGO code to support profile data from modules. Note that current PGO can and *does* instrument all kernel code, including modules, but this profile data is inaccessible.
This patch series adds pgo/<module>.profraw files from what per loaded module profile data can be read.
The final profile can be generated by merging all these profile files:
llvm-profdata merge --output=vmlinux.profdata vmlinux.profraw ... and then building the optimized kernel.
This v2 patch series is still an bit of RFC so I'd like feedback how to do things better still.
The patches itself are based on Kees/for-next/clang/features tree where I have two of my bug fix patches already in. :-)
I have done some initial testing:
* Booted the instrumented kernel on qemu *and* bare hardware.
* Module un/loading via test_module in QEMU.
* Built optimized kernel using the new profile data.
Jarmo Tiitto (5):
pgo: Expose module sections for clang PGO instumentation.
pgo: Make serializing functions to take prf_object
pgo: Wire up the new more generic code for modules
pgo: Add module notifier machinery
pgo: Cleanup code in pgo/fs.c
include/linux/module.h | 15 +++ kernel/Makefile | 6 + kernel/module.c | 7 ++ kernel/pgo/fs.c | 241 ++++++++++++++++++++++++++++++++++------ kernel/pgo/instrument.c | 57 +++++++--- kernel/pgo/pgo.h | 85 ++++++++++---- 6 files changed, 342 insertions(+), 69 deletions(-)
base-commit: 0039303120c0065f3952698597e0c9916b76ebd5
Signature · 1 line
2.32.0