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

Include datas in GCSettingsEvent #112022

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52945,6 +52945,15 @@ void GCHeap::DiagGetGCSettings(EtwGCSettingsInfo* etw_settings)
#else
true;
#endif //MULTIPLE_HEAPS
#if BUILD_AS_STANDALONE
if (g_runtimeSupportedVersion.MajorVersion >= 4)
#endif //BUILD_AS_STANDALONE
etw_settings->dynamic_heap_count_p =
#ifdef DYNAMIC_HEAP_COUNT
gc_heap::dynamic_adaptation_mode == dynamic_adaptation_to_application_sizes;
#else
false;
#endif //DYNAMIC_HEAP_COUNT
#endif //FEATURE_EVENT_TRACE
}

Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/gc/gcinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// The major version of the IGCToCLR interface. Breaking changes to this interface
// require bumps in the major version number.
#define EE_INTERFACE_MAJOR_VERSION 3
#define EE_INTERFACE_MAJOR_VERSION 4

struct ScanContext;
struct gc_alloc_context;
Expand Down Expand Up @@ -141,6 +141,7 @@ struct EtwGCSettingsInfo
// If this is false, it means the hardlimit was set implicitly by the container.
bool hard_limit_config_p;
bool no_affinitize_p;
bool dynamic_heap_count_p;
};

// Opaque type for tracking object pointers
Expand Down
11 changes: 6 additions & 5 deletions src/coreclr/inc/eventtracebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ enum EtwThreadFlags

enum EtwGCSettingFlags
{
kEtwGCFlagConcurrent = 0x00000001,
kEtwGCFlagLargePages = 0x00000002,
kEtwGCFlagFrozenSegs = 0x00000004,
kEtwGCFlagHardLimitConfig = 0x00000008,
kEtwGCFlagNoAffinitize = 0x00000010,
kEtwGCFlagConcurrent = 0x00000001,
kEtwGCFlagLargePages = 0x00000002,
kEtwGCFlagFrozenSegs = 0x00000004,
kEtwGCFlagHardLimitConfig = 0x00000008,
kEtwGCFlagNoAffinitize = 0x00000010,
kEtwGCFlagDynamicHeapCount = 0x00000020,
};

#ifndef FEATURE_NATIVEAOT
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/vm/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4117,6 +4117,9 @@ VOID ETW::EnumerationLog::SendGCRundownEvent()
if (gcSettingsInfo.no_affinitize_p)
dwEtwGCSettingFlags |= kEtwGCFlagNoAffinitize;

if (gcSettingsInfo.dynamic_heap_count_p)
dwEtwGCSettingFlags |= kEtwGCFlagDynamicHeapCount;

FireEtwGCSettingsRundown (
gcSettingsInfo.heap_hard_limit,
gcSettingsInfo.loh_threshold,
Expand Down
Loading