Substituting Logging calls to EventSource calls, or calls to
LoggingHash.
Formatting Changes
Fixing Aligment, and casing.
Changing Dump methods log the hash of the object calling it instead of the method
After some discussion, it was decided that it is more useful to log the
object where the dump happens, than the method. Doing the necessary
changes for it.
Changing usage of "this" to [CallerMemberName]
Instead of using this to know who called the logging method, using
[CallerMemberName] as an attribute to the parameter to fill that
information.
Adding a TODO item.
Making a note to not change NetEventSource or it can break.
Missing Underscore
Adding missing underscore in _wsaBuffer
Commit migrated from https://github.com/dotnet/corefx/commit/f39502ef910c90ba1e67d787df98b627d39ba6cc
In profiling a client/server scenario where the client launches a bunch of async operations against the server, close to 15% of all allocated instances on the client are for System.Threading.ExecutionContext (~9% of the allocated space). This didn't make sense, because on CoreCLR ExecutionContext is immutable and neither ExecutionContext.Capture() nor ExecutionContext.CreateCopy() should be allocating.
It turns out that some of the System.Net libraries had a custom System.Threading.ExecutionContext shim object with a comment in the file "Important: This is temporary code". Ugh.
I've removed it. No more ExecutionContext allocations. And using the right ExecutionContext object from CoreCLR.
This also shrinks the size of SocketAsyncEventArgs by another field, as a separate ExecutionContext copy no longer need be maintained, due to ExecutionContext immutability on platforms other than the full framework.
Commit migrated from https://github.com/dotnet/corefx/commit/241eb27504a4e7bc774e202acc5447b09bb4a2d6
- Remove dead Assert overloads that include a Boolean conditional
- Fix up several missed call sites. Missed primarily due to code being conditionally included based on different build flavors (e.g. Windows vs Unix)
- Fix up GlobalLog fakes to include IsEnabled
Commit migrated from https://github.com/dotnet/corefx/commit/cc8a5d162d36efc8bd56ba406efea71ee3a8af6f
This these .builds files were updated and generated from a script
based on the configurations defined in the matching csproj files.
This updates the builds files to specify OSGroup and TargetGroup
as metadata instead of using AdditionalProperties and also sorts them by
TargetGroup followed by OSGroup.
Commit migrated from https://github.com/dotnet/corefx/commit/95efe37475916016a5fc6ee6f0ba584d990c4196
This add a default configuration before the Import of dirs.props
for any projects that don't have Debug as the default configuration.
Removed Configuration and Platform properties set after dirs.props
as they would have no affect and just cause confusion.
Removed OutputType=Library property as it isn't necessary.
Commit migrated from https://github.com/dotnet/corefx/commit/9e1da13cf6d5ff4b37b1867beb3411a2fe61da6a
Adding EventSources to substitute the previous logging model using
TraceSources.
In this PR 4 event sources are added:
-NetEventSource
-SocketsEventSource
-HttpEventSource
-SecurityEventSource
Event methods for NetEventSource, SocketsEventSource and HttpEventSource
are
fully added. SecurityEventSource has only a few of
the new event methods implemented.
Changes in production code are done to match this new implementation.
(Only changes for
events in Sockets and Http are done in this iteration).
Adding missing reference to LoggingHash
Missing Reference in Security csproj
Missing reference in NetworkInformation
Adding a reference and adding a missing new line.
Adding references and readonly modifier.
Adding another missing reference.
Adding some missing blank lines and making readonly the s_log in the
EventSources.
Completing SecurityEventSource
Adding missing all the security events that will substitute PrintInfo
calls.
Doing changes in code to reflect this.
Transforming SecurityEventSource into a Partial class
Some of the events were Windows specific, because of the enums they were
using. Those events are now in a partial class that is included when
those enums are defined.
Moving events to partial SecurityEventSource class
Some more events using Interop.SecurityStatus are moved into the partial
windows specific class.
Also, a missed non event header is added for Associate method in
HttpEventSource.
Deleting Logging reference to instead use LoggingHash
Addressing some of the PR feedback
Adding the Issue number to TODO for localization, and using BlockCopy
instead of a Loop to copy array. Also, correctly passing partialBuffer
instead of Buffer to the DumpArrayAsync method.
Commit migrated from https://github.com/dotnet/corefx/commit/1cd8bf635d4b9a6d8a7d1e25cd320814c993f38b
These facade project files were generated using a porting tool I wrote,
which examined some information from our internal build and created
appropriate project files. I have also re-generated all of the .builds
files so that they import the facade projects in the correct manner.
Commit migrated from https://github.com/dotnet/corefx/commit/58e2f6e862060039e1ebad727d75c87703fdb2f2
Switching System.Net Win contracts to use code in the Open partition.
Creating individual implementations for System.Net contracts for Win.
Removing System.Private.Networking (partial, requires a second check-in due to TFS limitations).
Removing System.Private.Networking.Build.
Removing System.Net.Common.
Updating ToF tests.
Reactivating all ToF tests for System.Net (validated on private builds).
Porting remaining UnitTests to GitHub.
Creating packages for System.Net.Utilities for Unix.
[tfs-changeset: 1554743]
Commit migrated from https://github.com/dotnet/corefx/commit/96ef10191969d8216d538e9a2a25222661b83683
A change was made to DNX to no longer restore project.jsons
that are in nested folders. This caused my batch update to miss
a number of tests and reference assembly projects.
This fixes the stale lock files, but restore is still broken.
[tfs-changeset: 1540448]
Commit migrated from https://github.com/dotnet/corefx/commit/3622cccc1b22fa1947a72d5126b59864e9d2fd0d
We need a new DNX to understand the latest packages.
We also need to move all "dotnet" projects to use dotnetX.X (generations)
now that the packages no longer have "dotnet" assets.
The new version of DNX dropped support for the aspnetcore
so I needed to update a few projects/packages that depended
on old package versions that had this moniker.
[tfs-changeset: 1540388]
Commit migrated from https://github.com/dotnet/corefx/commit/38f8d7a3ca1ee819c2b8eabb1c07ee4e99683c97
All projects that previously used dotnet have been updated to specify the appropriate generation of the surface area they depend on or in the case of desktop inbox contracts, the generation that includes the set of platforms they can support.
Now all packages contain all generations of API that they have ever shipped.
In doing this I needed to change how we determine package version. Before we ensured all assemblies would have the same version and used that. Now we choose the max.
Additionally I needed to change how we chose which asset to use for netcore50 when the dotnet asset was obscured by a placeholder for a previous netcore release (eg System.Runtime will have placeholders for Win8 since it was inbox there). To do this I wrote a task that uses nuget to evaluate the package assets with and without the placeholders. In this way it chooses the "best" dotnet implementation and reference assembly to use for netcore50.
This new model made my old MSBuild-based validation impossible to carry forward, so I wrote better validation in a task that actually uses Nuget's asset resolution algorithm. This uncovered many existing issues in packages that I have cleaned up. The validation algorithm could use some polish but its working now. Perf is not great, package build went from 15s to ~2 minutes. I'll work on this some more by making it incremental (input: nuspec, output: marker created on success). Profiling shows that most of the time is spent in calling the nuget APIs. I'll see if I can reduce some of this with caching for things that don't change (eg: RID graph). Ultimately I think its a reasonable tradeoff for the types of bugs I can find this way.
[tfs-changeset: 1539216]
Commit migrated from https://github.com/dotnet/corefx/commit/0931c347eb836c9da94d0d5ff9ad7a14403b9738
The socket address shim adds native accessors for the various bits that
managed code needs to access, namely:
- Address families
- Port numbers
- IP addresses
This change also updates the name resolution shim to use an iterator-based
design for walking host entries. This interface trades chattiness (a
P/Invoke per IP address) for memory footprint (various native and managed
allocations per IP address).
Commit migrated from https://github.com/dotnet/corefx/commit/ecc092e2dcc87a3a17370ff6951dc48c6b37fea7
The calls to getaddrinfo are not 1-to-1 with the native calls due to
complexities around the native structs. Calls using sockaddr and
addrinfo have nested structs pointing to different data depending
on if the IP is IPv4 or IPv6. To mitigate the complexities around
this code and around the underlying struct differences on the
currently supported platforms, I kept the same calling pattern (as
in Get* and Free*) but converted them to use an intermediate data
structure that is defined in the PAL. We can then take in the
required data from the Managed World and determine which native
types are required, handle all the native structs and casts, and
give back only the information that the managed code needs in a
much simpler format.
Commit migrated from https://github.com/dotnet/corefx/commit/f3191981b3739742e4f728b6a13a880abe12c5a6
`build.cmd /p:LockDependencies=true` was the start of this change, but some errors with xunit build numbers led to all xunit upgrades being reset back to what they had in master.
project.json changes:
* System.Net.Security\src Switch off of explicit beta versioning, use the same baseline as everyone else. The S.S.C.Algorithms explicit upgrade is no longer required.
* System.Net.Requests\tests didn't build. Looking at the project.lock.json change, it appeared that a System.Net.Http reference was lost, restored it.
* System.Net.Http\tests didn't build. Looking at the project.lock.json change, it appeared that a System.IO.FileSystem reference was lost, restored it.
* System.Net.WebSockets.Client\src didn't build. Looking at the project.lock.json change, it appeared that a System.Collections (4.0.10) reference was lost, restored it.
* System.Diagnostics.TextWriterTraceListener\tests needed the runtime reference to load the correct System.Diagnostics.TraceSource binary.
Commit migrated from https://github.com/dotnet/corefx/commit/cec3a0f2db542bfa9d9c56bf988d966eacc35ad9
The corefx build used an older beta5 version of DNX which hardcoded the path to bash in dnu, breaking the build on FreeBSD.
Updating DNX to the latest "stable" beta7 release fixes this.
After updating I noticed a few test projects didn't build anymore as they were missing some dependencies in project.json, added those.
Fixesdotnet/corefx#3173
Commit migrated from https://github.com/dotnet/corefx/commit/6df77fdbb6cf8e0d35a3074bb325f7810085daa3
Fix several warnings of the form:
```
warning MSB3277: Found conflicts between different versions of the s
ame dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
```
Brings the number of warnings during a full build back down to 0.
Commit migrated from https://github.com/dotnet/corefx/commit/fc09b0b21a2c5dd6c5e4ee5df203b2f8def30e76
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions. Assemblies with API differences
get a minor version bump. Assemblies with only bugfixes get a build version
bump.
In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.
[tfs-changeset: 1514419]
Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae