-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[wasm] [debugger] First version of multithreaded debugging #74820
[wasm] [debugger] First version of multithreaded debugging #74820
Conversation
Tagging subscribers to this area: @thaystg Issue Detailscb1fd258-20f9-4648-89eb-78ddbd59a7d9.mp4
|
…aystg/runtime into thays_support_multithreaded_debugging
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
The Wasm.Build.Tests failures are #74944 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C code and TS code lgtm.
I'd like someone more familiar with the debug proxy to review that part
needs to merge main |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm-non-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm-non-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
@radical @lambdageek Could you please do a final review so I can merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C and TypeScript lgtm. I tried to follow BrowserDebugProxy, but I'm not sure if I completely understand it
# | ||
# Evaluate paths | ||
# | ||
- template: /eng/pipelines/common/evaluate-default-paths.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now. But in a follow up we should change this to use these from runtime-extra-platforms-wasm.yml with a new debuggerTestsOnly
parameter.
notifications.Remove(what, out _); | ||
return tcs.Task; | ||
} | ||
|
||
throw new Exception($"Invalid internal state, waiting for {what} while another wait is already setup"); | ||
} | ||
else if (nextNotifications.TryDequeue(out var notification)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the next notification in the queue is for a different string what
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll push some changes and it will be throwing an exception if it's a different string what
await Client.SendCommand(sessionIdNewTarget, "Profiler.enable", null, token); | ||
await Client.SendCommand(sessionIdNewTarget, "Runtime.enable", null, token); | ||
await Client.SendCommand(sessionIdNewTarget, "Debugger.enable", null, token); | ||
await Client.SendCommand(sessionIdNewTarget, "Runtime.runIfWaitingForDebugger", null, token); | ||
await Client.SendCommand(sessionIdNewTarget, "Debugger.setAsyncCallStackDepth", JObject.FromObject(new { maxDepth = 32}), token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a follow up PR - the commands here, and in DebuggerTestBase.InitializeAsync
should use the same base set of commands. And each case can add any additional ones as needed. Like the ones here seem to be the same.
Co-authored-by: Ankit Jain <radical@gmail.com>
…from the nextNotificationQueue.
/azp run runtime-wasm-non-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm-non-libtests |
Azure Pipelines successfully started running 1 pipeline(s). |
cb1fd258-20f9-4648-89eb-78ddbd59a7d9.mp4
Build command:
.\build.cmd mono+libs -os browser /p:MonoWasmBuildVariant=multithread
Run debugger-tests command:
.\dotnet.cmd test src/mono/wasm/debugger/DebuggerTestSuite --filter DebuggerTests.MiscTests.TestDebugUsingMultiThreadedRuntime -e RuntimeConfiguration=Debug -e Configuration=Debug -e DebuggerHost=chrome -e WASM_TESTS_USING_VARIANT=multithreaded -e WasmEnableThreads=true