summaryrefslogtreecommitdiff
path: root/Documentation/design-docs
AgeCommit message (Collapse)AuthorFilesLines
2019-04-16Update ContextualReflection doc (#24018)Steve MacLean1-49/+91
* Update ContextualReflection doc * PR Feedback
2019-04-08Allow reabstraction of default interface methods (#23313)Michal Strehovský1-4/+5
Allow the runtime to load types with incomplete interface implementations. With this change, we allow (in pseudo-C#): ```csharp interface IFoo { void Frob() { } } interface IBar : IFoo { abstract void IFoo.Frob() } class Fooer : IBar { } ``` Calling IFoo.Frob on an instance of `Fooer` will result in new exception being thrown because the default implementation of `IFoo.Frob` was re-abstracted by `IBar`.
2019-03-29A new way of tracking variables (#23373)Brian Bohe1-0/+344
* Defining VariableLiveRange class * Adding some typedefs to avoid rewriting * Defining VariableLiveDescriptor class * Initializing VariableLiveRange structures before BasicBlock code is being generated * Getting a siVarLoc for variable homes from a given LclVarDsc and stack level * Defining VariableLiveKeeper class * Reporting VariableLiveRanges on changes of variable livenesss or variable homes * Adding USING_VARIABLE_LIVE_RANGE flag to enable disable VariableLiveRange * Send VariableLiveRanges to debugger * Reporting variable homes on prolog * Wrong argument * Miss to change variable homes count before sending them to debugger * Adding dumper of VariableLiveRanges for each blocks and end of code generation * Close all open VaribleLiveRanges on last BasicBlock * Changing order of properties initialization on VariableLiveRange constructor * Type error on assignation * Rephrasing comments, moving dumps and fixing typos * Changing const VARSET_TP* for VARSET_VALARG_TP on args * Variable home was variable location in VariableLiveRange context * Rephrase and rename of VariableLiveKeeper properties * Missing some renames * Adding const where BasicBlock should not be modified * siBeginBlock and siInit have support for debug code for VariableLiveRange and siScope info * Adding USING_VARIABLE_LIVE_RANGE flags on methods definition. * Variable home -> variable location * Renaming and rephrasing names and uses of VariableLiveRange * Moving LiveRangeDumper ctor to class declation * Removing destructors Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Removing blank spaces and reordering functions inside class definition Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Miss to increment the index after refactoring * Logic for keeping the last BasicBlock end IL offset is shared between siScope and VariableLiverange for debug code * Missing to print on debug the last block VariableLiveRanges * Avoid updating VariableLiveRange when unspilling and dying at the same assembly instruction * Rephrasing #ifs and #ifdefs * Calling VariableLiveKeeper in one line * Avoid copying siVarLoc on genSetScopeInfo * Removing unused args from eeSetLVinfo * Changing VariableLiveKeeper ctor * Typo Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Updating VariableLiveDescriptor ctor Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Error on first argument Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Changing reference for pointer Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Renaming assembly offset -> native offset * removing unnecesary comments and asserts Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Update VariableLiveRange dump message Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Moving VariableLiveRanges classes inside VariableLiveKeeper * Wrong flag name * Adding documentation about how we track variables for debug info Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Adding opened issues to doc file Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Changing dump tittle Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Renaming VariableLiveKeeper property Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Update documentation Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Updating comments on flags Signed-off-by: Brian Bohe <brianbohe@gmail.com> * Setting Scope Info as default way of tracking variables for debug info Signed-off-by: Brian Bohe <brianbohe@gmail.com>
2019-03-27Update DllMap doc (#22804)Swaroop Sridhar1-270/+16
* Update DllMap doc Update DllMap design doc: * To note the NativeLibrary APIs that can be used to implement DllMap * To point to a sample implementation of DllMap.
2019-03-27Add ALC.ContextualReflection.md (#23335)Steve MacLean1-0/+279
2019-03-18Update assemblyloadcontext.md (#23318)Mathias Lykkegaard Lorenzen1-1/+1
2019-03-16Fix typo (#23300)Nikita Potapenko5-9/+9
.Net -> .NET
2019-03-08Update eventcounter spec (#23142)Sung Yoon Whang1-2/+0
2019-03-05Update eventcounter spec (#23019)Sung Yoon Whang1-17/+28
* Update EventCounter spec * some wording fix * some wording fix * fix payload example * Add DisplayRateTimeScale
2019-02-26Update EventCounter spec (#22852)Noah Falk1-12/+48
* Update EventCounter spec We made a flurry of decisions in our meeting last wednesday. Partly this fills in areas of the design we didn't adequately decide on and partly this suggests a few changes after having had time to think on it. 1) My suggestion to use IntervalSec as an identifier for a series doesn't work. I proposed a new field 'Series' that is used for that same purpose. 2) I am proposing we no longer standardize on the five-tuple of stats. Although it made sense to me at the time, decisions we made later in the meeting invalidated the basis for that choice IMO. 3) Aggregating seems like an overly generic name that all counters do, so I propose 'Incrementing' as a more specific term. 4) I am proposing we stop accepting fractional time intervals because probably nobody would have used them anyways and now we don't have to worry about floating point rounding and canonicalization issues when determining if two clients share the same time series or in round tripping the identifier back to them. 5) I defined specific fields for 'DisplayName' and 'CounterType' in our wire protocol. Although not opposed to a generic metadata field for other purposes, it seemed unnecessary for our current purposes. 6) I switched Incrementing coutner to float, because it it would be a shame if we had to make a whole new counter in the future that did exactly the same thing just with floating point values. For example 'GC Seconds Paused'
2019-02-26Spec for EventCounter changes (#22811)Noah Falk1-0/+66
2019-02-05Add draft default interface methods specification (#21564)Michal Strehovský1-0/+52
2019-01-31Add design document for unloadability (#22166)Jan Vorlicek2-0/+423
* Add design document for the unloadability
2019-01-11Patch vtable slots and similar when tiering is enabled (#21292)Koundinya Veluri1-8/+1
Patch vtable slots and similar when tiering is enabled For a method eligible for code versioning and vtable slot backpatch: - It does not have a precode (`HasPrecode()` returns false) - It does not have a stable entry point (`HasStableEntryPoint()` returns false) - A call to the method may be: - An indirect call through the `MethodTable`'s backpatchable vtable slot - A direct call to a backpatchable `FuncPtrStub`, perhaps through a `JumpStub` - For interface methods, an indirect call through the virtual stub dispatch (VSD) indirection cell to a backpatchable `DispatchStub` or a `ResolveStub` that refers to a backpatchable `ResolveCacheEntry` - The purpose is that typical calls to the method have no additional overhead when code versioning is enabled Recording and backpatching slots: - In order for all vtable slots for the method to be backpatchable: - A vtable slot initially points to the `MethodDesc`'s temporary entry point, even when the method is inherited by a derived type (the slot's value is not copied from the parent) - The temporary entry point always points to the prestub and is never backpatched, in order to be able to discover new vtable slots through which the method may be called - The prestub, as part of `DoBackpatch()`, records any slots that are transitioned from the temporary entry point to the method's at-the-time current, non-prestub entry point - Any further changes to the method's entry point cause recorded slots to be backpatched in `BackpatchEntryPointSlots()` - In order for the `FuncPtrStub` to be backpatchable: - After the `FuncPtrStub` is created and exposed, it is patched to point to the method's at-the-time current entry point if necessary - Any further changes to the method's entry point cause the `FuncPtrStub` to be backpatched in `BackpatchEntryPointSlots()` - In order for VSD entities to be backpatchable: - A `DispatchStub`'s entry point target is aligned and recorded for backpatching in `BackpatchEntryPointSlots()` - The `DispatchStub` was modified on x86 and x64 such that the entry point target is aligned to a pointer to make it backpatchable - A `ResolveCacheEntry`'s entry point target is recorded for backpatching in `BackpatchEntryPointSlots()` Slot lifetime and management of recorded slots: - A slot is recorded in the `LoaderAllocator` in which the slot is allocated, see `RecordAndBackpatchEntryPointSlot()` - An inherited slot that has a shorter lifetime than the `MethodDesc`, when recorded, needs to be accessible by the `MethodDesc` for backpatching, so the dependent `LoaderAllocator` with the slot to backpatch is also recorded in the `MethodDesc`'s `LoaderAllocator`, see `MethodDescBackpatchInfo::AddDependentLoaderAllocator_Locked()` - At the end of a `LoaderAllocator`'s lifetime, the `LoaderAllocator` is unregistered from dependency `LoaderAllocators`, see `MethodDescBackpatchInfoTracker::ClearDependencyMethodDescEntryPointSlots()` - When a `MethodDesc`'s entry point changes, backpatching also includes iterating over recorded dependent `LoaderAllocators` to backpatch the relevant slots recorded there, see `BackpatchEntryPointSlots()` Synchronization between entry point changes and backpatching slots - A global lock is used to ensure that all recorded backpatchable slots corresponding to a `MethodDesc` point to the same entry point, see `DoBackpatch()` and `BackpatchEntryPointSlots()` for examples Due to startup time perf issues: - `IsEligibleForTieredCompilation()` is called more frequently with this change and in hotter paths. I chose to use a `MethodDesc` flag to store that information for fast retreival. The flag is initialized by `DetermineAndSetIsEligibleForTieredCompilation()`. - Initially, I experimented with allowing a method versionable with vtable slot backpatch to have a precode, and allocated a new precode that would also be the stable entry point when a direct call is necessary. That also allows recording a new slot to be optional - in the event of an OOM, the slot may just point to the stable entry point. There are a large number of such methods and the allocations were slowing down startup perf. So, I had to eliminate precodes for methods versionable with vtable slot backpatch and that in turn means that recording slots is necessary for versionability.
2018-12-21Update tiering guide to reference the new TieredCompilation label (#21618)Koundinya Veluri1-3/+3
2018-12-06Guarded devirtualization foundations (#21270)Andy Ayers8-0/+533
Lay the groundwork for guarded devirtualization of virtual and interface calls in the jit. Introduce the notion of a guarded devirtualization candidate and identify these if regular devirtualization fails. Use simple heuristics to produce a class to guess for. Require that the method that would be invoked if the class guess is correct be a plausible inline candidate. Generalize the calli transformer to become an indirect call transformer. This runs after importation because it needs to introduce control flow and runs before inlining so that the new direct calls it introduces can be inlined. Implement the transformation to duplicate the call site, devirtualize on the side where the class is now known exactly, and turn the resulting direct call into an inline candidate. Add a motivation and design document.
2018-12-03Clarify use of LoadFromAssemblyName method (#21256)Rui1-2/+8
2018-10-08Document describing upcoming object stack allocation work. (#20251)Eugene Rozenfeld1-0/+199
2018-10-05Update the dllmap design doc (6)annaaniol1-17/+19
2018-10-05Update the dllmap design doc (5)annaaniol1-121/+111
2018-10-05Update the dllmap design doc (4)annaaniol1-13/+15
2018-10-05Update the dllmap design doc (3)annaaniol1-12/+14
2018-10-05Update the dllmap design doc (2)annaaniol1-8/+29
2018-10-05Update the dllmap design docannaaniol1-66/+90
2018-10-05Add a dllmap design documentannaaniol1-0/+246
2018-09-14Add short guide for using tiered compilation and how to provide feedback ↵Koundinya Veluri1-0/+55
(#19773) * Add short guide for using tiered compilation and how to provide feedback * Suggested changes * Update to say that it's enabled by default * Add info about target framework/runtime
2018-08-29Typos (#19737)John Doe5-6/+6
* testsing -> testing * reclaming -> reclaiming * oppurtunity -> opportunity * implemenation -> implementation * indicaates -> indicates * enregisterd -> enregistered * compuations -> computations * convinient -> convenient * intution -> intuition * Communicaton -> Communication
2018-08-01Add a spec for tiered compilation (#19207)Noah Falk1-0/+95
Add a spec for tiered compilation
2018-07-25Update CoreFX documentation (#19092)Andon Andonov1-0/+69
* Update CoreFX documentation * Add test binary refresh and parallelization sections * Add test exclusion information
2018-06-19Typo (#18550)John Doe4-6/+6
* accesible -> accessible * acheive -> achieve * addtional -> additional * affars -> affairs * approch -> approach * archtecture -> architecture * aritmetic -> arithmetic * arquired -> acquired * assigments -> assignments * assmblies -> assemblies
2018-05-29Design doc for struct passingCarol Eidt1-0/+147
2018-05-15Update first-class-structs.mdCarol Eidt1-1/+21
2018-05-14Update first-class-structs.mdCarol Eidt1-4/+1
fix duplication
2018-05-14Update first-class-structs.mdCarol Eidt1-20/+29
Add some struct-related open issues to the document.
2018-01-16[Arm64] Add arm64-intrinsics.md (#15343)Steve MacLean1-0/+476
* [Arm64] Add arm64-intrinsics.md * Revise arm64-intrinsics Respond to feedback Revise namespace recommendations Add goals Fix namespace vs. class issues Add API review details * Revise arm64-intrinsics doc Respond to feedback Add specific class table Clean up typos and whitespace * Revise review process proposal * [Arm64] Add 8.2 extensions and cleanup * Add Jscvt, Lrcpc ... * Revise doc based on feedback * Further doc revisions * More review fixes
2018-01-11[Local GC] Introduce standalone eventing design document (#15570)Sean Gillespie1-0/+237
* Typing * First draft * Update the doc based on feedback * Next iteration based on feedback * Iteration feedback
2018-01-03Fix minor formatting issue in jit-call-morphing.mdmikedn1-2/+4
2017-12-13Lsra DocumentationCarol Eidt1-0/+960
Update LinearScan section of ryujit-overview.md, and add lsra-detail.md
2017-12-05Fixed some broken formatting (#15369)Matt Warren1-8/+8
2017-11-30Jumpstub fixes (#15296)Jan Kotas1-19/+8
- Reserve space for jump stubs for precodes and other code fragments at the end of each code heap segment. This is trying to ensure that eventual allocation of jump stubs for precodes and other code fragments succeeds. Accounting is done conservatively - reserves more than strictly required. It wastes a bit of address space, but no actual memory. Also, this reserve is not used to allocate jump stubs for JITed code since the JITing can recover from failure to allocate the jump stub now. Fixes #14996. - Improve algorithm to reuse HostCodeHeap segments: Maintain estimated size of the largest free block in HostCodeHeap. This estimate is updated when allocation request fails, and also when memory is returned to the HostCodeHeap. Fixes #14995. - Retry JITing on failure to allocate jump stub. Failure to allocate jump during JITing is not fatal anymore. There is extra memory reserved for jump stubs on retry to ensure that the retry succeeds allocating the jump stubs that it needs with high probability. - Respect CodeHeapRequestInfo::getRequestSize for HostCodeHeap. CodeHeapRequestInfo::getRequestSize is used to throttle code heap segment size for large workloads. Not respecting it in HostCodeHeap lead to too many too small code heap segments in large workloads. - Switch HostCodeHeap nibble map to be allocated on regular heap as part. It simplied the math required to estimate the nibble map size, and allocating on regular heap is overall goodness since it does not need to be executable.
2017-10-21Add original ARM64 JIT frame layout design documentBruce Forstall1-0/+362
2017-10-20[Local GC] Add a Standalone GC loader design document (#14435)Sean Gillespie1-0/+183
* Add a Standalone GC loader design document * First round of feedback: 1. Remove some stuff from the preamble that doesn't belong in a design document 2. Simplify the three-variable loading approach to just use one variable that contains the path of a GC to load. 3. Clean up the wording in a few places. 4. Remove the "state machine" section and reference to state machines in general.
2017-08-02Merge pull request #11456 from CarolEidt/EHWriteThruDocRussell C Hadley1-0/+33
Add an alternate algorithm done during LSRA
2017-07-24Add the runtime code versioning featurenoahfalk5-0/+414
This makes tiered compilation work properly with profiler ReJIT, and positions the runtime to integrate other versioning related features together in the future. See the newly added code-versioning design-doc in this commit for more information. Breaking changes for profilers: See code-versioning-profiler-breaking-changes.md for more details.
2017-05-08Add an alternate algorithm done during LSRACarol Eidt1-0/+33
2017-05-08Update doc with review feedback.Russell Hadley1-11/+89
Factor in additional exception cases from Andy and fix some wording from Joe.
2017-05-04Update first-class-structs.mdCarol Eidt1-1/+1
2017-05-04Update first-class-structs.mdCarol Eidt1-1/+1
2017-04-21Move xplat minidump doc to botr. (#11149)Mike McLaughlin1-80/+0
Change default minidump type to MiniDumpWithPrivateReadWriteMemory. Remove language about uploading triage dumps. Turn off diagnostic output.
2017-04-20Add the Linux minidump support documentation (#11087)Mike McLaughlin1-0/+80
Add the Linux minidump support documentation One minor fix to createdump.