@@ -171,8 +171,8 @@ captures the Java stack, and a 64-bit key ties each measurement to its stack. |
171 | 171 | 5. [`OffCpuCorrelator`](jonoffcpu-correlator/src/main/java/io/github/jonoffcpu/correlator/OffCpuCorrelator.java) |
172 | 172 | runs offline. It joins each `SignalSample` to its |
173 | 173 | observation by key, weights the Java stack by the kernel-measured duration, |
174 | | - and writes a report, a collapsed-stack file, a stack profile from which |
175 | | - other slices can be rendered later, and a synthetic JFR. |
| 174 | + and writes a report, a collapsed-stack file, and a stack profile from which |
| 175 | + other slices can be rendered later. |
176 | 176 |
|
177 | 177 | ### Why two files? |
178 | 178 |
|
@@ -219,7 +219,6 @@ Analysis, written by the correlator into `--output`: |
219 | 219 | | `jonoffcpu-offcpu-stacks-<reason>.collapsed` | The same, one file per switch-out reason, written only when the capture mixes reasons | |
220 | 220 | | `jonoffcpu-offcpu-profile.pb` | The stack profile: every distinct Java, kernel and user stack once, with interval counts and observed and estimated durations per stack, reason and thread. Any other collapsed slice is rendered from it without re-correlating; see [5. Slice and filter with the stack profile](#5-slice-and-filter-with-the-stack-profile). Defined by [`jonoffcpu-correlator/src/main/proto/jonoffcpu-profile.proto`](jonoffcpu-correlator/src/main/proto/jonoffcpu-profile.proto) | |
221 | 221 | | `jonoffcpu-summary.md`, `jonoffcpu-summary.json` | The analysis digest, for people and AI agents: coverage and losses, where the time went, ranked busy and idle tables, the heaviest transformed stacks, and the command that reproduces each table. The Markdown is rendered from the JSON. `--summary-output false` skips it; a failure to write it is reported in the report and never fails the correlation | |
222 | | -| `jonoffcpu-offcpu-synthetic.jfr` | The same data as duration-quantized `jdk.ExecutionSample` events, for JFR viewers | |
223 | 222 | | `jonoffcpu-classified-records.jsonl` | Every source row and every JFR sample with its classification, for auditing. Written only with `--audit full`; **not written by default** | |
224 | 223 | | `jonoffcpu-matches.jsonl` | Every exact-cookie match with its clipped interval and delivery delay. Written by the default `--audit matches`, and by `--audit full` | |
225 | 224 | | `jonoffcpu-complete.json` | Written last, only after all inputs and outputs validate. Never written when the run narrowed its window (see `--on-limit` below) | |
@@ -244,10 +243,9 @@ correlator invocation. The library API (`OffCpuCorrelator.correlate`) is |
244 | 243 | unaffected and keeps writing both. |
245 | 244 |
|
246 | 245 | When the retained-bytes budget is reached, `--on-limit degrade` (the default) |
247 | | -trades away thinner outputs before it trades away coverage: it coarsens the |
248 | | -synthetic JFR quantum, drops the audit outputs, then thins the source with an |
249 | | -exact inverse-probability reweighting, and only as a last resort narrows the |
250 | | -analysis window. Thinning still analyses the whole requested window — with |
| 246 | +trades away thinner outputs before it trades away coverage: it drops the |
| 247 | +audit outputs, then thins the source with an exact inverse-probability |
| 248 | +reweighting, and only as a last resort narrows the analysis window. Thinning still analyses the whole requested window — with |
251 | 249 | ordinary output names, `jonoffcpu-complete.json`, and exit status 0 — because it |
252 | 250 | is a stated estimator over what was asked for. Narrowing the window instead |
253 | 251 | analyses a shorter window *completely*, and is labelled as visibly incomplete: |
@@ -547,7 +545,7 @@ instead of the latest one. |
547 | 545 | | JAR | What it is | When you use it | |
548 | 546 | | --- | --- | --- | |
549 | 547 | | `jonoffcpu-agent.jar` | The Java agent. Bundles the eBPF collector, the JNI bridge, and the patched async-profiler for Linux x86-64 and arm64, and drives the whole capture lifecycle. | Attached to the JVM being profiled with `-javaagent`. | |
550 | | -| `jonoffcpu-correlator.jar` | The offline correlator CLI. Joins the combined JFR with the correlation stream, verifies integrity, and writes derived outputs such as collapsed stacks and a synthetic JFR. | Run after the capture, on any machine with Java 21+. | |
| 548 | +| `jonoffcpu-correlator.jar` | The offline correlator CLI. Joins the combined JFR with the correlation stream, verifies integrity, and writes derived outputs such as collapsed stacks and the stack profile. | Run after the capture, on any machine with Java 21+. | |
551 | 549 | | `jfr-converter.jar` | async-profiler's [`jfrconv`](https://github.com/async-profiler/async-profiler/blob/master/docs/ConverterUsage.md), built from the pinned fork so that it understands the `profiler.Signal*` events and accepts `--units` to label the flame graph in microseconds. | Renders the correlator's collapsed stacks as an off-CPU flame graph whose widths are microseconds of off-CPU time. | |
552 | 550 |
|
553 | 551 | The examples below assume all three JARs are in the current directory. |
@@ -602,8 +600,7 @@ lower probability. |
602 | 600 |
|
603 | 601 | The output directory then holds `jonoffcpu-report.json`, |
604 | 602 | `jonoffcpu-offcpu-stacks.collapsed`, `jonoffcpu-offcpu-profile.pb`, the digest |
605 | | -`jonoffcpu-summary.md`, `jonoffcpu-offcpu-synthetic.jfr`, the row-level audit |
606 | | -files, and `jonoffcpu-complete.json` as the last file written; |
| 603 | +`jonoffcpu-summary.md`, the row-level audit files, and `jonoffcpu-complete.json` as the last file written; |
607 | 604 | [Files jonoffcpu writes](#files-jonoffcpu-writes) describes each one. |
608 | 605 |
|
609 | 606 | ### 4. Render the flame graph |
@@ -625,9 +622,6 @@ which also matches frames the graph does not show. Any tool that reads the colla |
625 | 622 | format, such as [`flamegraph.pl`](https://github.com/brendangregg/FlameGraph) |
626 | 623 | with `--countname=µs`, works on the same file. |
627 | 624 |
|
628 | | -The synthetic JFR opens directly in |
629 | | -[JDK Mission Control](https://jdk.java.net/jmc/) and other JFR viewers. |
630 | | - |
631 | 625 | ### Other views of the same recording |
632 | 626 |
|
633 | 627 | The agent's JFR also holds whatever `asyncProfilerOptions` recorded, and the |
@@ -881,7 +875,7 @@ exact command that reproduces each one, so the agent can drill down with |
881 | 875 | `top --format json` or `stacks` instead of reading raw stacks. For custom |
882 | 876 | questions, `export --format jsonl` gives one row per profile entry, frames as |
883 | 877 | arrays (see [Analyzing with SQL](#analyzing-with-sql)). Do not hand an agent |
884 | | -the capture stream, the JFR or the synthetic JFR: they are large, binary, and |
| 878 | +the capture stream or the JFR: they are large, binary, and |
885 | 879 | the correlator has already extracted what they contain. When comparing runs, |
886 | 880 | give it `top --baseline` output, which normalizes per unit of work and warns |
887 | 881 | when the runs are not comparable. |
@@ -1145,11 +1139,10 @@ The generated help is the reference: `java -jar jonoffcpu-correlator.jar help |
1145 | 1139 | | `--from-ns`, `--to-ns` | Clip matched intervals to a window in the source monotonic clock. | |
1146 | 1140 | | `--estimate-population true` | Add a `populationEstimate` to the report: the total off-CPU time of every eligible interval, reweighted by each row's admission threshold. See [OFFLINE.md](jonoffcpu-correlator/OFFLINE.md). | |
1147 | 1141 | | `--max-accounted-loss <f>` | Largest fraction of selected intervals that counted sequence contention may drop before the population estimate is refused (`accounted-loss-above-limit`). Below it the estimate is scaled for the loss and reports it in `accountedLoss`. Default `0.01`. | |
1148 | | -| `--format collapsed\|jfr` | Produce only one of the two derived outputs. | |
1149 | 1142 | | `--partial-jfr true` | Accept a JFR that another tool has cut. Source rows without a sample in the cut JFR are reported as expected omissions instead of loss. | |
1150 | | -| `--partial true` | Inspect an interrupted capture. Writes `INCOMPLETE-jonoffcpu-*` files and a `jonoffcpu-partial.json` marker, exits with status 2, and never writes `jonoffcpu-complete.json` or the synthetic JFR. | |
| 1143 | +| `--partial true` | Inspect an interrupted capture. Writes `INCOMPLETE-jonoffcpu-*` files and a `jonoffcpu-partial.json` marker, exits with status 2, and never writes `jonoffcpu-complete.json`. | |
1151 | 1144 | | `--audit full\|matches\|none` | How much per-row audit output to write. Default `matches`: `jonoffcpu-matches.jsonl` but not `jonoffcpu-classified-records.jsonl`. | |
1152 | | -| `--on-limit degrade\|fail\|truncate` | What to do when the retained-bytes budget is reached. Default `degrade`: coarsen the synthetic quantum, drop audit outputs, thin and reweight, narrow the window — reporting each step. `fail` refuses immediately, like earlier releases. `truncate` skips thinning and narrows the window directly. | |
| 1145 | +| `--on-limit degrade\|fail\|truncate` | What to do when the retained-bytes budget is reached. Default `degrade`: drop audit outputs, thin and reweight, narrow the window — reporting each step. `fail` refuses immediately, like earlier releases. `truncate` skips thinning and narrows the window directly. | |
1153 | 1146 | | `--thinning <q>` | Keep each recorded interval with probability `q` and reweight by `1/q`. Deterministic in the cookie, so the result does not depend on order. Default: chosen automatically, and `1` whenever the input fits. | |
1154 | 1147 | | `--thinning-seed <n>` | Changes the deterministic draw `--thinning` uses. | |
1155 | 1148 | | `--collapsed-reason-frame auto\|always\|never` | Whether each line of `jonoffcpu-offcpu-stacks.collapsed` starts with its `[offcpu: <reason>]` frame. Default `auto`: only when the capture mixes reasons. | |
|