Skip to content

Add command sets to profiler communication channel #6316

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

Merged
merged 21 commits into from
Mar 28, 2024

Conversation

schmittjoseph
Copy link
Member

@schmittjoseph schmittjoseph commented Mar 26, 2024

Summary

This PR upgrades the profiler channel's messages to now contain a command set field to help distinguish between different receivers of the IPC message. There are currently 3 distinct command sets: ServerResponse, Profiler, and StartupHook (currently used by the HostingStartup, but this will become StartupHook-only in the future with the parameter capturing upgrades).

This change also allows multiple instances of MonitorMessageDispatcher to exist, where each is subscribed to a different command set, though this isn't done in this PR.

New IPC message format:

Field Size (bytes)
Command set 2
Command 2
Payload size 4
Payload %Payload size%

Other changes in this PR:

  • Update Command to be unsigned.
  • Update the native code to use fixed width integer types when handling the IPC messages instead of the portable types. Portable types don't guarantee the actual size of the integer, just the minimum size so it'd be technically possible for the headers buffer to be incorrectly sized on certain platforms.
Release Notes Entry

@schmittjoseph schmittjoseph changed the title [DO NOT REVIEW] Add command sets to profiler communication channel Add command sets to profiler communication channel Mar 26, 2024
@schmittjoseph schmittjoseph marked this pull request as ready for review March 26, 2024 22:30
@schmittjoseph schmittjoseph requested a review from a team as a code owner March 26, 2024 22:30
@schmittjoseph schmittjoseph merged commit 414cf2e into dotnet:main Mar 28, 2024
@schmittjoseph schmittjoseph deleted the multiple-message-endpoints branch March 28, 2024 16:38
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.

3 participants