diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-11-30 23:21:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 23:21:40 -0800 |
commit | c1e44d9db9cc0d03e5f44af665acefa3589a6883 (patch) | |
tree | 2b9ad535324b85548de84a5eec8eabfe39ca3de5 /src/debug | |
parent | 845c2c248c6450107acd37c5469f56d05b391183 (diff) | |
download | coreclr-c1e44d9db9cc0d03e5f44af665acefa3589a6883.tar.gz coreclr-c1e44d9db9cc0d03e5f44af665acefa3589a6883.tar.bz2 coreclr-c1e44d9db9cc0d03e5f44af665acefa3589a6883.zip |
Jumpstub fixes (#15296)
- 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.
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/daccess/fntableaccess.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/debug/daccess/fntableaccess.h b/src/debug/daccess/fntableaccess.h index b5ea5452f6..36e5d8f673 100644 --- a/src/debug/daccess/fntableaccess.h +++ b/src/debug/daccess/fntableaccess.h @@ -41,9 +41,7 @@ struct FakeHeapList DWORD_PTR mapBase; // changed from PBYTE DWORD_PTR pHdrMap; // changed from DWORD* size_t maxCodeHeapSize; - DWORD cBlocks; - bool bFull; // Heap is considered full do not use for new allocations - bool bFullForJumpStubs; // Heap is considered full do not use for new allocations of jump stubs + size_t reserveForJumpStubs; }; typedef struct _FakeHpRealCodeHdr |