firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

Add PGO Applicability Feature (Prototype)

Open valeriepieger opened this issue 6 months ago • 1 comments

Changes

Add initial PGO prototype per Feature Request #3456

  • tools/devtool: add pgo_build subcommand with four parts:
    • instrument (build with -Cprofile-generate)
    • profile (redirects to reference the pgo-getting-started guide)
    • merge (invoke llvm-profdata merge)
    • optimize (rebuild with -Cprofile-use)
  • docs: add docs/pgo-getting-started.md, a step-by-step PGO guide
  • .gitignore: ignore generated PGO files (rootfs.ext4, vmlinux, .profraw)

Reason

To provide Firecracker contributors with a prototype to measure and apply Profile-Guided Optimization (PGO). These changes combine the common PGO workflow into devtool, document it with the pgo-getting-started guide, and include a community benchmark table so others can reproduce and share results.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check CONTRIBUTING.md.

PR Checklist

  • [x] I have read and understand CONTRIBUTING.md.
  • [x] I have run tools/devtool checkstyle to verify that the PR passes the automated style checks.
  • [x] I have described what is done in these changes, why they are needed, and how they are solving the problem in a clear and encompassing way.
  • [x] I have updated any relevant documentation (both in code and in the docs) in the PR.
  • [ ] I have mentioned all user-facing changes in CHANGELOG.md.
  • [ ] If a specific issue led to this PR, this PR closes the issue.
  • [ ] When making API changes, I have followed the Runbook for Firecracker API changes.
  • [x] I have tested all new and changed functionalities in unit tests and/or integration tests.
  • [ ] I have linked an issue to every new TODO.

  • [x] This functionality cannot be added in rust-vmm.

valeriepieger avatar May 06 '25 20:05 valeriepieger