Skip to content
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

EventPipe: Don't clean up thread list on shutdown #96936

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/native/eventpipe/ep-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,6 @@ ep_thread_init (void)
EP_UNREACHABLE ("Failed to allocate threads list.");
}

void
ep_thread_fini (void)
{
// If threads are still included in list (depending on runtime shutdown order),
// don't clean up since TLS destructor migh callback freeing items, no new
// threads should however not be added to list at this stage.
if (dn_list_empty (_ep_threads)) {
dn_list_free (_ep_threads);
_ep_threads = NULL;
ep_rt_spin_lock_free (&_ep_threads_lock);
}
}

bool
ep_thread_register (EventPipeThread *thread)
{
Expand Down
3 changes: 0 additions & 3 deletions src/native/eventpipe/ep-thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ ep_thread_release (EventPipeThread *thread);
void
ep_thread_init (void);

void
ep_thread_fini (void);

bool
ep_thread_register (EventPipeThread *thread);

Expand Down
15 changes: 0 additions & 15 deletions src/native/eventpipe/ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,21 +1499,6 @@ ep_shutdown (void)
dn_vector_free (_ep_deferred_disable_session_ids);
_ep_deferred_disable_session_ids = NULL;

ep_thread_fini ();

// dotnet/coreclr: issue 24850: EventPipe shutdown race conditions
// Deallocating providers/events here might cause AV if a WriteEvent
// was to occur. Thus, we are not doing this cleanup.

/*EP_LOCK_ENTER (section1)
ep_sample_profiler_shutdown ();
EP_LOCK_EXIT (section1)*/

// // Remove EventPipeEventSource first since it tries to use the data structures that we remove below.
// // We need to do this after disabling sessions since those try to write to EventPipeEventSource.
// ep_event_source_fini (ep_event_source_get ());
// ep_config_shutdown (ep_config_get ());

ep_on_exit:
ep_requires_lock_not_held ();
ep_rt_shutdown ();
Expand Down
Loading