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

[release/8.0] Remove public provider from rundown session #92048

Merged
merged 10 commits into from
Sep 18, 2023
24 changes: 8 additions & 16 deletions src/native/eventpipe/ep-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down