Skip to content

Commit

Permalink
Add some more #ifdef BACKGROUND_GC to enable compilation (#102750)
Browse files Browse the repository at this point in the history
  • Loading branch information
yowl authored May 29, 2024
1 parent 28d35bd commit 5fbe5c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18480,6 +18480,7 @@ bool gc_heap::should_retry_other_heap (int gen_number, size_t size)
}
}

#ifdef BACKGROUND_GC
void gc_heap::bgc_record_uoh_allocation(int gen_number, size_t size)
{
assert((gen_number >= uoh_start_generation) && (gen_number < total_generation_count));
Expand All @@ -18502,6 +18503,7 @@ void gc_heap::bgc_record_uoh_allocation(int gen_number, size_t size)
uoh_a_no_bgc[gen_number - uoh_start_generation] += size;
}
}
#endif //BACKGROUND_GC

allocation_state gc_heap::allocate_uoh (int gen_number,
size_t size,
Expand Down Expand Up @@ -50043,6 +50045,7 @@ void gc_heap::check_and_adjust_bgc_tuning (int gen_number, size_t physical_size,
}
#endif //BGC_SERVO_TUNING

#ifdef BACKGROUND_GC
void gc_heap::get_and_reset_uoh_alloc_info()
{
total_uoh_a_last_bgc = 0;
Expand Down Expand Up @@ -50084,6 +50087,7 @@ void gc_heap::get_and_reset_uoh_alloc_info()

total_uoh_a_last_bgc = total_uoh_a_no_bgc + total_uoh_a_bgc_marking + total_uoh_a_bgc_planning;
}
#endif //BACKGROUND_GC

bool gc_heap::is_pm_ratio_exceeded()
{
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/gc/gcpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,9 @@ class gc_heap

PER_HEAP_ISOLATED_METHOD void add_to_history();

#ifdef BACKGROUND_GC
PER_HEAP_ISOLATED_METHOD void get_and_reset_uoh_alloc_info();
#endif //BACKGROUND_GC

#ifdef BGC_SERVO_TUNING
// Currently BGC servo tuning is an experimental feature.
Expand Down

0 comments on commit 5fbe5c4

Please sign in to comment.