Some more GlobalLog.IsEnabled guards. I noticed a few while doing some other profiling, and so did another set of searches across the whole codebase. Many of these came from the System.Net.Security PRs that were in-progress at the same time I was doing the previous logging changes.
Commit migrated from https://github.com/dotnet/corefx/commit/a04c9898b9bc6d06cd42e1dfd93a63633da4dd30
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
This is the only place in all of corefx (outside of the X509Certificates tests) that instantiates an X509Certificate object (instead of an X509Certificate2).
Since the property still return an X509Certificate(1), the callers would have to cast it to use the X509Certificate2-only properties, but now an `as` will suffice, whereas before it required an up-converting operation.
Commit migrated from https://github.com/dotnet/corefx/commit/4db0e714272a195fc29d6f904ad6bb3422e94e43
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
* Split the Unix and Windows project.json files for System.Net.Security since they have different dependencies at the implementation level.
* Use the managed IdnMapping to do the IDNA rules application
* Update comments in the native half of the match logic
This was verified against a private domain which uses a mix of ASCII and non-ASCII characters.
* Lowercase punycode form: Success before, success after
* Mixed-case punycode form: Failed before, success after
* Unicode form: Failed before, success after.
Commit migrated from https://github.com/dotnet/corefx/commit/d573223a0d99d41daf8ed26fa89647894a9770da
Build on the CI is complaining about missing base types for many
reference assemblies (where we only pass the compiler direct
references, trimming transitive dependencies).
Additionally I removed the test data packages from some tests
because, of course, they were not directly referenced :).
Commit migrated from https://github.com/dotnet/corefx/commit/3348234db28a1c186f0bab9b0437bc48a81d0ad2