@@ -46,6 +46,13 @@ eventpipe_collect_tracing_command_try_parse_rundown_requested (
46
46
uint32_t * buffer_len ,
47
47
bool * rundown_requested );
48
48
49
+ static
50
+ bool
51
+ eventpipe_collect_tracing_command_try_parse_rundown_keyword (
52
+ uint8_t * * buffer ,
53
+ uint32_t * buffer_len ,
54
+ uint64_t * rundown_keyword );
55
+
49
56
static
50
57
bool
51
58
eventpipe_collect_tracing_command_try_parse_stackwalk_requested (
@@ -78,6 +85,12 @@ eventpipe_collect_tracing3_command_try_parse_payload (
78
85
uint8_t * buffer ,
79
86
uint16_t buffer_len );
80
87
88
+ static
89
+ uint8_t *
90
+ eventpipe_collect_tracing4_command_try_parse_payload (
91
+ uint8_t * buffer ,
92
+ uint16_t buffer_len );
93
+
81
94
static
82
95
bool
83
96
eventpipe_protocol_helper_stop_tracing (
@@ -150,6 +163,21 @@ eventpipe_collect_tracing_command_try_parse_rundown_requested (
150
163
return ds_ipc_message_try_parse_bool (buffer , buffer_len , rundown_requested );
151
164
}
152
165
166
+ static
167
+ inline
168
+ bool
169
+ eventpipe_collect_tracing_command_try_parse_rundown_keyword (
170
+ uint8_t * * buffer ,
171
+ uint32_t * buffer_len ,
172
+ uint64_t * rundown_keyword )
173
+ {
174
+ EP_ASSERT (buffer != NULL );
175
+ EP_ASSERT (buffer_len != NULL );
176
+ EP_ASSERT (rundown_keyword != NULL );
177
+
178
+ return ds_ipc_message_try_parse_uint64_t (buffer , buffer_len , rundown_keyword );
179
+ }
180
+
153
181
static
154
182
inline
155
183
bool
@@ -299,6 +327,7 @@ eventpipe_collect_tracing_command_try_parse_payload (
299
327
ep_raise_error ();
300
328
instance -> rundown_requested = true;
301
329
instance -> stackwalk_requested = true;
330
+ instance -> rundown_keyword = ep_default_rundown_keyword ;
302
331
303
332
ep_on_exit :
304
333
return (uint8_t * )instance ;
@@ -330,6 +359,9 @@ eventpipe_collect_tracing2_command_try_parse_payload (
330
359
!eventpipe_collect_tracing_command_try_parse_rundown_requested (& buffer_cursor , & buffer_cursor_len , & instance -> rundown_requested ) ||
331
360
!eventpipe_collect_tracing_command_try_parse_config (& buffer_cursor , & buffer_cursor_len , & instance -> provider_configs ))
332
361
ep_raise_error ();
362
+
363
+ instance -> rundown_keyword = instance -> rundown_requested ? ep_default_rundown_keyword : 0 ;
364
+
333
365
instance -> stackwalk_requested = true;
334
366
335
367
ep_on_exit :
@@ -364,6 +396,42 @@ eventpipe_collect_tracing3_command_try_parse_payload (
364
396
!eventpipe_collect_tracing_command_try_parse_config (& buffer_cursor , & buffer_cursor_len , & instance -> provider_configs ))
365
397
ep_raise_error ();
366
398
399
+ instance -> rundown_keyword = instance -> rundown_requested ? ep_default_rundown_keyword : 0 ;
400
+
401
+ ep_on_exit :
402
+ return (uint8_t * )instance ;
403
+
404
+ ep_on_error :
405
+ ds_eventpipe_collect_tracing_command_payload_free (instance );
406
+ instance = NULL ;
407
+ ep_exit_error_handler ();
408
+ }
409
+
410
+ static
411
+ uint8_t *
412
+ eventpipe_collect_tracing4_command_try_parse_payload (
413
+ uint8_t * buffer ,
414
+ uint16_t buffer_len )
415
+ {
416
+ EP_ASSERT (buffer != NULL );
417
+
418
+ uint8_t * buffer_cursor = buffer ;
419
+ uint32_t buffer_cursor_len = buffer_len ;
420
+
421
+ EventPipeCollectTracingCommandPayload * instance = ds_eventpipe_collect_tracing_command_payload_alloc ();
422
+ ep_raise_error_if_nok (instance != NULL );
423
+
424
+ instance -> incoming_buffer = buffer ;
425
+
426
+ if (!eventpipe_collect_tracing_command_try_parse_circular_buffer_size (& buffer_cursor , & buffer_cursor_len , & instance -> circular_buffer_size_in_mb ) ||
427
+ !eventpipe_collect_tracing_command_try_parse_serialization_format (& buffer_cursor , & buffer_cursor_len , & instance -> serialization_format ) ||
428
+ !eventpipe_collect_tracing_command_try_parse_rundown_keyword (& buffer_cursor , & buffer_cursor_len , & instance -> rundown_keyword ) ||
429
+ !eventpipe_collect_tracing_command_try_parse_stackwalk_requested (& buffer_cursor , & buffer_cursor_len , & instance -> stackwalk_requested ) ||
430
+ !eventpipe_collect_tracing_command_try_parse_config (& buffer_cursor , & buffer_cursor_len , & instance -> provider_configs ))
431
+ ep_raise_error ();
432
+
433
+ instance -> rundown_requested = instance -> rundown_keyword != 0 ;
434
+
367
435
ep_on_exit :
368
436
return (uint8_t * )instance ;
369
437
@@ -471,7 +539,7 @@ eventpipe_protocol_helper_collect_tracing (
471
539
dn_vector_size (payload -> provider_configs ),
472
540
EP_SESSION_TYPE_IPCSTREAM ,
473
541
payload -> serialization_format ,
474
- payload -> rundown_requested ,
542
+ payload -> rundown_keyword ,
475
543
payload -> stackwalk_requested ,
476
544
ds_ipc_stream_get_stream_ref (stream ),
477
545
NULL ,
@@ -544,6 +612,10 @@ ds_eventpipe_protocol_helper_handle_ipc_message (
544
612
payload = (EventPipeCollectTracingCommandPayload * )ds_ipc_message_try_parse_payload (message , eventpipe_collect_tracing3_command_try_parse_payload );
545
613
result = eventpipe_protocol_helper_collect_tracing (payload , stream );
546
614
break ;
615
+ case EP_COMMANDID_COLLECT_TRACING_4 :
616
+ payload = (EventPipeCollectTracingCommandPayload * )ds_ipc_message_try_parse_payload (message , eventpipe_collect_tracing4_command_try_parse_payload );
617
+ result = eventpipe_protocol_helper_collect_tracing (payload , stream );
618
+ break ;
547
619
case EP_COMMANDID_STOP_TRACING :
548
620
result = eventpipe_protocol_helper_stop_tracing (message , stream );
549
621
break ;
0 commit comments