Skip to content

Refactor stackwalker#451

Open
zhengyu123 wants to merge 5 commits intomainfrom
zgu/refactor-stackwalk
Open

Refactor stackwalker#451
zhengyu123 wants to merge 5 commits intomainfrom
zgu/refactor-stackwalk

Conversation

@zhengyu123
Copy link
Copy Markdown
Contributor

@zhengyu123 zhengyu123 commented Apr 2, 2026

What does this PR do?:
This is the second part of code refactoring that builds better abstraction among different JVM implementations. This PR focuses on stack walker components.

  • jvmSupport to encapsulate different JVM specific implementation details (hotspot/HotspotSupport, j9/J9Support and zing/ZingSupport)
  • Moved Hotspot specific stack walkers (walkVMs) into HotspotSupport
  • Moved hotspot specific JIT'ed code cache management to newly created hotspot/jitCodeCache.h/cpp
  • Renamed J9Ext.h/cpp to J9Support.h/cpp to be consistent with others
  • Removed unused files jvm.h/cpp
  • Moved shared frame creation code to new frames.h

Motivation:
This is the second part of efforts to build abstraction among different JVM implements, so that one implementation specific code does not inadvertently pollute unsupported JVMs. This PR focus on stack walker.

Additional Notes:

How to test the change?:

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 review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: PROF-13889

Unsure? Have a question? Request a review!

@dd-octo-sts
Copy link
Copy Markdown

dd-octo-sts bot commented Apr 2, 2026

Scan-Build Report

User:runner@runnervm727z3
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Tue Apr 7 19:33:34 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Stack address stored into global variable1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorStack address stored into global variablehotspotSupport.cppwalkVM72637

@zhengyu123 zhengyu123 changed the title v0 WIP: Refactor stackwalker Apr 2, 2026
@dd-octo-sts
Copy link
Copy Markdown

dd-octo-sts bot commented Apr 2, 2026

CI Test Results

Run: #24100428448 | Commit: 0a67864 | Duration: 23m 4s (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-04-07 19:57:56 UTC

@zhengyu123 zhengyu123 changed the title WIP: Refactor stackwalker Refactor stackwalker Apr 7, 2026
@zhengyu123 zhengyu123 marked this pull request as ready for review April 7, 2026 15:40
@zhengyu123 zhengyu123 requested a review from a team as a code owner April 7, 2026 15:40
@zhengyu123 zhengyu123 requested review from jbachorik and rkennke April 7, 2026 15:40
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