Skip to content

ruby: widen anonymous JIT fallback - #46

Closed
dalehamel wants to merge 0 commit into
mainfrom
dale/ruby-jit-wide-anon-exec-fallback
Closed

dalehamel wants to merge 0 commit into
mainfrom
dale/ruby-jit-wide-anon-exec-fallback

Conversation

@dalehamel

@dalehamel dalehamel commented Apr 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacks on PR #37 (ruby-jit-upstream-prep) after rebasing that branch to upstream main 2e28aeaeb3a94b018e5db131550a78627bd056cf.

Changes in this PR:

  • For unlabeled Ruby JIT mappings, fallback spans from the first anonymous executable mapping through the last anonymous executable mapping, while preserving the existing contiguous anonymous tail behavior for YJIT reservations.
  • <unknown jit code> is emitted on the first Ruby unwinder entry for the trace, not on later Ruby unwinder entries after native resume.
  • Regenerated amd64/arm64 BPF blobs for the placement change on the rebased stack.

Current head: dfe0d11d5929d8b5c1d9de473d9216033861cac6

Validation

  • GitHub checks passed on dfe0d11d5929d8b5c1d9de473d9216033861cac6.
  • Local checks on recomposed PR Shopify omnibus refresh: JIT frames + skip_native_resume #45:
    • env -u GOROOT -u GOTOOLCHAIN go test ./interpreter/ruby ./process
    • docker run --rm -v "$PWD":/work -w /work 07698be12d6c 'make -C support/ebpf lint'

Production QA through PR #45

Validated through PR #45 + profiles-processor PR open-telemetry#1204 with prophiler image tag 20e828d6dfca4c20273f66eabfa7d448fb8e786c.

App Variant Observe ERROR_4012 <unknown jit code>
Core Control https://observe.shopify.io/a/investigate-profiles/id/3080cd14d350a115 0.24% self / 0.38% total not rendered; other 90.55% self
Core Treatment https://observe.shopify.io/a/investigate-profiles/id/abaee6516bfb1307 0.50% self / 0.71% total 12.66% self / 60.37% total
SFR Control https://observe.shopify.io/a/investigate-profiles/id/062c919e808c28a9 0.21% self / 0.38% total 9.52% self / 86.32% total
SFR Treatment https://observe.shopify.io/a/investigate-profiles/id/77cb22fe728e085d 0.20% self / 0.39% total 9.54% self / 85.46% total

All Kubernetes jobs completed. ERROR_4012: native_no_pid_page_mapping remains low across Core/SFR.

@dalehamel
dalehamel force-pushed the ruby-jit-upstream-prep branch from 0c4c62b to 8979004 Compare May 6, 2026 13:42
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from 0cdf128 to dfe0d11 Compare May 6, 2026 13:42
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Jun 4, 2026
@github-actions

Copy link
Copy Markdown

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions Bot closed this Jun 18, 2026
@dalehamel dalehamel reopened this Jun 24, 2026
@dalehamel
dalehamel force-pushed the ruby-jit-upstream-prep branch from 8979004 to 03225c9 Compare June 24, 2026 13:18
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch 2 times, most recently from 6177e14 to 6cb9bad Compare June 24, 2026 13:38
@dalehamel dalehamel removed the Stale label Jun 24, 2026
@dalehamel
dalehamel marked this pull request as ready for review June 24, 2026 17:39
@dalehamel
dalehamel changed the base branch from ruby-jit-upstream-prep to main June 24, 2026 17:50
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from 6cb9bad to bc0ef94 Compare June 29, 2026 20:14
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from 47fb818 to 0810d58 Compare June 30, 2026 15:44
dalehamel added a commit that referenced this pull request Jun 30, 2026
…se (#46)

Rebuilt on the current #46 head so the ancestry is clean (#46 -> #48).
Resolved metric-ID space (native errors 295-297, luajit 298-299),
PerCPURecord (usesAnonymousMappings + initialUnwinder), tracemgmt init/collect,
regenerated support/types.go, rebuilt BPF blobs, go mod tidy.
dalehamel added a commit that referenced this pull request Jun 30, 2026
…se (#46)

Rebuilt on the current #46 head so the ancestry is clean (#46 -> #48).
Resolved metric-ID space (native errors 295-297, luajit 298-299),
PerCPURecord (usesAnonymousMappings + initialUnwinder), tracemgmt init/collect,
regenerated support/types.go, rebuilt BPF blobs, go mod tidy.
dalehamel added a commit that referenced this pull request Jun 30, 2026
…se (#46)

Rebuilt on the current #46 head so the ancestry is clean (#46 -> #48).

Adapts parca open-telemetry#1236 to interface changes that landed in main after it was
written:
- interpreterconfig.Config port (open-telemetry#1436): luajit.Config + GetLoader + wiring
- EbpfHandler.CoredumpTest: stub on the processinfo test mock
- Instance.UsesAnonymousMappings (open-telemetry#1473): LuaJIT opts in so the now-gated
  per-PID anonymous-mapping sync still covers its JIT mcode; otherwise the
  native unwinder reports ERR_NATIVE_UNSUPPORTED_MAPPING (4018) on every
  JIT-trace sample instead of handing off to the LuaJIT unwinder.

Conflict resolution: metric-ID space (native 295-297, luajit 298-299),
PerCPURecord (usesAnonymousMappings + initialUnwinder), tracemgmt init/collect,
regenerated support/types.go, rebuilt BPF blobs, go mod tidy.
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch 2 times, most recently from 4ce17ff to 0e082e4 Compare July 19, 2026 22:35
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from 0e082e4 to 431201f Compare July 29, 2026 18:17
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from 431201f to dbe441e Compare July 29, 2026 18:32
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch 2 times, most recently from 40c28c9 to c1a78fd Compare August 11, 2026 13:31
@dalehamel
dalehamel changed the base branch from main to yjit-wip August 11, 2026 14:10
@dalehamel
dalehamel changed the base branch from yjit-wip to main August 11, 2026 14:10
@dalehamel dalehamel closed this Aug 13, 2026
@dalehamel
dalehamel force-pushed the dale/ruby-jit-wide-anon-exec-fallback branch from c1a78fd to e52dd66 Compare August 13, 2026 22:41
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