1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00
Satori/docs
David Wrighton dacf9dbdd4
Change temporary entrypoints to be lazily allocated (#101580)
* WorkingOnIt

* It basically works for a single example.

Baseline
Loader Heap:
----------------------------------------
System Domain:        7ffab916ec00
LoaderAllocator:      7ffab916ec00
LowFrequencyHeap:     Size: 0xf0000 (983040) bytes total.
HighFrequencyHeap:    Size: 0x16a000 (1482752) bytes total, 0x3000 (12288) bytes wasted.
StubHeap:             Size: 0x1000 (4096) bytes total.
FixupPrecodeHeap:     Size: 0x168000 (1474560) bytes total.
NewStubPrecodeHeap:   Size: 0x18000 (98304) bytes total.
IndirectionCellHeap:  Size: 0x1000 (4096) bytes total.
CacheEntryHeap:       Size: 0x1000 (4096) bytes total.
Total size:           Size: 0x3dd000 (4050944) bytes total, 0x3000 (12288) bytes wasted.

Compare
Loader Heap:
----------------------------------------
System Domain:        7ff9eb49dc00
LoaderAllocator:      7ff9eb49dc00
LowFrequencyHeap:     Size: 0xef000 (978944) bytes total.
HighFrequencyHeap:    Size: 0x1b2000 (1777664) bytes total, 0x3000 (12288) bytes wasted.
StubHeap:             Size: 0x1000 (4096) bytes total.
FixupPrecodeHeap:     Size: 0x70000 (458752) bytes total.
NewStubPrecodeHeap:   Size: 0x10000 (65536) bytes total.
IndirectionCellHeap:  Size: 0x1000 (4096) bytes total.
CacheEntryHeap:       Size: 0x1000 (4096) bytes total.
Total size:           Size: 0x324000 (3293184) bytes total, 0x3000 (12288) bytes wasted.

LowFrequencyHeap is 4KB bigger
HighFrequencyHeap is 288KB bigger
FixupPrecodeHeap is 992KB smaller
NewstubPrecodeHeap is 32KB smaller

* If there isn't a parent methodtable and the slot matches... then it by definition the method is defining the slot

* Fix a couple more issues found when running a subset of the coreclr tests

* Get X86 building again

* Attempt to use a consistent api to force slots to be set

* Put cache around RequiresStableEntryPoint

* Fix typo

* Fix interop identified issue where we sometime set a non Precode into an interface

* Move ARM and X86 to disable compact entry points

* Attempt to fix build breaks

* fix typo

* Fix another Musl validation issue

* More tweaks around NULL handling

* Hopefully the last NULL issue

* Fix more NULL issues

* Fixup obvious issues

* Fix allocation behavior so we don't free the data too early or too late

* Fix musl validation issue

* Fix tiered compilation

* Remove Compact Entrypoint logic

* Add new ISOSDacInterface15 api

* Fix some naming of NoAlloc to a more clear IfExists suffix

* Remove way in which GetTemporaryEntryPoint behaves differently for DAC builds, and then remove GetTemporaryEntrypoint usage from DAC entirely in favor of GetTemporaryEntryPointIfExists

* Attempt to reduce most of the use of EnsureSlotFilled. Untested, but its late.

* Fix the build before sending to github

* Fix unix build break, and invalid assert

* Improve assertion checks to validate that we don't allocate temporary entrypoints that will be orphaned if the type doesn't actually end up published.

* Remove unused parameters and add contracts

* Update method-descriptor.md

* Fix musl validation issue

* Adjust SOS api to be an enumerator

* Fix assertion issues noted
Fix ISOSDacInterface15 to actually work

* Remove GetRestoredSlotIfExists
- Its the same as GetSlot ....  just replace it with that function.

* Update src/coreclr/debug/daccess/daccess.cpp

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Update docs/design/coreclr/botr/method-descriptor.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Update src/coreclr/vm/methodtable.inl

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Update src/coreclr/vm/methodtable.h

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Fix GetMethodDescForSlot_NoThrow
Try removing EnsureSlotFilled
Implement IsEligibleForTieredCompilation in terms of IsEligibleForTieredCompilation_NoCheckMethodDescChunk

* Fix missing change intended in last commit

* Fix some more IsPublished memory use issues

* Call the right GetSlot method

* Move another scenario to NoThrow, I think this should clear up our tests...

* Add additional IsPublished check

* Fix MUSL validation build error and Windows x86 build error

* Address code review feedback

* Fix classcompat build

* Update src/coreclr/vm/method.cpp

Co-authored-by: Aaron Robinson <arobins@microsoft.com>

* Remove assert that is invalid because TryGetMulticCallableAddrOfCode can return NULL ... and then another thread could produce a stable entrypoint and the assert could lose the race

* Final (hopefully) code review tweaks.

* Its possible for GetOrCreatePrecode to be called for cases where it isn't REQUIRED. we need to handle that case.

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2024-07-14 12:20:21 -07:00
..
coding-guidelines Replace net8 with net9 under docs (#104189) 2024-06-29 07:44:01 -04:00
design Change temporary entrypoints to be lazily allocated (#101580) 2024-07-14 12:20:21 -07:00
infra FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning (#99169) 2024-03-06 22:39:50 -08:00
issue-mappings Old repo issue number mapped to new repo issue number (#31981) 2020-02-08 12:20:38 -08:00
project Update SYSLIB0026 with new message 2024-07-10 10:35:18 -04:00
tools/illink Fix type parsing issues in ILLink and ILC (#104060) 2024-07-12 14:07:32 -07:00
workflow Add fedora in install script (#104860) 2024-07-14 09:37:16 -07:00
area-owners.md updating mono reflection area path ownership (#104568) 2024-07-08 17:03:45 -07:00
deep-dive-blog-posts.md Add Performance Improvements in .NET 8 to deep-dive-posts.md (#92003) 2023-09-13 11:26:06 -04:00
issue-cleanup.md Add issue cleanup documentation and update automation (#69857) 2022-05-30 11:34:44 +01:00
issues-pr-management.md Quick doc formatting update to test checkout without bundle. 2021-01-14 11:28:34 -08:00
README.md Add dotnet/designs link to docs README (#104155) 2024-06-28 12:11:23 -07:00

Documents Index

This repo includes several documents that explain both high-level and low-level concepts about the .NET runtime and libraries. These are very useful for contributors, to get context that can be very difficult to acquire from just reading code.

Intro to .NET

.NET is a self-contained .NET runtime and framework that implements ECMA 335. It can be (and has been) ported to multiple architectures and platforms. It support a variety of installation options, having no specific deployment requirements itself.

Getting Started

Workflow (Building, testing, benchmarking, profiling, etc.)

If you want to contribute a code change to this repo, start here.

Design Docs

The Book of the Runtime is a set of chapters that go in depth into various interesting aspects of the design of the .NET Framework.

For your convenience, here are a few quick links to popular chapters:

For additional information, see this list of blog posts that provide a 'deep-dive' into the CoreCLR source code

Coding Guidelines

Project Docs

To be added. Visit the project docs folder directly meanwhile.

Other Information