54
54
55
55
extern void ep_rt_aot_thread_exited (void );
56
56
57
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
58
- // TODO: The NativeAOT ALIGN_UP is defined in a tangled manner that generates linker errors if
57
+ // The NativeAOT ALIGN_UP is defined in a tangled manner that generates linker errors if
59
58
// it is used here; instead, define a version tailored to the existing usage in the shared
60
59
// EventPipe code.
61
60
static inline uint8_t * _rt_aot_align_up (uint8_t * val , uintptr_t alignment )
@@ -324,10 +323,7 @@ ep_rt_method_get_simple_assembly_name (
324
323
{
325
324
STATIC_CONTRACT_NOTHROW ;
326
325
327
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
328
- // TODO: Design MethodDesc and method name services if/when needed
329
- //PalDebugBreak();
330
-
326
+ // NativeAOT does not support method_desc operations
331
327
return false;
332
328
333
329
}
@@ -339,10 +335,7 @@ ep_rt_method_get_full_name (
339
335
ep_char8_t * name ,
340
336
size_t name_len )
341
337
{
342
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
343
- // TODO: Design MethodDesc and method name services if/when needed
344
- //PalDebugBreak();
345
-
338
+ // NativeAOT does not support method_desc operations
346
339
return false;
347
340
}
348
341
@@ -613,11 +606,9 @@ EventPipeWaitHandle
613
606
ep_rt_wait_event_get_wait_handle (ep_rt_wait_event_handle_t * wait_event )
614
607
{
615
608
STATIC_CONTRACT_NOTHROW ;
616
- // EP_ASSERT (wait_event != NULL && wait_event->event != NULL);
617
609
618
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
619
- // TODO: NativeAOT CLREventStatic doesn't have GetHandleUNHOSTED
620
- // PalDebugBreak();
610
+ // This is not reached in the current product
611
+ abort ();
621
612
return 0 ;
622
613
}
623
614
@@ -675,41 +666,8 @@ ep_rt_create_activity_id (
675
666
uint8_t * activity_id ,
676
667
uint32_t activity_id_len )
677
668
{
678
- STATIC_CONTRACT_NOTHROW ;
679
- EP_ASSERT (activity_id != NULL );
680
- EP_ASSERT (activity_id_len == EP_ACTIVITY_ID_SIZE );
681
-
682
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
683
- // TODO: Implement a way to generate a real Guid
684
- // CoCreateGuid (reinterpret_cast<GUID *>(activity_id));
685
-
686
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
687
- // TODO: Using roughly Mono's implementation but Mono randomly generates this, hardcoding for now
688
- uint8_t data1 [] = {0x67 ,0xac ,0x33 ,0xf1 ,0x8d ,0xed ,0x41 ,0x01 ,0xb4 ,0x26 ,0xc9 ,0xb7 ,0x94 ,0x35 ,0xf7 ,0x8a };
689
- memcpy (activity_id , data1 , EP_ACTIVITY_ID_SIZE );
690
-
691
- const uint16_t version_mask = 0xF000 ;
692
- const uint16_t random_guid_version = 0x4000 ;
693
- const uint8_t clock_seq_hi_and_reserved_mask = 0xC0 ;
694
- const uint8_t clock_seq_hi_and_reserved_value = 0x80 ;
695
-
696
- // Modify bits indicating the type of the GUID
697
- uint8_t * activity_id_c = activity_id + sizeof (uint32_t ) + sizeof (uint16_t );
698
- uint8_t * activity_id_d = activity_id + sizeof (uint32_t ) + sizeof (uint16_t ) + sizeof (uint16_t );
699
-
700
- uint16_t c ;
701
- memcpy (& c , activity_id_c , sizeof (c ));
702
-
703
- uint8_t d ;
704
- memcpy (& d , activity_id_d , sizeof (d ));
705
-
706
- // time_hi_and_version
707
- c = ((c & ~version_mask ) | random_guid_version );
708
- // clock_seq_hi_and_reserved
709
- d = ((d & ~clock_seq_hi_and_reserved_mask ) | clock_seq_hi_and_reserved_value );
710
-
711
- memcpy (activity_id_c , & c , sizeof (c ));
712
- memcpy (activity_id_d , & d , sizeof (d ));
669
+ extern void ep_rt_aot_create_activity_id (uint8_t * activity_id , uint32_t activity_id_len );
670
+ ep_rt_aot_create_activity_id (activity_id , activity_id_len );
713
671
}
714
672
715
673
static
718
676
ep_rt_is_running (void )
719
677
{
720
678
STATIC_CONTRACT_NOTHROW ;
721
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
722
- // TODO: Does NativeAot have the concept of EEStarted
723
- // PalDebugBreak();
679
+
680
+ // This is only used to check if the profiler can be attached
681
+ // Profiler attach is not supported in NativeAOT
724
682
725
683
return false;
726
684
}
@@ -732,11 +690,7 @@ ep_rt_execute_rundown (dn_vector_ptr_t *execution_checkpoints)
732
690
{
733
691
STATIC_CONTRACT_NOTHROW ;
734
692
735
- //TODO: Write execution checkpoint rundown events.
736
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
737
- // TODO: EventPipe Configuration values - RhConfig?
738
- // (CLRConfig::INTERNAL_EventPipeCircularMB)
739
- // PalDebugBreak();
693
+ // NativeAOT does not currently support rundown
740
694
}
741
695
742
696
/*
@@ -772,8 +726,6 @@ EP_RT_DEFINE_THREAD_FUNC (ep_rt_thread_aot_start_session_or_sampling_thread)
772
726
773
727
ep_rt_thread_params_t * thread_params = reinterpret_cast < ep_rt_thread_params_t * > (data );
774
728
775
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
776
- // TODO: Implement thread creation/management if needed.
777
729
// The session and sampling threads both assert that the incoming thread handle is
778
730
// non-null, but do not necessarily rely on it otherwise; just pass a meaningless non-null
779
731
// value until testing shows that a meaningful value is needed.
@@ -808,9 +760,7 @@ inline
808
760
void
809
761
ep_rt_set_server_name (void )
810
762
{
811
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
812
- // TODO: Need to set name for the thread
813
- // ::SetThreadName(GetCurrentThread(), W(".NET EventPipe"));
763
+ // This is optional, decorates the thread name with EventPipe specific information
814
764
}
815
765
816
766
@@ -1569,10 +1519,7 @@ ep_rt_thread_setup (void)
1569
1519
{
1570
1520
STATIC_CONTRACT_NOTHROW ;
1571
1521
1572
- // shipping criteria: no EVENTPIPE-NATIVEAOT-TODO left in the codebase
1573
- // TODO: Implement thread creation/management if needed
1574
- // Thread* thread_handle = SetupThreadNoThrow ();
1575
- // EP_ASSERT (thread_handle != NULL);
1522
+ // Likely not needed and do nothing until testing shows to be required
1576
1523
}
1577
1524
1578
1525
static
0 commit comments