summaryrefslogtreecommitdiff
path: root/src/gc/gc.cpp
diff options
context:
space:
mode:
authorDavid Mason <davmason@microsoft.com>2018-01-31 16:56:27 -0800
committerGitHub <noreply@github.com>2018-01-31 16:56:27 -0800
commit0bdf138318b737884fec898b0af68661172fa4da (patch)
tree4d9cbd093b4ddfab12a2799b617e00a33296dafe /src/gc/gc.cpp
parentb11de873286deb1662c8fc106aa3de1df3c1ba79 (diff)
downloadcoreclr-0bdf138318b737884fec898b0af68661172fa4da.tar.gz
coreclr-0bdf138318b737884fec898b0af68661172fa4da.tar.bz2
coreclr-0bdf138318b737884fec898b0af68661172fa4da.zip
[local gc] Enable eventing (#16120)
* move GC etw enums to gcinterface.ee.h * add GetActiveSyncBlockCount * refactor reference to ETW::GCLog::ShouldTrackMovementForEtw() * mov g_dwHandles to gc side * enable FEATURE_EVENT_TRACE for gc
Diffstat (limited to 'src/gc/gc.cpp')
-rw-r--r--src/gc/gc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index d6ab65a4f1..dd26a546fe 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -13231,7 +13231,7 @@ int gc_heap::try_allocate_more_space (alloc_context* acontext, size_t size,
// Unfortunately some of the ETW macros do not check whether the ETW feature is enabled.
// The ones that do are much less efficient.
#if defined(FEATURE_EVENT_TRACE)
- if (EventEnabledGCAllocationTick_V3())
+ if (EVENT_ENABLED(GCAllocationTick_V3))
{
fire_etw_allocation_event (etw_allocation_running_amount[etw_allocation_index], gen_number, acontext->alloc_ptr);
}
@@ -19972,7 +19972,7 @@ void gc_heap::pin_object (uint8_t* o, uint8_t** ppObject, uint8_t* low, uint8_t*
set_pinned (o);
#ifdef FEATURE_EVENT_TRACE
- if(EventEnabledPinObjectAtGCTime())
+ if(EVENT_ENABLED(PinObjectAtGCTime))
{
fire_etw_pin_object_event(o, ppObject);
}
@@ -31352,7 +31352,9 @@ void gc_heap::background_sweep()
#endif //MULTIPLE_HEAPS
{
#ifdef FEATURE_EVENT_TRACE
- bgc_heap_walk_for_etw_p = ETW::GCLog::ShouldTrackMovementForEtw();
+ bgc_heap_walk_for_etw_p = GCEventStatus::IsEnabled(GCEventProvider_Default,
+ GCEventKeyword_GCHeapSurvivalAndMovement,
+ GCEventLevel_Information);
#endif //FEATURE_EVENT_TRACE
leave_spin_lock (&gc_lock);