[release/10.0] [EventPipe][UserEvents] Allow empty tracepoint sets #119666
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #119651 to release/10.0
/cc @mdh1418
Customer Impact
This impacts user_events-based EventPipe Sessions, which is a .NET 10 Linux-only feature.
Before the change, valid IPC command payloads to start a user_events-based eventpipe session would be incorrectly deemed invalid and thus the session wouldn't start.
Specifically, the specification at https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/ipc-protocol.md#user_events-session-payload dictates that the
tracepoint_setspayload portion can be empty if the default_tracepoint_name was present, but the previous logic considered that invalid.The expectation is that just specifying the default tracepoint name and 0 tracepoint sets for a provider configuration would still kickoff a user_events-based eventpipe session.
Regression
Testing
Manually tested with custom script to send an IPC command.
Risk
Low. The change affects the IPC command parsing logic for user_events-based eventpipe sessions, a .NET 10 feature. Previously, some payloads were incorrectly deemed invalid, preventing user_events-based eventpipe sessions from being started. Now, the runtime will deem them valid and allow the eventpipe session to start.