Skip to content

Consider lowering overall sampling frequencies#409

Draft
jbachorik wants to merge 1 commit intomainfrom
jb/consider-lowering-overall-sampling-frequencies
Draft

Consider lowering overall sampling frequencies#409
jbachorik wants to merge 1 commit intomainfrom
jb/consider-lowering-overall-sampling-frequencies

Conversation

@jbachorik
Copy link
Collaborator

Consider lowering overall sampling frequencies

Problem Description

We can get away with much longer sampling interval for wallclock, reducing overhead and possibility for clash with the cpu profiler.

Wallclock profile should be fine with the sampling interval in order of 100s of ms

Implement the accompanying regression test:

  • The number of samples collected during a test must correspond to the expected number of samples, based on frequency and the max number of threads we sample on a tick

    • since the number of threads eligible for profiling is determined by a context filter, we can assert only the upper bound on the samples: 1000/period(ms) * 16 (IIRC, 16 is the default number of threads we would pick in one sampler tick)
    • for an exact check, we would need to run in a mode where the context filter is not applied and we are getting full 16 threads sampled each tick

Limitations

The wallclock sampling frequency must be consistent across all wallclock engines (ASGCT, J9, JVMTI)

Acceptance Rules

  • Default wallclock sampling period is 200ms
  • The profiler configuration captured in JFR must show the expected period
  • The number of samples collected during a test must correspond to the expected number of samples, based on frequency and the max number of threads we sample on a tick
    • since the number of threads eligible for profiling is determined by a context filter, we can assert only the upper bound on the samples: 1000/period(ms) * 16 (IIRC, 16 is the default number of threads we would pick in one sampler tick)
    • for an exact check, we would need to run in a mode where the context filter is not applied and we are getting full 16 threads sampled each tick

Auto-generated by ouroboros. Adversarial review: PASS.

@jbachorik jbachorik changed the title [PROF-10883] Consider lowering overall sampling frequencies Consider lowering overall sampling frequencies Mar 5, 2026
@dd-octo-sts
Copy link

dd-octo-sts bot commented Mar 5, 2026

CI Test Results

Run: #22726782213 | Commit: b772106 | Duration: 9m 53s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-03-05 16:24:23 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant