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

Implement new stand dump tool for virtual threads #43369

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

ravinperera00
Copy link
Contributor

@ravinperera00 ravinperera00 commented Sep 9, 2024

Purpose

The current strand dump tool uses the information provided by the Strand class to generate the information needed for the dump. However, with the switch to virtual threads, a new method has to be developed to obtain the relevant information.

Fixes #43292
Contributes to #43351

Approach

Design and details of the new implementation are discussed here (#42879)
The design of the previous strand dump tool can be found here (#36284)

The format of the previous strand dump tool has been preserved as much as possible but information related to strand groups has been removed as it is deemed unnecessary with the move to Java 21.

Remarks

Providing the state of the strand (Ex: RUNNABLE, WAITING) is yet to be implemented as the state of a virtual thread is not provided in the thread dump file. Separate logic has to be included within the tool to analyse the stack traces to find ways of predicting the state of each strand.
The PR also changes the Strand Dump tests appropriately to match the new design.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@ravinperera00 ravinperera00 marked this pull request as ready for review September 18, 2024 09:24
Copy link
Contributor

@warunalakshitha warunalakshitha left a comment

Choose a reason for hiding this comment

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

LGTM

@warunalakshitha warunalakshitha merged commit 1e7f80a into ballerina-platform:java21 Sep 20, 2024
4 of 16 checks passed
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.

2 participants