Skip to content

Gate FrameType::isRawPointer on ENCODED_MASK and HotSpot#667

Merged
jbachorik merged 1 commit into
mainfrom
jb/frame-rawpointer-hotspot-gate
Jul 16, 2026
Merged

Gate FrameType::isRawPointer on ENCODED_MASK and HotSpot#667
jbachorik merged 1 commit into
mainfrom
jb/frame-rawpointer-hotspot-gate

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

What does this PR do?:
Requires ENCODED_MASK (bit 20) in addition to the HotSpot check before
FrameType::isRawPointer() trusts RAW_POINTER_MASK (bit 30).

Motivation:
RAW_POINTER_MASK is only ever set by encode(..., rawPointer=true), which
unconditionally also sets ENCODED_MASK. Without the ENCODED_MASK check, a
raw, unencoded ASGCT BCI that incidentally has bit 30 set (observed on
non-HotSpot VMs such as J9) could false-positive as a raw pointer even
though it never went through encode(). This was split out of PR #644 per
review feedback, since it's an independent, unrelated production fix.

Additional Notes:
Split out of #644 (chaos-tooling debugging surfaced this bug incidentally;
the fix has nothing to do with that PR's antagonist/harness work).

How to test the change?:

  • ./gradlew :ddprof-lib:gtestDebug_frame_ut - new/updated FrameType
    regression tests (FalseWhenBit30IsSetOnNonHotspot,
    FalseForRawAsgctBciWithBit30SetButNoEncodedMarker) cover the false-positive
    this closes.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

Unsure? Have a question? Request a review!

🤖 Generated with Claude Code

A raw, unencoded ASGCT BCI can coincidentally have bit 30 set on non-HotSpot
VMs; isRawPointer() must require ENCODED_MASK before trusting bit 30, not
just the HotSpot check.
@jbachorik jbachorik added the AI label Jul 16, 2026
jbachorik added a commit that referenced this pull request Jul 16, 2026
This production behavior change is unrelated to the chaos antagonist and
harness work here; it's now tracked as its own PR so reviewers can
scrutinize the frame-packing logic on its own.
@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #29513986366 | Commit: 3a07d0a | Duration: 14m 19s (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-07-16 16:22:43 UTC

@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit 192c8cb)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/125023590 Commit: 192c8cb09b1147d9f90ecae27c049d3cd4cda7f7

⚠️ Significant outliers

  • 🔴 future-genetic (JDK 21): runtime +3% (2059→2121 ms)
  • 🔴 future-genetic (JDK 25): runtime +3.1% (2012→2074 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10291 ms (21 iters) ✅ 10221 ms (21 iters) ≈ -0.7% (±10.9%) — / —
akka-uct 25 ✅ 8807 ms (24 iters) ✅ 8819 ms (24 iters) ≈ +0.1% (±9.7%) — / —
finagle-chirper 21 ✅ 5957 ms (33 iters) ✅ 6005 ms (33 iters) ≈ +0.8% (±25.2%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5459 ms (36 iters) ✅ 5486 ms (36 iters) ≈ +0.5% (±25.1%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2723 ms (68 iters) ✅ 2758 ms (68 iters) ≈ +1.3% (±2.7%) — / —
fj-kmeans 25 ✅ 2830 ms (66 iters) ✅ 2826 ms (66 iters) ≈ -0.1% (±2.5%) — / —
future-genetic 21 ✅ 2059 ms (90 iters) ✅ 2121 ms (88 iters) 🔴 +3% — / —
future-genetic 25 ✅ 2012 ms (92 iters) ✅ 2074 ms (89 iters) 🔴 +3.1% — / —
naive-bayes 21 ✅ 1245 ms (137 iters) ✅ 1310 ms (132 iters) ≈ +5.2% (±33.1%) — / —
naive-bayes 25 ✅ 1016 ms (168 iters) ✅ 1022 ms (168 iters) ≈ +0.6% (±31.8%) — / —
reactors 21 ✅ 16088 ms (15 iters) ✅ 15935 ms (15 iters) ≈ -1% (±8.1%) — / —
reactors 25 ✅ 18415 ms (15 iters) ✅ 18405 ms (15 iters) ≈ -0.1% (±4.8%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 2 / 5 2031 / 1958 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ ✅ / 2 1996 / 2270 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 9 / 3 8886 / 8396 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 1 / 1 8390 / 8089 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 3 / 1 1292 / 1301 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 1 / ✅ 2996 / 2904 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 2 / 4 2894 / 2875 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 8 / 4 3465 / 3560 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 6 / 5 3482 / 3504 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ 1 / 3 1564 / 1624 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ 3 / 1 1903 / 1839 ✅ / ✅ ✅ / ✅

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 16, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/java-profiler | reliability-chaos-amd64: [profiler, jemalloc, 21.0.3-tem]   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 192c8cb | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reliability & Chaos Results

1 failure(s) detected Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/125023490

❌ chaos: profiler jemalloc amd64 21 0 3 temXchaos
Chaos harness crashed (RC=139)

@jbachorik
jbachorik marked this pull request as ready for review July 16, 2026 16:04
@jbachorik
jbachorik requested a review from a team as a code owner July 16, 2026 16:04
@jbachorik
jbachorik merged commit a1d2ba1 into main Jul 16, 2026
229 of 238 checks passed
@jbachorik
jbachorik deleted the jb/frame-rawpointer-hotspot-gate branch July 16, 2026 16:19
@github-actions github-actions Bot added this to the 1.47.0 milestone Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant