internal static void Enable(EventPipeConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (configuration.Providers == null) { throw new ArgumentNullException(nameof(configuration.Providers)); } EventPipeProviderConfiguration[] providers = configuration.Providers; s_sessionID = EventPipeInternal.Enable( configuration.OutputFile, configuration.Format, configuration.CircularBufferSizeInMB, providers); }
internal static void Enable(EventPipeConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (configuration.Providers == null) { throw new ArgumentNullException(nameof(configuration.Providers)); } EventPipeProviderConfiguration[] providers = configuration.Providers; EventPipeInternal.Enable( configuration.OutputFile, configuration.CircularBufferSizeInMB, configuration.ProfilerSamplingRateInNanoseconds, providers, providers.Length); }
internal static void Enable(EventPipeConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (configuration.Providers == null) { throw new ArgumentNullException(nameof(configuration.Providers)); } EventPipeProviderConfiguration[] providers = configuration.Providers; s_sessionID = EventPipeInternal.Enable( configuration.OutputFile, configuration.CircularBufferSizeInMB, (ulong)configuration.ProfilerSamplingRateInNanoseconds, providers, (uint)providers.Length, configuration.MultiFileTraceLengthInSeconds); }
private void CommitDispatchConfiguration() { // Ensure that the dispatch task is stopped. // This is a no-op if the task is already stopped. StopDispatchTask(); // Stop tracing. // This is a no-op if it's already disabled. EventPipeInternal.Disable(); // Check to see if tracing should be enabled. if (m_subscriptions.Count <= 0) { return; } // Start collecting events. EventKeywords aggregatedKeywords = EventKeywords.None; EventLevel highestLevel = EventLevel.LogAlways; foreach (EventListenerSubscription subscription in m_subscriptions.Values) { aggregatedKeywords |= subscription.MatchAnyKeywords; highestLevel = (subscription.Level > highestLevel) ? subscription.Level : highestLevel; } EventPipeProviderConfiguration[] providerConfiguration = new EventPipeProviderConfiguration[] { new EventPipeProviderConfiguration(RuntimeEventSource.EventSourceName, (ulong)aggregatedKeywords, (uint)highestLevel) }; EventPipeInternal.Enable(null, 1024, 1, providerConfiguration, 1); // Start the dispatch task. StartDispatchTask(); }