-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fixup CodeFragmentHeap block allocation reporting #127298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2213,7 +2213,6 @@ TaggedMemAllocPtr CodeFragmentHeap::RealAllocAlignedMem(size_t dwRequestedSize | |
| if (dwSize < SMALL_BLOCK_THRESHOLD) | ||
| dwSize = 4 * SMALL_BLOCK_THRESHOLD; | ||
| pMem = ExecutionManager::GetEEJitManager()->AllocCodeFragmentBlock(dwSize, dwAlignment, m_pAllocator, m_kind); | ||
| ReportStubBlock(pMem, dwSize, m_kind); | ||
| } | ||
|
|
||
| SIZE_T dwExtra = (BYTE *)ALIGN_UP(pMem, dwAlignment) - (BYTE *)pMem; | ||
|
|
@@ -2227,6 +2226,8 @@ TaggedMemAllocPtr CodeFragmentHeap::RealAllocAlignedMem(size_t dwRequestedSize | |
| dwSize -= dwRemaining; | ||
| } | ||
|
|
||
| ReportStubBlock(pMem, dwSize, m_kind); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logging is going to be duplicating the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the intention is to have both reports and one is overlapped and then samples are corrected, then fec5107 is enough. That's the behavior of perf - so all good. |
||
|
|
||
| TaggedMemAllocPtr tmap; | ||
| tmap.m_pMem = pMem; | ||
| tmap.m_dwRequestedSize = dwSize; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we end up double reporting blocks if we don't call AllocCodeFragmentBlock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can end up grabbing it from the best fit path - that but since that got aligned down and returned during the if block right above this, that would cound as a separate block and should be reported separately