Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge changes from TFS - #1714

Merged
jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Aug 23, 2016
Merged

jkotas merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

CR: JKotas, SergeyK

*  Mark the SyncTable class with [EagerStaticClassConstruction] to avoid static constructor checks.  Construction ordering should be unimportant since we do not use Monitor.Enter during runtime initialization.
*  Remove the type check for the Lock type from Monitor.Enter code path.  The Lock type is internal and internal code must use Lock.Acquire instead.  Add a debug assert verifying the object is not of the Lock type.
*  Put the AggressiveInlining attribute on two performance-critical functions, which NUTC does not inline.  At least GetSyncEntryIndex is expected to be inlined; reported this issue to the NUTC team.
*  In ObjectHeader.GetSyncEntryIndex use a bit shift trick to save one of two branches.

With these changes uncontended lock performance in ProjectN becomes around 92% of CLR thick lock performance and 82% of CLR thin lock performance (assuming no cache misses for thick locks).

[tfs-changeset: 1623787]
@jkotas
jkotas merged commit 78c4f9e into dotnet:nmirror Aug 23, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch August 23, 2016 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants