Age | Commit message (Collapse) | Author | Files | Lines |
|
* keep what's allocated so far on each heap
* Implement GC.GetTotalAllocatedBytes
It is based on https://github.com/dotnet/corefx/issues/34631 and https://github.com/dotnet/corefx/issues/30644
* Fixing races related to dead_threads_non_alloc_bytes
* separated per-heap SOH and LOH counters. Different locks imply that we need different counters.
* allow/ignore torn 64bit reads on 32bit in imprecise mode.
* PR feedback
* simplified the test a little to avoid OOM on ARM
|
|
* Do not expand to allocation_quantum in SOH when GC_ALLOC_ZEROING_OPTIONAL
* short-circuit short arrays to use `new T[size]`
* Clean syncblock of large-aligned objects on ARM32
* specialize single-dimensional path AllocateSzArray
* Unit tests
* Some PR feedback. Made AllocateUninitializedArray not be trimmed away.
* PR feedback on gchelpers
- replaced use of multiple bool parameters with flags enum
- merged some methods with nearly identical implementation
- switched callers to use AllocateSzArray vs. AllocateArrayEx where appropriate.
* PR feedback. Removed X86 specific array/string allocation helpers.
|
|
* Workaround memset alignment sensitivity
memset is up to 2x slower on misaligned block on some types of hardware. The problem is uneven performance of "rep stosb"
used to implement the memset in some cases. The exact matrix on when it is slower and by how much is very complex.
This change workarounds the issue by aligning the memory block before it is passed to memset and filling in the potential misaligned
part manually. This workaround will regress performance by a few percent (<10%) in some cases, but we will gain up to 2x improvement
in other cases.
Fixes #24300
|
|
|
|
|
|
* Add exception counter
* Fix build
* Make FCall return UINT32
* Move GetExceptionCount to Exception
* more PR comments, fix x86 build
* Remove global variable initialization
|
|
|
|
* Move MemoryFailPoint to shared CoreLib partition.
* Split MemoryFailPoint into Unix and Windows versions.
* Replace MemoryFailPoint.GetMemorySettings FCall with GC.GetSegmentSize to make sharing with CoreRT easier.
|
|
* Cleanup Array FCalls
* Disable outdated CoreFX tests
https://github.com/dotnet/corefx/pull/34700
|
|
for finalize queue (#20363)
|
|
is to be used by BCL for deciding when to trim memory usage in pooling code
|
|
|
|
* Remove libuuid usage
This change removes dependency on the libuuid library that is used for GUID creation only.
It implements it using a random generator instead.
It also modifies return type of PAL_Random to VOID since it was always
returning TRUE and none of the existing callers were checking it.
1. Port the GUID creation to managed code.
2. Modify the PAL_Random to have 6 times better perf so that the perf of the
CoCreateGuid that is used in the native runtime doesn't degrade that much
w.r.t the previous state when the libuuid was used.
3. Use Interop.GetRandomBytes on Unix and fix Windows
|
|
Fixes #16545
|
|
Replace TypedReference with Unsafe.As, it generates far less code and, with the help of AggresiveInlining, it allows Exchange<T> to inline.
|
|
- Get TaskToApm in sync with CoreFX copy and move it to shared CoreLib partition
- Delete redundant __Error file
- Delete remaining uses of InternalBlockCopy and replace it with BlockCopy
|
|
- Delete BCLDebug and related types since it was replaced by the public System.Diagnostic.Debug
- Preserve commented out or conditionally compiled logging in a few place where it seemed potentially useful
Fixes #11389
|
|
- Delete correctness, performance and safe handle stacktrace logging
- Change remaining BCLDebug.Assert uses to Debug.Assert
|
|
|
|
* Remove always defined FEATURE_RANDOMIZE_STRING_HASHING
* Fully remove randomized hashing
* Leftovers
* Remove additionalEntropy from HashSortKey as it was always 0
* Remove additionalEntropy from HashString as it was always 0
* Change to private, as not in fact called by reflection in .NET Core
* Fix build break due to FCDECLn
* Revert removed QCALL
* Remove unused strlen parameter
|
|
Other than `ContainsPointers` and `IsNotTightlyPacked`, added two new conditions for checking whether a valuetype can go to fast path or not. Following are the details of these 2 conditions:
- Check whether a valuetype contains a Single/Double field. If it does, we cannot go to fast path. Floating point numbers have special `Equals` and `GetHashCode` implementation. We cannot simply compare floating point numbers via bits (e.g. +0.0 should equal to -0.0, but their underlying bits are different).
- Check whether an user-defined valuetype overrides `Equals` or `GetHashCode`. If it does, we cannot go to fast path. Because `Equals` or `GetHashCode` result may be different to bit comparison.
To find Single/Double fields and overridden `Equals`/`GetHashCode`, we start a DFS to go through the whole hierachy of the source valuetype, and cache the result to `MethodTable`.
Fix #11452
|
|
interface (#10463)
* [Local GC] BOOL -> bool on IGCHeap
* [Local GC] size_t -> void* on IGCHeap
* [Local GC] Silence warnings by being explicit about BOOl -> bool conversions
* Address code review feedback: FinalizeAppDomain BOOL -> bool
* Fix warnings
* Address code review feedback:
1) Fix a missed default parameter (FALSE) on a parameter of type bool,
2) Fix invocations of the diagnostic callbacks to use boolean literals
instead of TRUE and FALSE,
3) Fix various invocations of GC interface methods in the VM to use
boolean literals instead of TRUE and FALSE
* Address code review feedback: fix inconsistency
|
|
Contributes to #16799
|
|
Improve span copy of pointers and structs containing pointers
Fixes #9161
PR #9786 fixes perf of span copy of types that don't contain references
|
|
|
|
|
|
|
|
This reverts commit 751771a8976f909af772e35c167bd7e3ffbe44c8.
|
|
|
|
|
|
* update JIT_MemSet/MemCpy, Buffer::BlockCopy and Buffer::InternalBlockCopy
* add header comments
|
|
modifying the VM to utilize this interface.
Introduce an interface separating the GC and the rest of the VM
Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM.
Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC.
Split each interface function into categories, document them, use consistent formatting across the interface
Undo some accidental find/replace collateral damage
Remove all ifdefs from the GC interface
Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build
Paper cut: false -> nullptr
Repair the ARM and x86 builds
Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback
Rebase against master
Rename gcholder.h/cpp -> gcheaputilities.h/cpp
Fix an uninitialized field on alloc_context causing test failures on clang
Rename the include guard for gcheaputilities.h
Un-breaks SOS by making the following changes:
1) Instructs the DAC to look for IGCHeap::gcHeapType by name,
instead of assuming that it exists near g_pGCHeap,
2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot
dispatch on an object in another process,
3) Because of 2, expose the number of generations past the GC interface
using a static variable on IGCHeap that the DAC can read directly.
repair the Windows build
|
|
|
|
|
|
* Generalize Buffer.BlockCopy optimization for either src or dst
|
|
|
|
|
|
|
|
- Remove older reflection-based detection of overrides from SyncStream
- Remove Tuple allocation from RunReadWriteTaskWhenReady
- Fix spelling of Overridden
- Add a few comments
|
|
|
|
This change adds support for basic Unicode collation support, built on
top of ICU. Windows and ICU have different collation models, and the
windows model does not correspond 1:1 with the ICU model, so in addition
to differences in sort weights between the two platforms, the
CompareOptions enum does not map nicely to ICU options.
For now, we only map CompareOptions.None, CompareOptions.IgnoreCase as
well as CompareOptions.Ordinal and CompareOptions.OrdinalIngoreCase,
other CompareOptions are ignored during collation.
In addition to collation support, I have enabed the randomized string
hashing code (using Marvin32 + a per app domain seed) so that string
hashcodes are not predictable across runs.
|
|
FC_TypedByRef is defined as TypedByRef& for now to workaround the mismatch between managed and native struct calling convention.
|
|
This mode lets users to specify an allocation amount for which no GCs would happen. Sometimes during the absolutely performance critical paths users have the desire to allocate without interference from the GC. If there is enough memory, GC will not kick in while this mode is set.
[tfs-changeset: 1421386]
|
|
Perform validity checks to ensure parameters are correct but short-circuit
out memmove when exactly the same data would be copied to the same location.
There are a number of occasions; which can be intentional or unintentional,
where the buffer being copied is the same place - e.g an internal buffer is
the same as the return buffer, and there is no need to call memmove's
overwrite safe copy.
Generally the call to BlockCopy will be in a library so it is more practical
to enable the check here rather than alter all the calling functions,
including 3rd party libraries to preform additional checks.
|
|
[tfs-changeset: 1407945]
|