[release/10.0] Enable using CLRDATA_ENUM_MEM_HEAP2 through environment variable#125518
Draft
hoyosjs wants to merge 1 commit intodotnet:release/10.0from
Draft
[release/10.0] Enable using CLRDATA_ENUM_MEM_HEAP2 through environment variable#125518hoyosjs wants to merge 1 commit intodotnet:release/10.0from
hoyosjs wants to merge 1 commit intodotnet:release/10.0from
Conversation
Contributor
|
Tagging subscribers to this area: @agocke |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a runtime configuration switch to enable a faster heap-dump memory enumeration mode (promoting CLRDATA_ENUM_MEM_HEAP to CLRDATA_ENUM_MEM_HEAP2) based on a target-process setting, enabling faster dump generation without requiring the dump producer to pass the newer flag.
Changes:
- Introduces a new global (
g_EnableFastHeapDumps) and exposes it via DAC globals. - Adds a new external config value
EnableFastHeapDumpsand initializes the global during EE startup. - Updates DAC heap-dump enumeration to auto-promote to
CLRDATA_ENUM_MEM_HEAP2when the setting is enabled.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/vars.hpp | Declares g_EnableFastHeapDumps as a new runtime global. |
| src/coreclr/vm/vars.cpp | Defines and initializes g_EnableFastHeapDumps. |
| src/coreclr/vm/ceemain.cpp | Initializes g_EnableFastHeapDumps from CLRConfig during startup. |
| src/coreclr/inc/dacvars.h | Adds g_EnableFastHeapDumps to the DAC globals table. |
| src/coreclr/inc/clrconfigvalues.h | Adds EXTERNAL_EnableFastHeapDumps config knob. |
| src/coreclr/debug/daccess/enummem.cpp | Promotes heap dump enumeration to HEAP2 when enabled in the target. |
You can also share your feedback on Copilot code review. Take the survey.
| #ifdef FEATURE_MINIMETADATA_IN_TRIAGEDUMPS | ||
| RETAIL_CONFIG_DWORD_INFO(INTERNAL_MiniMdBufferCapacity, W("MiniMdBufferCapacity"), 64 * 1024, "The max size of the buffer to store mini metadata information for triage- and mini-dumps.") | ||
| #endif // FEATURE_MINIMETADATA_IN_TRIAGEDUMPS | ||
| RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableFastHeapDumps, W("EnableFastHeapDumps"), 0, "If non-zero, uses CLRDATA_ENUM_MEM_HEAP2 for heap dumps which enumerates loader heap pages in bulk instead of walking individual runtime data structures.") |
| // faster and produces equivalent dump content since all runtime | ||
| // data structures reside in loader heaps. | ||
| flags = CLRDATA_ENUM_MEM_HEAP2; | ||
| DacLogMessage("EnumMemoryRegions(CLRDATA_ENUM_MEM_HEAP promoted to HEAP2 via DOTNET_EnableFastHeapDumps)\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.