summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/src
AgeCommit message (Collapse)AuthorFilesLines
2019-07-28Fix nullability annotations for static (#25914)Stephen Toub7-7/+8
The compiler is now analyzing statics. Get compliant.
2019-07-18Make all event types nullable (#25752)Stephen Toub2-6/+6
Late-breaking design change: all events should be declared with nullable delegate types.
2019-07-18Remove now unnecessary !s / TODO-NULLABLE comments (#25749)Stephen Toub11-38/+38
* Remove !s and TODO-NULLABLE comments for [DoesNotReturn] * Remove !s and TODO-NULLABLE comments for [NotNullIfNotNull] * Remove !s and TODO-NULLABLE comments for writes via Interlocked.CompareExchange * Remove !s and TODO-NULLABLE comments for Debug.Assert on fields * Update/add several TODO-NULLABLE comments
2019-07-11Remove stale nullable !s and pragmas (#25640)Stephen Toub3-3/+3
Also update TODO-NULLABLE comments to be more specific where appropriate.
2019-07-09Let EventPipe threads sleep when no events are available (#25601)David Mason2-0/+27
Don't spin forever in EventListener when listening for EventPipe data
2019-07-08Adding DisplayUnits property to all the runtime counters (#25598)Sung Yoon Whang1-9/+9
2019-07-08Return HardLimitBytes from GCMemoryInfo.TotalAvailableMemoryBytes (#25437)Andy Hanson1-18/+21
* Add property HardLimitBytes to GCMemoryInfo This adds a new property HardLimitBytes. Unlike TotalAvailableMemoryBytes, this will reflect an explicitly set COMPLUS_GCHeapHardLimit. It will also reflect the fraction of a container's size that we use, where TotalAvailableMemoryBytes is the total container size. Normally, though, it is equal to TotalAvailableMemoryBytes. Fix #38821 * Remove HardLimitBytes; have TotalAvailableMemoryBytes take on its behavior * Fix typos * Separate total_physical_mem and heap_hard_limit so we can compute highMemoryLoadThresholdBytes and memoryLoadBytes * Do more work in gc.cpp instead of Gc.cs * Consistently end names in "Bytes"
2019-07-03Cleanup IL linker heuristic usage (#25547)Jan Kotas1-2/+2
Prep-work for using mainstream IL linker
2019-07-02Reduce allocations in GetLocale() (#25531)Ilya1-1/+1
2019-07-01Decrease EventListener buffer size (#25526)Sung Yoon Whang1-1/+3
* Reduce the default EventPipe circularBufferSize to 10MB for EventListener sessions * make it a static var instead of random # in the code
2019-07-01Delete dead code (#25513)Jan Kotas1-11/+0
2019-06-26Tweak nullable attribute per API review (#25443)Stephen Toub2-2/+3
2019-06-26Tweak some annotations on EventRegistrationTokenTable<T> (#25386)Santiago Fernandez Madero1-12/+9
2019-06-26Don't show AggressiveInlining items in exception stacks (#25408)Ben Adams1-2/+0
2019-06-25Fix incorrect signature of QCall (#25419)Mukul Sabharwal1-1/+1
2019-06-24Address last round of nullable feedback - S.Resources.ResourceManager, ↵Santiago Fernandez Madero3-25/+25
System.Reflection.Emit and ILGeneration (#25318) * Address nullable feedback for System.Resources.ResourceManager * Address nullable feedback for System.Reflection.Emit.ILGeneration * Address nullable feedback for System.Reflection.Emit * PR Feedback and clean-up redundant casts
2019-06-21Add EventPipe Processor Number support and make NetTrace the default … ↵Noah Falk3-2/+19
(#25276) * Add EventPipe Processor Number support and make NetTrace the default format The EventPipe header now has a Processor Number field. On windows we query the correct value, on other OSes we currently have a -1 placeholder, but the field is written to the format regardless. NetTrace is now the default format when using the environment variable, and the format must be explicitly configured when using the IPC channel or managed API. A parallel change in the diagnostics repo is changing dotnet-trace and dotnet-counter to specify nettrace format which means .NET devs should see nettrace almost exclusively from now on. If for whatever reason it is needed, NetPerf remains available if a scenario explicitly requests to use it. * PR feedback + attempting to fix broken tests
2019-06-21Remove several unnecessary string allocations (#25305)Stephen Toub6-65/+8
2019-06-20Revert "ILMarshaler Refactor (#21227)" (#25292)Jeremy Koritzinsky1-8/+8
This reverts commit 70febbad4bbe23326c26480b2848cdfe9fc8450c.
2019-06-19Address nullable feedback for S.T.Overlapped, S.Memory, S.R.InteropServices ↵Santiago Fernandez Madero3-4/+4
(#25214) * Address nullable feedback for System.Threading.Overlapped * Address nullable feedback for System.Memory * Address nullable for System.Runtime.InteropServices * Update xml comments and make CultureInfo nullable to match String.ToLower/Upper feedback * PR feedback: revert accepting null comparer in BinarySearch * Disable test that needs to be updated in corefx
2019-06-18ILMarshaler Refactor (#21227)Jeremy Koritzinsky1-8/+8
* Add support for fields to ILStubMarshalHome objects. * Make the specific code streams in the ILMarshaler private members. * Make home members private. * Move the IL code stream members back to being protected for the marshalers that override EmitMarshalArgumentCLRToNative instead of EmitMarshalArgumentContents/Space. * Convert virtual specifiers in overrides to override specifiers. * Remove unused and undefined member. * Cleanup a few missed virtual/override specifiers. * Refactor setup methods. Refactor some of the overrides to duplicate less code. * Refactor the setup stream and add some comments around how the ArgumentOverride/ReturnOverride marshalling system works. * Use the cleanup work list in SafeHandle marshalling since the work list is now implemented entirely in managed code. * Generalize DelegateCleanupWorkListElement -> KeepAliveCleanupWorkListElement and rename the managed entry point to match. * Refactor direct usage of the cleanup code stream in non-overridden marshalers to use the cleanup work list instead. * Refactor AsAny marshalling to fit into the regular ILMarshaler code-paths. * Move ILArgIteratorMarshaler over to the full ILMarshaler infrastructure. * Port ILBlittablePtrMarshaler over to not directly reference m_pcsMarshal. * Make the specific code streams private and have ILNativeArrayMarshaler fetch the one it needs from the NDirectStubLinker. * Devirtualize a method on ILMarshaler. * Fix broken metasig * Revert "Use the cleanup work list in SafeHandle marshalling since the work list is now implemented entirely in managed code." This reverts commit aedcdfb4830475ff8f4d582147cdc0eb497dd681. * Fix ILArgIteratorMarshaler. * Take 2 on using the cleanup work list for SafeHandles * Remove unused field * SafeHandleMarshaler doesn't need to have extra cleanup code when using the CleanupWorkList. * Move the rest of the SafeHandle marshalling into ArgumentOverride. * Moved Pinned Native Array special case into an ArgumentOverride. * Devirtualize * Remove invalid field hometype. * Make ILMarshaler::m_pslNDirect private. * Native Array marshalling fixes. * Fix STLOC->LDLOC mistakes. * Add override hook to allow a marshaler to request that byval contents are always converted to native even when not marked as In (i.e. explicitly marked only as Out). Used in AsAny for byval arrays. * PR Feedback. * Add explicit pinning path to ilmarshalers. * Move implementation of ILNativeArrayMarshaler::CanMarshalViaPinning to ilmarshalers.cpp. * Add missing override specifier. * Don't create a managed marshaler if we are able to marshal via pinning. Remove extraneous checks against pinning. * Convert ILWSTRMarshaler to use the MarshalViaPinning functions for its pinning fast-path. * Enable LPWSTR marshalling to fall back to allocating on the heap for large strings when stack-allocating for native space (byref in-only semantics). * PR Feedback.
2019-06-15Add active timer counter (#25186)Sung Yoon Whang1-0/+2
* Add active timer counter * fix typo
2019-06-14Move parts of RuntimeType to shared partition (#25176)Marek Safar1-431/+1
2019-06-14Optimize Activator.CreateInstance (#25145)Jan Kotas1-69/+38
* Optimize Activator.CreateInstance - Short-circuit Activator.CreateInstance<T>() for value types without default constructor - Cache default constructor delegate on RuntimeType instead of fixed-size singleton cache
2019-06-13Update Corelib to adapt to compiler nullability updatesStephen Toub10-31/+30
2019-06-12Fix a couple of annotations on Type (#25136)Santiago Fernandez Madero3-5/+5
* Fix a couple of annotations on Type * PR Feedback
2019-06-12Replace 'where T : object` with `where T : notnull`Stephen Toub11-44/+44
2019-06-12Fix nullable annotations on Binder.ReorderArgumentArrayStephen Toub1-1/+1
2019-06-12Remove defunct !s and update some TODO-NULLABLE commentsStephen Toub4-20/+18
2019-06-11Update IEquatable/IComparable<T> for nullability (#25053)Stephen Toub2-5/+12
We need to revise our use of nullable for `IComparable<T>` and `IEquatable<T>`: - For reference types that implement `IComparable<T>`, the implementation should use `IComparable<T?>`, e.g. `String : IComparable<String?>`, so that the type can be used in methods with a `where T : IComparable<T>` constraint: `IComparable<T>`'s contravariance then allows both `T` and `T?` to work as generic type arguments. - For reference types that implement `IEquatable<T>`, we can't take advantage of such contravariance, as by design `IEquatable<T>` is invariant (it would be a breaking change to make it contravariant, and even if it wasn't doing so is of questionable design given that equality and inheritance don't mix well). Given the current language design, we have little option but to explicitly make any reference type implementations of `IEquatable<T>` be oblivious, and also make all `where T : IEquatable<T>` constraints be oblivious. Otherwise, regardless nullable annotations, a developer will get a warning for using either or both of `T`/`T?` with any given method employing such a constraint.
2019-06-10Switch P/Invokes into libcoreclr for the PAL to QCalls (#25055)Jeremy Koritzinsky1-5/+7
* Switch PInvokes into libcoreclr to QCalls * Register QCalls in runtime. Remove pal exports from libcoreclr * Alphabetize new ecalllist.h entries * Remove W suffixes from native side of QCall * Interop signatures are in nested classes (which doesn't show up here) in the root namespace. So we don't want to pass a namespace in here * Convert the interop test in R2R to use a local native library instead of calling into the CoreCLR PAL via DllImport.
2019-06-10Add support for the NetTrace EventPipe file formatnoahfalk1-1/+17
Right now the new format is not on by default, but it can be enabled using COMPlus_EventPipeNetTraceFormat = 1 for testing purposes. The plan to have a follow up PR that will add shipping configuration mechanisms and change the default setting. See the documentation in the PerfView repo for more details about the format. At a glance the goal is to create a format that is more efficient to produce, has a smaller on disk size, and offers enhanced functionality in a few areas: a) 64 bit thread id support b) Detection of dropped events via sequence numbers c) Better support for extracting subsets of the file Together with the change there was also some refactoring of the EventPipeBufferManager and EventPipeThread. This change addresses (at least in part) the following issues: #19688, #23414, #24188, #20751, #20555, #21827, #24852, #25046
2019-06-10Use SIZE_T for SectionSize in RegisterFrozenSegment (#25044)Mukul Sabharwal1-1/+1
2019-06-07Fix AppDomain issues (#25019)Steve MacLean2-4/+4
Populate AppDomain.CurrentDomain when invoking events Make AppDomain method implemented in AssemblyLoadContext internal
2019-06-07Address nullable feedback for System.Runtime and System.Runtime.Extensions ↵Santiago Fernandez Madero3-3/+6
(#25017) * Address last nullable feedback from System.Runtime * Address nullable feedback for System.Runtime.Extensions * PR Feedback
2019-06-05Less work for OptimalMaxSpinWaitsPerSpinIteration fast-path (#21702)Ben Adams1-11/+13
2019-06-05Merge pull request #24937 from safern/FixNullableAnnotationsApiReviewSantiago Fernandez Madero29-142/+90
Fix some nullable annotations from API Review
2019-06-04Synchronize managed and unmanaged Variant fields (#24951)Jan Kotas1-118/+79
* Synchronize managed and unmanaged Variant fields Fixes #24948
2019-06-04More PR FeedbackSantiago Fernandez Madero4-51/+20
2019-06-04PR FeedbackSantiago Fernandez Madero8-17/+12
2019-06-03PR FeedbackSantiago Fernandez Madero18-68/+26
2019-06-03Fix some nullable annotations from API ReviewSantiago Fernandez Madero23-49/+75
2019-06-03Specify TaskScheduler.Default in EventPipeEventDispatcher (#24930)Stephen Toub1-1/+1
Just in case there's a non-default TaskScheduler in play, explicitly specify TaskScheduler.Default so that we don't accidentally schedule this task to another scheduler, in which case it's up to that scheduler if and how to respect the LongRunning request.
2019-06-03Fix signature mismatch between managed and unmanaged GetCodeInfo signatures ↵Jan Kotas2-4/+4
(#24932) Fixes #24925
2019-06-03Adjust several `where T : class?` constraints (#24894)Stephen Toub1-0/+2
* Adjust several `where T : class?` constraints * Address PR feedback
2019-05-30Add Environment.TickCount64 (#24857)Stephen Toub1-1/+11
2019-05-29Stop specifying cdecl for ComponentEntryPoint (default to stdcall) (#24833)Elinor Fung1-1/+0
2019-05-28Create the Concept of Multiple EventPipe Sessions (#24417)José Rivero2-11/+3
This is the initial work to enable https://github.com/dotnet/coreclr/issues/15377 ## What's here? - A lot of code move/split. Some important moves: - `EventPipe` has a colection of `EventPipeSessions` instead of a single session. - `EventPipeSession` now owns a `EventPipeBufferManager` and a `EventPipeFile` - `EventPipeThread` now owns a collection of { EventPipeBufferManager, EventPipeBuffer }, and a collection of { EventPipeBufferManager, EventPipeBufferList } - There is a cap on the max number of `EventPipeSession` (64 sessions) - `EventPipeProvider` and `EventPipeEvent` use a 64-bit mask to keep track of the sessions that are listening to provider/events. ## What's pending? https://github.com/dotnet/coreclr/issues/24753
2019-05-28Rename CreateNativeDelegate -> LoadAssemblyAndGetFunctionPointer (#24804)Elinor Fung1-9/+9
Change extensibility parameter to void *
2019-05-28Using AllocateUninitializedArray in array pool (#24504)Vladimir Sadov1-0/+5
* Just use `new T[]` when elements are not pointer-free * reduce zeroing out when not necessary. * use AllocateUninitializedArray in ArrayPool