Skip to content

Conversation

@zhengyu123
Copy link
Contributor

@zhengyu123 zhengyu123 commented Jan 15, 2026

What does this PR do?:
Use platform default cstack value for running tests. Also improve stack walk test coverage for some of tests.

Motivation:
Improve test coverage.

Additional Notes:
NativeLibrariesTest is an exception, default value fails.

How to test the change?:

  • Tests should pass

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

Unsure? Have a question? Request a review!

@zhengyu123 zhengyu123 marked this pull request as ready for review January 16, 2026 01:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes hardcoded cstack=fp configuration from test profiler commands and introduces parameterized testing to improve stack walk test coverage across different cstack modes (vm, fp, dwarf).

Changes:

  • Removed explicit cstack=fp from profiler command strings to use platform defaults
  • Extended JFR dump tests to run with multiple cstack modes via @TestTemplate and @ValueSource
  • Migrated tests from @RetryingTest to @RetryTest and introduced CStackAwareAbstractProfilerTest base class

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
MemleakProfilerTest.java Removed cstack=fp to use platform default
GCGenerationsTest.java Removed cstack=fp to use platform default
WallclockDumpSmokeTest.java Added parameterized testing for cstack modes and updated to new test infrastructure
ObjectSampleDumpSmokeTest.java Added parameterized testing for cstack modes and updated to new test infrastructure
JfrDumpTest.java Extended CStackAwareAbstractProfilerTest with cstack parameter support
CpuDumpSmokeTest.java Added parameterized testing for cstack modes, removed hardcoded cstack=fp
ClassGCTest.java Removed cstack=fp to use platform default

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "fp", "dwarf"})
public void test(@CStack String cstack) throws Exception {
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test method parameter cstack is annotated with @CStack but never used within the method body. If the cstack configuration is meant to influence test behavior, it should be passed to the test setup or profiler configuration.

Copilot uses AI. Check for mistakes.
@zhengyu123 zhengyu123 changed the title v0 Use default cstack for tests and improve stackwalk test coverage Jan 16, 2026
@Timeout(value = 60)
public void test() throws Exception {
@TestTemplate
@ValueSource(strings = {"vm", "fp", "dwarf"})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder - do we also want to include 'vmx' for completeness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought vm = vmx now, no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, kind of ... in our profiler we are not doing the 'features', so vmx is still valid specifier and translates to 'vm' + the extended feature ...

@zhengyu123 zhengyu123 merged commit 5b0334a into main Jan 16, 2026
185 of 186 checks passed
@zhengyu123 zhengyu123 deleted the zgu/test_cstack_default branch January 16, 2026 15:36
@github-actions github-actions bot added this to the 1.35.0 milestone Jan 16, 2026
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.

3 participants