-
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-ep] Can't have both runtime and EventSource event providers in the same session #69568
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDepends on #69567 Specifying both an EventSource and one of the runtime providers (e.g. Repro: modify the const options = MONO.diagnostics.SessionOptionsBuilder
.Empty
.setRundownEnabled(false)
.addProvider({ name: 'WasmHello', level: MONO.diagnostics.EventLevel.Verbose, args: 'EventCounterIntervalSec=1' })
.build(); to const options = MONO.diagnostics.SessionOptionsBuilder
.DefaultProviders
.setRundownEnabled(true)
.addProvider({ name: 'WasmHello', level: MONO.diagnostics.EventLevel.Verbose, args: 'EventCounterIntervalSec=1' })
.build(); and collect a trace. note that there are no
|
…sionOptions builder to TS (#69567) 1. Implements support for creating event counters in WebAssembly apps. **Important change** adds `Thread.IsInternalThreadStartSupported` and `Thread.InternalUnsafeStart()` to `System.Threading.Thread` that can be used by System.Private.CoreLib to start threads on a runtime where `Thread.IsThreadStartSupported` is false. This is used to create the event counters polling thread. This is in addition to the native runtime being able to create threads using `mono_thread_create_internal` 2. Coop thread suspend: STW calls `mono_threads_platform_stw_defer_initial_suspend` which postpones suspending a thread until the next GC suspend phase. Doesn't do anything on most platforms. On WASM, suspend the main browser thread after all the other threads are suspended. This helps prevent deadlocks where the main thread is suspended while another thread is doing a call that is proxied to the main thread and cannot complete. By suspending the main thread last, we give it a chance to service the other threads' requests. 2. Adds a `MONO.diagnostics.SessionOptionsBuilder` class that can be used to create an `EventPipeSessionOptions` instance and populate the provider string for an event pipe session. 3. Updated the `browser-eventpipe` sample to create an EventSource and some counters. The sample is now interactive so you have to click "Start Work" in a browser for things to happen. There's an outstanding issue #69568 that will be investigated in a follow-up PR * Add custom EventSource and counter - Added a method for coop GC to suspend the main browser thread in the second phase (so that other threads are less likely to deadlock if they delegate work to it) - Added an event provider builder - Added a Thread.InternalUnsafeStart() method and a IsInternalThreadStartSupported property. This allows EventSource to start a thread to poll the counter values. - The sample with counters can now record counter values. But not at the same time as the default configuration (runtime, runtime private, sample profiler). Not sure if it's a wasm issue or a limitation of EventPipe. * Change ProvidersConfigBuilder to SessionOptionsBuilder it creates an entire EventPipeSessionOptions object, not just the providers config * checkout interactive demo * Add docs; fix whitespace * more whitespace fixes * add default arg value to ThrowIfNoThreadStart * fix build * Review feedback
@lambdageek I'm assuming this should be moved to 8.0 . |
Depends on #69567
Specifying both an EventSource and one of the runtime providers (e.g.
"Microsoft-Windows-DotNETRuntime"
) on the same session only captures runtime events and not the EventSource eventsRepro:
modify the
browser-eventpipe
sample and changeto
and collect a trace. note that there are no
EventCounters
events in the resulting .nettrace file.The text was updated successfully, but these errors were encountered: