Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Threading / CDSsyncETWBCLProvider.cs / 1305376 / CDSsyncETWBCLProvider.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // CDSETWProvider.cs // //[....] // // A helper class for firing ETW events related to the Coordination Data Structure [....] primitives. // // This provider is used by CDS [....] primitives in both mscorlib.dll and system.dll. The purpose of sharing // the provider class is to be able to enable ETW tracing on all CDS [....] types with a single ETW provider GUID. // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System; using System.Collections.Generic; using System.Text; namespace System.Threading { #if !FEATURE_PAL // PAL doesn't support eventing using System.Diagnostics.Eventing; [System.Runtime.CompilerServices.FriendAccessAllowed] sealed internal class CdsSyncEtwBCLProvider : EventProviderBase { // // Defines the singleton instance for the CDS [....] ETW provider // // The CDS [....] Event provider GUID is {EC631D38-466B-4290-9306-834971BA0217} // public static CdsSyncEtwBCLProvider Log = new CdsSyncEtwBCLProvider(); private CdsSyncEtwBCLProvider() : base(new Guid(0xec631d38, 0x466b, 0x4290, 0x93, 0x6, 0x83, 0x49, 0x71, 0xba, 0x2, 0x17)) { } ///////////////////////////////////////////////////////////////////////////////////// // // SpinLock Events // [Event(1, Level = EventLevel.LogAlways)] public void SpinLock_FastPathFailed(int ownerID) { if (IsEnabled()) WriteEvent(1, ownerID); } ///////////////////////////////////////////////////////////////////////////////////// // // SpinWait Events // [Event(2, Level = EventLevel.LogAlways)] public void SpinWait_NextSpinWillYield() { if (IsEnabled()) WriteEvent(2); } // // Events below this point are used by the CDS types in System.DLL // ///////////////////////////////////////////////////////////////////////////////////// // // Barrier Events // [Event(3, Level = EventLevel.Verbose)] public void Barrier_PhaseFinished(bool currentSense, long phaseNum) { if (IsEnabled(EventLevel.Verbose, ((EventKeywords)(-1)) )) WriteEvent(3, currentSense, phaseNum); } } #endif // !FEATURE_PAL } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // CDSETWProvider.cs // //[....] // // A helper class for firing ETW events related to the Coordination Data Structure [....] primitives. // // This provider is used by CDS [....] primitives in both mscorlib.dll and system.dll. The purpose of sharing // the provider class is to be able to enable ETW tracing on all CDS [....] types with a single ETW provider GUID. // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System; using System.Collections.Generic; using System.Text; namespace System.Threading { #if !FEATURE_PAL // PAL doesn't support eventing using System.Diagnostics.Eventing; [System.Runtime.CompilerServices.FriendAccessAllowed] sealed internal class CdsSyncEtwBCLProvider : EventProviderBase { // // Defines the singleton instance for the CDS [....] ETW provider // // The CDS [....] Event provider GUID is {EC631D38-466B-4290-9306-834971BA0217} // public static CdsSyncEtwBCLProvider Log = new CdsSyncEtwBCLProvider(); private CdsSyncEtwBCLProvider() : base(new Guid(0xec631d38, 0x466b, 0x4290, 0x93, 0x6, 0x83, 0x49, 0x71, 0xba, 0x2, 0x17)) { } ///////////////////////////////////////////////////////////////////////////////////// // // SpinLock Events // [Event(1, Level = EventLevel.LogAlways)] public void SpinLock_FastPathFailed(int ownerID) { if (IsEnabled()) WriteEvent(1, ownerID); } ///////////////////////////////////////////////////////////////////////////////////// // // SpinWait Events // [Event(2, Level = EventLevel.LogAlways)] public void SpinWait_NextSpinWillYield() { if (IsEnabled()) WriteEvent(2); } // // Events below this point are used by the CDS types in System.DLL // ///////////////////////////////////////////////////////////////////////////////////// // // Barrier Events // [Event(3, Level = EventLevel.Verbose)] public void Barrier_PhaseFinished(bool currentSense, long phaseNum) { if (IsEnabled(EventLevel.Verbose, ((EventKeywords)(-1)) )) WriteEvent(3, currentSense, phaseNum); } } #endif // !FEATURE_PAL } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CharUnicodeInfo.cs
- ClaimTypes.cs
- WebPartEditorOkVerb.cs
- ResourceSetExpression.cs
- Content.cs
- OleDbTransaction.cs
- DoubleConverter.cs
- SoapAttributeOverrides.cs
- TransactionFlowBindingElement.cs
- SyndicationElementExtensionCollection.cs
- mda.cs
- TypedReference.cs
- EventLogInformation.cs
- HandlerFactoryCache.cs
- MultiTrigger.cs
- XmlSchemaFacet.cs
- QuaternionAnimation.cs
- TextWriter.cs
- DiscoveryVersionConverter.cs
- ObjectDataSourceStatusEventArgs.cs
- XmlSchemaComplexContentRestriction.cs
- ObjectAnimationUsingKeyFrames.cs
- TextRangeEdit.cs
- HtmlInputRadioButton.cs
- SqlDataSource.cs
- ReferencedAssembly.cs
- SendSecurityHeader.cs
- SymmetricKeyWrap.cs
- MemoryRecordBuffer.cs
- ConstantExpression.cs
- WS2007HttpBindingElement.cs
- UdpDiscoveryMessageFilter.cs
- AlignmentYValidation.cs
- OracleBoolean.cs
- ColumnResizeUndoUnit.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- DesignerSerializationOptionsAttribute.cs
- ErrorWebPart.cs
- ItemAutomationPeer.cs
- EdmConstants.cs
- Metafile.cs
- HyperLinkField.cs
- WebConfigurationFileMap.cs
- ContentPosition.cs
- RichTextBoxConstants.cs
- Storyboard.cs
- ToolStripLabel.cs
- ColorAnimationBase.cs
- GridViewDesigner.cs
- RoleManagerEventArgs.cs
- DesignerResources.cs
- ServiceContractGenerator.cs
- ObjectDataSourceMethodEventArgs.cs
- ActivityExecutionContextCollection.cs
- BufferModeSettings.cs
- InitializationEventAttribute.cs
- LineVisual.cs
- FileLogRecord.cs
- ViewPort3D.cs
- ResXDataNode.cs
- ResourceWriter.cs
- Events.cs
- Documentation.cs
- ChineseLunisolarCalendar.cs
- XsltArgumentList.cs
- DataGridViewAutoSizeModeEventArgs.cs
- XpsTokenContext.cs
- LineMetrics.cs
- Int32Rect.cs
- HScrollProperties.cs
- HtmlInputSubmit.cs
- XmlSchemaImport.cs
- DefaultValueAttribute.cs
- NopReturnReader.cs
- SetStoryboardSpeedRatio.cs
- MobileControlDesigner.cs
- LocatorPart.cs
- SqlDataSourceEnumerator.cs
- documentsequencetextpointer.cs
- WebPartCancelEventArgs.cs
- PtsCache.cs
- FolderBrowserDialog.cs
- AtomParser.cs
- SafeSystemMetrics.cs
- AddValidationError.cs
- WebPartEditorCancelVerb.cs
- CachedCompositeFamily.cs
- ControlBindingsCollection.cs
- MetadataCacheItem.cs
- CustomErrorsSection.cs
- LinqDataSourceContextData.cs
- LogicalMethodInfo.cs
- Size3D.cs
- ProcessInfo.cs
- NameTable.cs
- StreamingContext.cs
- ImageSource.cs
- XmlSerializationReader.cs
- TabItemWrapperAutomationPeer.cs
- DateTimeStorage.cs