[PR #9] [MERGED] Find allocation hot spots using direct JFR counters #2259

Closed
opened 2026-11-02 15:54:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/9
Author: @ludovic111
Created: 10/3/2026
Status: ✅ Merged
Merged: 10/3/2026
Merged by: @ludovic111

Base: main ← Head: allocation-profiler


📝 Commits (1)

  • 360a30c Stream private JFR profiles and verify allocation counters across platforms

📊 Changes

8 files changed (+372 additions, -1 deletions)

View changed files

📝 .github/workflows/ci.yml (+2 -0)
📝 README.md (+4 -0)
➕ docs/profiling.md (+81 -0)
➕ tests/java/JfrFixture.java (+30 -0)
📝 tests/test_lab.py (+4 -0)
➕ tools/JfrSummary.java (+178 -0)
📝 tools/check_public_tree.py (+5 -1)
➕ tools/test_jfr.py (+68 -0)

📄 Description

JFR allocation samples can misidentify the largest allocation source when their weights are treated as exact totals. Add a JDK-only streaming reader that reports directly observed per-thread counter differences and observation spans separately from stack-sample counts. Report GC pause events separately from concurrent collection cycles, and keep raw profiles under gitignored .local.

Verify real JDK recordings against jfr print --json, including allocation differences, stack-sample counts, GC counts, heap summaries and escaped thread names. The tool was also checked against 85 threads from an existing real-game recording. Add an exact two-file allowance for these original JDK-only Java sources to the publication guard, with neighboring game-source paths still rejected.

Validation: local JFR integration check and 20 Python checks passed; Windows/Linux/Apple Silicon CI all passed. Playable v0.8 runtime binaries and packs are unchanged. Profiling is separate from normal FPS comparisons.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/9 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/3/2026 **Status:** ✅ Merged **Merged:** 10/3/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `allocation-profiler` --- ### 📝 Commits (1) - [`360a30c`](https://github.com/horizon-rust/horizon/commit/360a30cb60ad5236597cc63cec6aed41b884062a) Stream private JFR profiles and verify allocation counters across platforms ### 📊 Changes **8 files changed** (+372 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+2 -0) 📝 `README.md` (+4 -0) ➕ `docs/profiling.md` (+81 -0) ➕ `tests/java/JfrFixture.java` (+30 -0) 📝 `tests/test_lab.py` (+4 -0) ➕ `tools/JfrSummary.java` (+178 -0) 📝 `tools/check_public_tree.py` (+5 -1) ➕ `tools/test_jfr.py` (+68 -0) </details> ### 📄 Description JFR allocation samples can misidentify the largest allocation source when their weights are treated as exact totals. Add a JDK-only streaming reader that reports directly observed per-thread counter differences and observation spans separately from stack-sample counts. Report GC pause events separately from concurrent collection cycles, and keep raw profiles under gitignored `.local`. Verify real JDK recordings against `jfr print --json`, including allocation differences, stack-sample counts, GC counts, heap summaries and escaped thread names. The tool was also checked against 85 threads from an existing real-game recording. Add an exact two-file allowance for these original JDK-only Java sources to the publication guard, with neighboring game-source paths still rejected. Validation: local JFR integration check and 20 Python checks passed; Windows/Linux/Apple Silicon CI all passed. Playable v0.8 runtime binaries and packs are unchanged. Profiling is separate from normal FPS comparisons. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:54:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2259
No description provided.