Test case: for verifying main(String[]), run() method of Thread and its subclasses are marked entry frames - #742
Test case: for verifying main(String[]), run() method of Thread and its subclasses are marked entry frames#742zhengyu123 wants to merge 2 commits into
Conversation
…ts subclasses are marked entry frames
Scan-Build Report
Bug Summary
Reports
|
||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new integration-style JFR test to validate that stack traces are (not) marked truncated depending on whether the bottom Java frame is a recognized thread entry point, along with the supporting workload and clarifying stack-frame ordering docs.
Changes:
- Added
EntryFrameTestto assert truncation behavior for known entry points vs non-entry frames under shallowjstackdepth. - Extended
ExternalLauncherwith anentry-framesworkload that burns CPU on three different thread entry paths. - Clarified
JfrStackTrace.frames()Javadoc to document actual frame ordering as written byRecording::writeStackTraces.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| ddprof-test/src/test/java/com/datadoghq/profiler/jfr/EntryFrameTest.java | New test validating truncated semantics by bottom frame across multiple entry points and a negative control. |
| ddprof-test/src/test/java/com/datadoghq/profiler/JfrStackTrace.java | Updates documentation to match actual frame ordering used by the new test logic. |
| ddprof-test/src/test/java/com/datadoghq/profiler/ExternalLauncher.java | Adds an entry-frames workload to generate samples rooted at specific entry frames for the new test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
CI Test ResultsRun: #32147945178 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-08-18 15:06:47 UTC |
|
🔗 Commit SHA: 570311d | Docs | View more details | Give us feedback! |
What does this PR do?:
This PR is a test case for https://datadoghq.atlassian.net/browse/PROF-15782 and https://datadoghq.atlassian.net/browse/PROF-15781
Motivation:
Improve test coverage.
Additional Notes:
How to test the change?:
New test successfully verifies that
void main(String[]),void run()ofThreadand its subclasses are entry frames.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.Unsure? Have a question? Request a review!