Skip to content

[NativeAOT] GC events don't get logged on Linux #87445

Closed
@elinor-fung

Description

@elinor-fung

The event firing in Native AOT is under a mix of FEATURE_EVENT_TRACE and FEATURE_ETW.

Some things don't even attempt to fire:

#ifdef FEATURE_ETW
ETW::GCLog::ETW_GC_INFO gcStartInfo;
gcStartInfo.GCStart.Count = count;
gcStartInfo.GCStart.Depth = depth;
gcStartInfo.GCStart.Reason = static_cast<ETW::GCLog::ETW_GC_INFO::GC_REASON>(reason);
gcStartInfo.GCStart.Type = static_cast<ETW::GCLog::ETW_GC_INFO::GC_TYPE>(type);
ETW::GCLog::FireGcStart(&gcStartInfo);
#endif // FEATURE_ETW

Implementation of ETW::GCLog is in eventtrace.cpp, which is only included on Windows:

list(APPEND COMMON_RUNTIME_SOURCES
windows/PalRedhawkCommon.cpp
windows/PalRedhawkMinWin.cpp
${GC_DIR}/windows/gcenv.windows.cpp
eventtrace.cpp
rheventtrace.cpp

(There's a bunch of stuff in there, so it's not quite as simple as including it on non-Windows)

Related (but more involved than): #87325

cc @LakshanF

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions