diff --git a/src/native/eventpipe/ep-sample-profiler.c b/src/native/eventpipe/ep-sample-profiler.c index 858d69ad5078b0..2414872cba9226 100644 --- a/src/native/eventpipe/ep-sample-profiler.c +++ b/src/native/eventpipe/ep-sample-profiler.c @@ -198,10 +198,7 @@ sample_profiler_enable (void) ep_requires_lock_held (); - const bool result = sample_profiler_load_dependecies (); - EP_ASSERT (result); - - if (result && !sample_profiler_load_profiling_enabled ()) { + if (!sample_profiler_load_profiling_enabled ()) { sample_profiler_store_profiling_enabled (true); EP_ASSERT (!ep_rt_wait_event_is_valid (&_thread_shutdown_event)); @@ -273,6 +270,8 @@ ep_sample_profiler_enable (void) if (!ep_event_is_enabled (_thread_time_event)) return; + sample_profiler_load_dependecies (); + if (_can_start_sampling) sample_profiler_enable ();