Skip to content
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

Add faster DAC EnumMemoryRegion option with less memory usage #74300

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

mikem8361
Copy link
Member

Issue: #72148

Instead of drilling down into all the individual MT/MD/EEClass, etc. data structures, add the LoaderAllocator/LoaderHeaps regions directly.

Add new CLRDATA_ENUM_MEM_HEAP2 flag for the fast path.

To reduce risk of incomplete core dumps this is enabled by the COMPlus_EnableFastHeapDumps env var. This env var is only looked at by the Linux/MacOS createdump. It is currently ignored on Windows. The new HEAP2 flag is works when passed to the EnumMemoryRegions API on Windows but createdump can't set it because MiniDumpWriteDump in dbghelp.dll loads/calls the DAC API.

Fix MacOS dlopen error message

Issue: dotnet#72148

Instead of drilling down into all the individual MT/MD/EEClass, etc. data structures, add the LoaderAllocator/LoaderHeaps regions directly.

Add new CLRDATA_ENUM_MEM_HEAP2 flag for the fast path.

To reduce risk of incomplete core dumps this is enabled by the COMPlus_EnableFastHeapDumps env var. This env var is only looked at by
the Linux/MacOS createdump. It is currently ignored on Windows. The new HEAP2 flag is works when passed to the EnumMemoryRegions API
on Windows but createdump can't set it because MiniDumpWriteDump in dbghelp.dll loads/calls the DAC API.

Fix MacOS dlopen error message
@ghost
Copy link

ghost commented Aug 20, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Issue: #72148

Instead of drilling down into all the individual MT/MD/EEClass, etc. data structures, add the LoaderAllocator/LoaderHeaps regions directly.

Add new CLRDATA_ENUM_MEM_HEAP2 flag for the fast path.

To reduce risk of incomplete core dumps this is enabled by the COMPlus_EnableFastHeapDumps env var. This env var is only looked at by the Linux/MacOS createdump. It is currently ignored on Windows. The new HEAP2 flag is works when passed to the EnumMemoryRegions API on Windows but createdump can't set it because MiniDumpWriteDump in dbghelp.dll loads/calls the DAC API.

Fix MacOS dlopen error message

Author: mikem8361
Assignees: mikem8361
Labels:

area-Diagnostics-coreclr

Milestone: -

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but depending where the bar is at you might get asked separate out a minimal change from some of the other edits which appeared to be non-essential.

src/coreclr/inc/clrdata.idl Outdated Show resolved Hide resolved
@mikem8361 mikem8361 merged commit 590388b into dotnet:main Aug 23, 2022
@mikem8361 mikem8361 deleted the enummem2 branch August 23, 2022 23:10
mikem8361 added a commit to mikem8361/runtime that referenced this pull request Aug 23, 2022
…#74300)

Issue: dotnet#72148

Instead of drilling down into all the individual MT/MD/EEClass, etc. data structures, add the LoaderAllocator/LoaderHeaps regions directly.

Add new CLRDATA_ENUM_MEM_HEAP2 flag for the fast path.

To reduce risk of incomplete core dumps this is enabled by the COMPlus_EnableFastHeapDumps env var. This env var is only looked at by the Linux/MacOS createdump. It is currently ignored on Windows. The new HEAP2 flag is works when passed to the EnumMemoryRegions API on Windows but createdump can't set it because MiniDumpWriteDump in dbghelp.dll loads/calls the DAC API.

Fix MacOS dlopen error message
carlossanlop pushed a commit that referenced this pull request Aug 24, 2022
#74464)

Issue: #72148

Instead of drilling down into all the individual MT/MD/EEClass, etc. data structures, add the LoaderAllocator/LoaderHeaps regions directly.

Add new CLRDATA_ENUM_MEM_HEAP2 flag for the fast path.

To reduce risk of incomplete core dumps this is enabled by the COMPlus_EnableFastHeapDumps env var. This env var is only looked at by the Linux/MacOS createdump. It is currently ignored on Windows. The new HEAP2 flag is works when passed to the EnumMemoryRegions API on Windows but createdump can't set it because MiniDumpWriteDump in dbghelp.dll loads/calls the DAC API.

Fix MacOS dlopen error message
@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants