-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement strand dump tool for virtual threads
- Loading branch information
1 parent
1fe53c1
commit 1f4f7fe
Showing
5 changed files
with
298 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 44 additions & 31 deletions
75
...est/src/test/resources/troubleshoot/strandDump/testOutputs/balProgram1StrandDumpRegEx.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,56 @@ | ||
Ballerina Strand Dump \[\d*/\d*/\d* \d*:\d*:\d*\] | ||
=========================================== | ||
=============================================================== | ||
|
||
Total strand group count \t:\t5 | ||
Total strand count \t:\t9 | ||
Active strand group count\t:\t3 | ||
Active strand count \t:\t9 | ||
Total Strand count \t\t\t:\t9 | ||
|
||
group \d* \[QUEUED\]: \[7\] | ||
\tstrand \d* "main" \[\$anon...0:main\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \t\$anon...0.0.0:bar\(balProgram1.bal:86\) | ||
\t\t \t\$anon...0.0.0:foo\(balProgram1.bal:27\) | ||
\t\t \t\$anon...0.0.0:main\(balProgram1.bal:23\) | ||
Total Isolated Worker count \t\t:\t2 | ||
|
||
\tstrand \d* "w3" \[\$anon...0:bar\]\[\d*\] \[BLOCKED ON WORKER MESSAGE SEND\]: | ||
\t\tat\t\$anon...0.0.0:\$lambda\$_2\(balProgram1.bal:53\) | ||
Total Non Isolated Worker count \t\t:\t7 | ||
|
||
\tstrand \d* "w4" \[\$anon...0:bar\]\[\d*\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \t\$anon...0.0.0:\$lambda\$_3\(balProgram1.bal:58\) | ||
================================================================ | ||
|
||
\tstrand \d* "w5" \[\$anon...0:bar\]\[\d*\] \[BLOCKED ON WORKER MESSAGE FLUSH\]: | ||
\t\tat\t\$anon...0.0.0:\$lambda\$_4\(balProgram1.bal:65\) | ||
Isolated Workers: | ||
|
||
\tstrand \d* "w6" \[\$anon...0:bar\]\[\d*\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \t\$anon...0.0.0:\$lambda\$_5\(balProgram1.bal:70\) | ||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_0\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_0\$lambda0\$\(balProgram1.bal:\d*\) | ||
|
||
\tstrand \d* \[\$anon...0:bar\]\[\d*\] \[BLOCKED ON WORKER MESSAGE RECEIVE\]: | ||
\t\tat\t\$anon...0.0.0:\$lambda\$_6\(balProgram1.bal:76\) | ||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_1\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_1\$lambda1\$\(balProgram1.bal:\d*\) | ||
|
||
\tstrand \d* "w8" \[\$anon...0:bar\]\[\d*\] \[WAITING\]: | ||
\t\tat\t\$anon...0.0.0:\$lambda\$_7\(balProgram1.bal:82\) | ||
Non Isolated Workers: | ||
|
||
group \d* \[RUNNABLE\]: \[1\] | ||
\tstrand \d* "w1" \[\$anon...0:bar\]\[\d*\] \[RUNNABLE\] | ||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_2\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_2\$lambda2\$\(balProgram1.bal:\d*\) | ||
|
||
group \d* \[QUEUED\]: \[1\] | ||
\tstrand \d* "w2" \[\$anon...0:bar\]\[\d*\] \[WAITING FOR LOCK\]: | ||
\t\tat\t\$anon...0.0.0:\$lambda\$_1\(balProgram1.bal:46\) | ||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t balProgram1.\$lambda\$_3\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_3\$lambda3\$\(balProgram1.bal:\d*\) | ||
|
||
=========================================== | ||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_4\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_4\$lambda4\$\(balProgram1.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t balProgram1.\$lambda\$_5\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_5\$lambda5\$\(balProgram1.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t balProgram1.bar\(balProgram1.bal:\d*\) | ||
\t\t balProgram1.foo\(balProgram1.bal:\d*\) | ||
\t\t balProgram1.main\(balProgram1.bal:\d*\) | ||
\t\t \$_init.\$moduleExecute\(.\) | ||
\t\t \$_init.\$lambda\$\$moduleExecute\$\(.\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_6\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_6\$lambda6\$\(balProgram1.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat balProgram1.\$lambda\$_7\(balProgram1.bal:\d*\) | ||
\t\t lambdas.\$_generated1balProgram1.\$lambda\$_7\$lambda7\$\(balProgram1.bal:\d*\) |
117 changes: 65 additions & 52 deletions
117
...on-test/src/test/resources/troubleshoot/strandDump/testOutputs/balTestStrandDumpRegEx.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,66 @@ | ||
Ballerina Strand Dump \[\d*/\d*/\d* \d*:\d*:\d*\] | ||
=========================================== | ||
|
||
Total strand group count \t:\t3 | ||
Total strand count \t:\t8 | ||
Active strand group count\t:\t1 | ||
Active strand count \t:\t8 | ||
|
||
group \d* \[QUEUED\]: \[8\] | ||
\tstrand \d* "main" \[testOrg.testPackageWithModules.0:main\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.function.\d*.\d*.\d*:call\(function.bal:\d*\) | ||
\t\t \tballerina.test.\d*.\d*.\d*:executeTestFunction\(serialExecuter.bal:\d*\) | ||
\t\t \tballerina.test.\d*.\d*.\d*:executeNonDataDrivenTest\(serialExecuter.bal:\d*\) | ||
\t\t \tballerina.test.\d*.\d*.\d*:executeTest\(serialExecuter.bal:\d*\) | ||
\t\t \tballerina.test.\d*.\d*.\d*:executeTests\(execute.bal:\d*\) | ||
\t\t \tballerina.test.\d*.\d*.\d*:startSuite\(execute.bal:\d*\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:__execute__\(tests/test_execute-generated_1.bal:\d*\) | ||
\t\t \t\$moduleExecute | ||
|
||
\tstrand \d* \[ballerina.lang.function.\d*.\d*.\d*:call\]\[\d*\] \[WAITING\]: | ||
\t\tat\ttestOrg.testPackageWithModules.0.1.0:bar\(main.bal:52\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:foo\(main.bal:37\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:foobar\(main.bal:33\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:testStrandDump\(tests/main_test.bal:35\) | ||
|
||
\tstrand \d* "w11" \[testOrg.testPackageWithModules.0:testStrandDump\]\[\d*\] \[WAITING\]: | ||
\t\tat\ttestOrg.testPackageWithModules.anotherutils.0.1.0:func3\(anotherutils.bal:46\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:func2\(anotherutils.bal:29\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:func1\(anotherutils.bal:25\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:entryfunc\(anotherutils.bal:21\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:\$lambda\$_10\(tests/main_test.bal:26\) | ||
|
||
\tstrand \d* "w22" \[testOrg.testPackageWithModules.0:testStrandDump\]\[\d*\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:\$lambda\$_11\(tests/main_test.bal:31\) | ||
|
||
\tstrand \d* "w1" \[testOrg.testPackageWithModules.0:bar\]\[\d*\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:sleep_and_wait_nested\(main.bal:61\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:sleep_and_wait\(main.bal:56\) | ||
\t\t \ttestOrg.testPackageWithModules.0.1.0:\$lambda\$_0\(main.bal:42\) | ||
|
||
\tstrand \d* "w2" \[testOrg.testPackageWithModules.0:bar\]\[\d*\] \[BLOCKED ON WORKER MESSAGE RECEIVE\]: | ||
\t\tat\ttestOrg.testPackageWithModules.0.1.0:\$lambda\$_1\(main.bal:48\) | ||
|
||
\tstrand \d* "w1" \[testOrg.testPackageWithModules.anotherutils.0:func3\]\[\d*\] \[BLOCKED\]: | ||
\t\tat\tballerina.lang.runtime.\d*.\d*.\d*:sleep\(runtime.bal:\d*\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:sleep_and_wait_nested\(anotherutils.bal:55\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:sleep_and_wait\(anotherutils.bal:50\) | ||
\t\t \ttestOrg.testPackageWithModules.anotherutils.0.1.0:\$lambda\$_0\(anotherutils.bal:34\) | ||
|
||
\tstrand \d* "w2" \[testOrg.testPackageWithModules.anotherutils.0:func3\]\[\d*\] \[BLOCKED ON WORKER MESSAGE RECEIVE\]: | ||
\t\tat\ttestOrg.testPackageWithModules.anotherutils.0.1.0:\$lambda\$_1\(anotherutils.bal:42\) | ||
=============================================================== | ||
|
||
Total Strand count \t\t\t:\t7 | ||
|
||
Total Isolated Worker count \t\t:\t0 | ||
|
||
Total Non Isolated Worker count \t\t:\t7 | ||
|
||
================================================================ | ||
|
||
Isolated Workers: | ||
|
||
Non Isolated Workers: | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat testOrg.testPackageWithModules.0.main.bar\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.main.foo\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.main.foobar\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.tests.main_test.testStrandDump\(tests/main_test.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.lambdas.\$_generated1tests.test_execute-generated_1.testStrandDump\$lambda0\$\(tests/test_execute-generated_1.bal:\d*\) | ||
\t\t ballerina.lang&0046function.0.function.call\(function.bal:\d*\) | ||
\t\t ballerina.test.0.serialExecuter.executeTestFunction\(serialExecuter.bal:\d*\) | ||
\t\t ballerina.test.0.serialExecuter.executeNonDataDrivenTest\(serialExecuter.bal:\d*\) | ||
\t\t ballerina.test.0.serialExecuter.executeTest\(serialExecuter.bal:\d*\) | ||
\t\t ballerina.test.0.execute.executeTests\(execute.bal:\d*\) | ||
\t\t ballerina.test.0.execute.startSuite\(execute.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.tests.test_execute-generated_1.__execute__\(tests/test_execute-generated_1.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.\$_init.\$moduleExecute\(testPackageWithModules\) | ||
\t\t testOrg.testPackageWithModules\$test.0.\$_init.\$lambda\$\$moduleExecute\$\(testPackageWithModules\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.main.sleep_and_wait_nested\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.main.sleep_and_wait\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.main.\$lambda\$_0\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.lambdas.\$_generated1main.\$lambda\$_0\$lambda3\$\(main.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat testOrg.testPackageWithModules.0.main.\$lambda\$_1\(main.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules.0.lambdas.\$_generated1main.\$lambda\$_1\$lambda4\$\(main.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.sleep_and_wait_nested\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.sleep_and_wait\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.\$lambda\$_0\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.lambdas.\$_generated1anotherutils.\$lambda\$_0\$lambda0\$\(anotherutils.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.\$lambda\$_1\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.lambdas.\$_generated1anotherutils.\$lambda\$_1\$lambda1\$\(anotherutils.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.func3\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.func2\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.func1\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules&0046anotherutils.0.anotherutils.entryfunc\(anotherutils.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.tests.main_test.\$lambda\$_10\(tests/main_test.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.lambdas.\$_generated2tests.main_test.\$lambda\$_10\$lambda0\$\(tests/main_test.bal:\d*\) | ||
|
||
\tStrand #\d* \"\d*\" : | ||
\t\tat ballerina.lang&0046runtime.0.runtime.sleep\(runtime.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.tests.main_test.\$lambda\$_11\(tests/main_test.bal:\d*\) | ||
\t\t testOrg.testPackageWithModules\$test.0.lambdas.\$_generated2tests.main_test.\$lambda\$_11\$lambda1\$\(tests/main_test.bal:\d*\) | ||
|
Oops, something went wrong.