diff --git a/src/native/eventpipe/ep-session.c b/src/native/eventpipe/ep-session.c index 959214d1375963..ee134be65059d7 100644 --- a/src/native/eventpipe/ep-session.c +++ b/src/native/eventpipe/ep-session.c @@ -329,24 +329,16 @@ ep_session_enable_rundown (EventPipeSession *session) const uint64_t keywords = 0x80020139; const EventPipeEventLevel verbose_logging_level = EP_EVENT_LEVEL_VERBOSE; - EventPipeProviderConfiguration rundown_providers [2]; - uint32_t rundown_providers_len = (uint32_t)ARRAY_SIZE (rundown_providers); + EventPipeProviderConfiguration rundown_provider; + ep_provider_config_init (&rundown_provider, ep_config_get_rundown_provider_name_utf8 (), keywords, verbose_logging_level, NULL); // Rundown provider. - ep_provider_config_init (&rundown_providers [0], ep_config_get_public_provider_name_utf8 (), keywords, verbose_logging_level, NULL); // Public provider. - ep_provider_config_init (&rundown_providers [1], ep_config_get_rundown_provider_name_utf8 (), keywords, verbose_logging_level, NULL); // Rundown provider. + EventPipeSessionProvider *session_provider = ep_session_provider_alloc ( + ep_provider_config_get_provider_name (&rundown_provider), + ep_provider_config_get_keywords (&rundown_provider), + ep_provider_config_get_logging_level (&rundown_provider), + ep_provider_config_get_filter_data (&rundown_provider)); - // Update provider list with rundown configuration. - for (uint32_t i = 0; i < rundown_providers_len; ++i) { - const EventPipeProviderConfiguration *config = &rundown_providers [i]; - - EventPipeSessionProvider *session_provider = ep_session_provider_alloc ( - ep_provider_config_get_provider_name (config), - ep_provider_config_get_keywords (config), - ep_provider_config_get_logging_level (config), - ep_provider_config_get_filter_data (config)); - - ep_raise_error_if_nok (ep_session_add_session_provider (session, session_provider)); - } + ep_raise_error_if_nok (ep_session_add_session_provider (session, session_provider)); ep_session_set_rundown_enabled (session, true); result = true;