[jdk17u-dev] RFR: 8288663: JFR: Disabling the JfrThreadSampler commits only a partially disabled state

Dmitry Chuyko dchuyko at openjdk.org
Fri Nov 24 14:29:21 UTC 2023


On 17u JFR sometimes continues to sample threads after recordings are closed. In particular that happens on Linux aarch64 when JFR streaming is used and only jdk.ExecutionSample event is enabled. Symptoms:


[76.403s][debug][jfr      ] Recording "Recording Stream: 2023-11-21T14:57:07.651509569Z" (2) added chunk /tmp/2023_11_21_14_56_06_9044/2023_11_21_14_57_07.jfr, current size=4397790
[76.404s][trace][jfr      ] Disenrolling thread sampler
[76.404s][trace][jfr      ] Enrolling thread sampler
[76.404s][trace][jfr      ] Updated thread sampler for java: 1  ms, native 0 ms


This fix cures that enrolling after disenrolling. I'm not sure if related JDK-8295274 should be backported as well.

The patch was mostly applied cleanly but few hunks were replicated by hand without changes in their code.

Testing: tier1, tier2, jdk_jfr, gc/stress/jfr on (linux-aarch64 fastdebug).

-------------

Commit messages:
 - Backport a7df5a40639a4d3138616c9fc1b144381240d2e5

Changes: https://git.openjdk.org/jdk17u-dev/pull/1986/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=1986&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8288663
  Stats: 121 lines in 7 files changed: 47 ins; 18 del; 56 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/1986.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/1986/head:pull/1986

PR: https://git.openjdk.org/jdk17u-dev/pull/1986


More information about the jdk-updates-dev mailing list