You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/design-docs/ipc-protocol.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,7 @@ enum class EventPipeCommandId : uint8_t
287
287
CollectTracing3 = 0x04, // create/start a given session with/without collecting stacks
288
288
CollectTracing4 = 0x05, // create/start a given session with specific rundown keyword
289
289
CollectTracing5 = 0x06, // create/start a given session with/without user_events
290
+
CollectTracing6 = 0x07, // create/start a given session with a specific buffering mode
290
291
}
291
292
```
292
293
See: [EventPipe Commands](#EventPipe-Commands)
@@ -348,6 +349,7 @@ enum class EventPipeCommandId : uint8_t
348
349
CollectTracing3 = 0x04, // create/start a given session with/without collecting stacks
349
350
CollectTracing4 = 0x05, // create/start a given session with specific rundown keyword
350
351
CollectTracing5 = 0x06, // create/start a given session with/without user_events
352
+
CollectTracing6 = 0x07, // create/start a given session with a specific buffering mode
351
353
}
352
354
```
353
355
EventPipe Payloads are encoded with the following rules:
@@ -732,6 +734,44 @@ A Streaming Session started with `CollectTracing5` is followed by an Optional Co
732
734
733
735
A User_events Session started with `CollectTracing5` expects the Optional Continuation to contain another message passing along the SCM_RIGHTS `user_events_data` file descriptor. See [details](#passing_file_descriptor)
734
736
737
+
### `CollectTracing6`
738
+
739
+
Command Code: `0x0207`
740
+
741
+
The `CollectTracing6` command is an extension of the `CollectTracing5` command. It has all the capabilities of `CollectTracing5` and adds a trailing `sessionBufferMode` field to the **streaming session payload** that selects how the runtime's per-session event buffer behaves when it fills faster than the session is drained. The user_events session payload is unchanged from `CollectTracing5`, since a user_events session does not use the buffer manager.
*`uint streaming_circularBufferMB`: Specifies the size of the Streaming session's circular buffer used for buffering event data.
752
+
*`uint streaming_format`: 0 for the legacy NetPerf format and 1 for the NetTrace V4 format. Specifies the format in which event data will be serialized into the IPC Stream
753
+
*`ulong rundownKeyword`: Indicates the keyword for the rundown provider
754
+
*`bool requestStackwalk`: Indicates whether stacktrace information should be recorded.
755
+
*`array<streaming_provider_config> providers`: The providers to turn on for the session
756
+
*`uint sessionBufferMode`: Selects the session's buffering behavior. `0` = Drop (default): the buffer drops the newest events when it overflows (lossy). `1` = Block: producers block until the reader frees buffer capacity instead of dropping events (non-lossy).
757
+
758
+
The `streaming_provider_config` and its `event_filter` are encoded exactly as in [`CollectTracing5`](#collecttracing5).
759
+
760
+
#### User_events Session Payload:
761
+
762
+
Identical to the [`CollectTracing5`](#collecttracing5) user_events session payload; it has no `sessionBufferMode` field.
763
+
764
+
#### Returns (as an IPC Message Payload):
765
+
766
+
Header: `{ Magic; 28; 0xFF00; 0x0000; }`
767
+
768
+
`CollectTracing6` returns:
769
+
*`ulong sessionId`: the ID for the EventPipe Session started
770
+
771
+
A Streaming Session started with `CollectTracing6` is followed by an Optional Continuation of a `nettrace` format stream of events.
772
+
773
+
A User_events Session started with `CollectTracing6` expects the Optional Continuation to contain another message passing along the SCM_RIGHTS `user_events_data` file descriptor. See [details](#passing_file_descriptor)
thrownewBadEncodingException($"{operationName} failed - the target runtime rejected the request as invalid (bad encoding), likely because it does not support one or more of the configured options. Retry with options supported by the target runtime's version.");
890
+
888
891
case(uint)DiagnosticsIpcError.NotSupported:
889
892
message=$"{operationName} - Not supported by this runtime.";
0 commit comments