Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a975e65
Temporary ETWs
rokonec Nov 16, 2021
8954c9a
Set work aside
rokonec Nov 18, 2021
2dbda74
Enlarge ReusableStringBuilderFactory limits and slightly change logic.
rokonec Nov 23, 2021
9ea1623
Move string builder caches into Framework
rokonec Nov 24, 2021
176527e
Finish moving ReuseableStringBuilder into framework
rokonec Nov 25, 2021
024aba4
Capacity bracketing
rokonec Nov 25, 2021
f78ddd4
Removing files from shared
rokonec Nov 25, 2021
8fcec62
Minor changes in StringBuilderCache
rokonec Nov 25, 2021
ed763f9
Enlarge StrignBuilderCache MAX_BUILDER_SIZE to 512
rokonec Nov 26, 2021
6eae7de
ReuseableStringBuilder balance diagnostics
rokonec Nov 26, 2021
51d30e2
Using ReusableStringBuilder in ConsoleOutputAligner
rokonec Nov 26, 2021
3125400
Dissable balance asserting.
rokonec Nov 29, 2021
47508ab
Rename ETW event
rokonec Nov 29, 2021
a177991
Revert: Using ReusableStringBuilder in ConsoleOutputAligner
rokonec Nov 29, 2021
8cedfdb
Change StringBuilderCache max limit
rokonec Nov 29, 2021
8470a1f
Disable StringBuilderCache assert ballance
rokonec Nov 29, 2021
da9c97f
Enable StringBuilderCache balance asserting
rokonec Nov 30, 2021
80b3ab1
Comments in StringBuilderCache
rokonec Dec 1, 2021
7c26206
Imrove comments
rokonec Dec 1, 2021
3db14b7
Apply suggestions from code review
rokonec Dec 1, 2021
59da9c0
nullable enable
rokonec Dec 1, 2021
8b276fd
Merge branch 'rokonec/2697-improve-reusable-sb-factory' of https://gi…
rokonec Dec 1, 2021
43d7df9
Make sure borrowed string builder can not be used after Release
rokonec Dec 1, 2021
4a33417
Modified SelectBracketedCapacity by Drew comment.
rokonec Dec 1, 2021
4fd1935
Commenting ETW
rokonec Dec 1, 2021
58ac763
Comment typo
rokonec Dec 1, 2021
103abfd
VerifyThrowInternalNull meesage
rokonec Dec 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@
<Compile Include="..\Shared\FileUtilitiesRegex.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="..\Shared\StringBuilderCache.cs">
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
</Compile>
<Compile Include="..\Shared\ExceptionHandling.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
Expand Down
4 changes: 0 additions & 4 deletions src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@
<Compile Include="..\Shared\ReadOnlyEmptyCollection.cs">
<Link>Collections\ReadOnlyEmptyCollection.cs</Link>
</Compile>
<Compile Include="..\Shared\StringBuilderCache.cs">
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
</Compile>
<Compile Include="..\Shared\BufferedReadStream.cs" />
<Compile Include="..\Shared\TaskHostConfiguration.cs" />
<Compile Include="..\Shared\TaskHostTaskCancelled.cs" />
Expand Down Expand Up @@ -140,7 +137,6 @@
<Compile Include="..\Shared\TaskEngineAssemblyResolver.cs">
<ExcludeFromStyleCop>true</ExcludeFromStyleCop>
</Compile>
<Compile Include="..\Shared\ReuseableStringBuilder.cs" />
<Compile Include="..\Shared\ThreadPoolExtensions.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="BackEnd\BuildManager\BuildManager.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<Compile Include="..\Shared\BuildEnvironmentHelper.cs" />
<Compile Include="..\Shared\ResourceUtilities.cs" />
<Compile Include="..\Shared\ExceptionHandling.cs" />
<Compile Include="..\Shared\StringBuilderCache.cs" />
<Compile Include="..\Shared\FileUtilitiesRegex.cs" />
<Compile Include="..\Shared\UnitTests\AssemblyResources.cs" />
</ItemGroup>
Expand Down
31 changes: 30 additions & 1 deletion src/Framework/MSBuildEventSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,35 @@ public void CachedSdkResolverServiceResolveSdkStop(string sdkName, string soluti
WriteEvent(67, sdkName, solutionPath, projectPath, success);
}

#endregion
/// <remarks>
/// This events are quite frequent so they are collected by Debug binaries only.
/// </remarks>
[Event(68, Keywords = Keywords.All)]
public void ReusableStringBuilderFactoryStart(int hash, int newCapacity, int oldCapacity, string type)
{
WriteEvent(68, hash, newCapacity, oldCapacity, type);
}

/// <remarks>
/// This events are quite frequent so they are collected by Debug binaries only.
/// </remarks>
[Event(69, Keywords = Keywords.All)]
public void ReusableStringBuilderFactoryStop(int hash, int returningCapacity, int returningLength, string type)
{
WriteEvent(69, hash, returningCapacity, returningLength, type);
}

/// <remarks>
/// As oppose to other ReusableStringBuilderFactory events this one is expected to happens very un-frequently
/// and if it is seen more than 100x per build it might indicates wrong usage patterns resulting into degrading
/// efficiency of ReusableStringBuilderFactory. Hence it is collected in release build as well.
/// </remarks>
[Event(70, Keywords = Keywords.All)]
public void ReusableStringBuilderFactoryUnbalanced(int oldHash, int newHash)
{
WriteEvent(70, oldHash, newHash);
}

#endregion
}
}
Loading