Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Productize VMStructs-based stack walker #177

Merged
merged 8 commits into from
Feb 18, 2025
Merged

Conversation

jbachorik
Copy link
Collaborator

@jbachorik jbachorik commented Feb 5, 2025

What does this PR do?:
A downport of async-profiler/async-profiler#1073

Motivation:
To get the full vmstructs capability - on-par with the upstream.

Additional Notes:
In addition to the upstream changes I increased the test coverage (and refactored the wall-clock tests to better support parametric tests).
There are still some rough edges for combination of Liberica JDK and aarch64 or anything in musl, where blocked threads will get many broken samples. This is still under investigation but it should not hold back this PR.

How to test the change?:
Just running the unit tests - the smoke tests were parameterized to exercise all available stackwalkers.

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-11293

Unsure? Have a question? Request a review!

Copy link

github-actions bot commented Feb 5, 2025

🔧 Report generated by pr-comment-cppcheck

CppCheck Report

Warnings (7)

Style Violations (399)

Copy link

github-actions bot commented Feb 5, 2025

🔧 Report generated by pr-comment-scanbuild

Scan-Build Report

User:runner@fv-az1110-414
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 clean all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Wed Feb 12 10:44:08 2025

Bug Summary

Bug TypeQuantityDisplay?
All Bugs5
Logic error
Dereference of null pointer3
Suspicious operation
Bitwise shift1
Unused code
Dead nested assignment1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Suspicious operationBitwise shiftvmStructs.cppfind89716
Unused codeDead nested assignmentvmStructs.cppcheckNativeBinding10021
Logic errorDereference of null pointersafeAccess.hload3318
Logic errorDereference of null pointersymbols_linux.hElfParser12928
Logic errorDereference of null pointerflightRecorder.cppflush15158

@jbachorik jbachorik merged commit 0c9e478 into main Feb 18, 2025
152 of 162 checks passed
@jbachorik jbachorik deleted the jb/vmstructs_cherry branch February 18, 2025 13:19
@github-actions github-actions bot added this to the 1.21.0 milestone Feb 18, 2025
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.

2 participants