@@ -7463,7 +7463,7 @@ bool gc_heap::virtual_commit (void* address, size_t size, int bucket, int h_numb
7463
7463
7464
7464
if ((base + size) > limit)
7465
7465
{
7466
- dprintf (1 , ("%zd + %zd = %zd > limit %zd ", base, size, (base + size), limit));
7466
+ dprintf (2 , ("%zd + %zd = %zd > limit %zd ", base, size, (base + size), limit));
7467
7467
exceeded_p = true;
7468
7468
}
7469
7469
}
@@ -8280,9 +8280,9 @@ uint8_t* get_plug_start_in_saved (uint8_t* old_loc, mark* pinned_plug_entry)
8280
8280
{
8281
8281
uint8_t* saved_pre_plug_info = (uint8_t*)(pinned_plug_entry->get_pre_plug_reloc_info());
8282
8282
uint8_t* plug_start_in_saved = saved_pre_plug_info + (old_loc - (pinned_plug (pinned_plug_entry) - sizeof (plug_and_gap)));
8283
- //dprintf (1 , ("detected a very short plug: %zx before PP %zx, pad %zx",
8283
+ //dprintf (2 , ("detected a very short plug: %zx before PP %zx, pad %zx",
8284
8284
// old_loc, pinned_plug (pinned_plug_entry), plug_start_in_saved));
8285
- dprintf (1 , ("EP: %p(%p), %p", old_loc, pinned_plug (pinned_plug_entry), plug_start_in_saved));
8285
+ dprintf (2 , ("EP: %p(%p), %p", old_loc, pinned_plug (pinned_plug_entry), plug_start_in_saved));
8286
8286
return plug_start_in_saved;
8287
8287
}
8288
8288
@@ -13531,7 +13531,7 @@ void gc_heap::distribute_free_regions()
13531
13531
13532
13532
size_t total_basic_free_regions = total_num_free_regions[basic_free_region] + surplus_regions[basic_free_region].get_num_free_regions();
13533
13533
total_budget_in_region_units[basic_free_region] = compute_basic_region_budgets(heap_budget_in_region_units[basic_free_region], min_heap_budget_in_region_units[basic_free_region], total_basic_free_regions);
13534
-
13534
+
13535
13535
bool aggressive_decommit_large_p = joined_last_gc_before_oom || dt_high_memory_load_p() || near_heap_hard_limit_p();
13536
13536
13537
13537
int region_factor[count_distributed_free_region_kinds] = { 1, LARGE_REGION_FACTOR };
@@ -31148,7 +31148,7 @@ void gc_heap::realloc_plan_generation_start (generation* gen, generation* consin
31148
31148
generation_allocation_pointer (consing_gen) += allocation_left;
31149
31149
}
31150
31150
31151
- dprintf (1 , ("plan re-alloc gen%d start at %p (ptr: %p, limit: %p)", gen->gen_num,
31151
+ dprintf (2 , ("plan re-alloc gen%d start at %p (ptr: %p, limit: %p)", gen->gen_num,
31152
31152
generation_plan_allocation_start (consing_gen),
31153
31153
generation_allocation_pointer (consing_gen),
31154
31154
generation_allocation_limit (consing_gen)));
@@ -32751,7 +32751,7 @@ void gc_heap::process_remaining_regions (int current_plan_gen_num, generation* c
32751
32751
}
32752
32752
}
32753
32753
32754
- dprintf (1 , ("we still need %d regions, %d will be empty", plan_regions_needed, to_be_empty_regions));
32754
+ dprintf (REGIONS_LOG , ("we still need %d regions, %d will be empty", plan_regions_needed, to_be_empty_regions));
32755
32755
if (plan_regions_needed > to_be_empty_regions)
32756
32756
{
32757
32757
dprintf (REGIONS_LOG, ("h%d %d regions will be empty but we still need %d regions!!", heap_number, to_be_empty_regions, plan_regions_needed));
@@ -34104,7 +34104,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
34104
34104
#else
34105
34105
0;
34106
34106
#endif //SHORT_PLUGS
34107
- dprintf (1 , ("gen%d: NON PIN alloc: %zd, pin com: %zd, sweep: %zd, surv: %zd, pinsurv: %zd(%d%% added, %d%% art), np surv: %zd, pad: %zd",
34107
+ dprintf (2 , ("gen%d: NON PIN alloc: %zd, pin com: %zd, sweep: %zd, surv: %zd, pinsurv: %zd(%d%% added, %d%% art), np surv: %zd, pad: %zd",
34108
34108
gen_idx,
34109
34109
generation_allocation_size (temp_gen),
34110
34110
generation_pinned_allocation_compact_size (temp_gen),
@@ -43932,7 +43932,7 @@ generation* gc_heap::expand_heap (int condemned_generation,
43932
43932
BOOL should_promote_ephemeral = FALSE;
43933
43933
ptrdiff_t eph_size = total_ephemeral_size;
43934
43934
#ifdef BACKGROUND_GC
43935
- dprintf(2,("%s: ---- Heap Expansion ----", (gc_heap::background_running_p() ? "FGC" : "NGC" )));
43935
+ dprintf(2,("%s: ---- Heap Expansion ----", get_str_gc_type( )));
43936
43936
#endif //BACKGROUND_GC
43937
43937
settings.heap_expansion = TRUE;
43938
43938
@@ -44434,7 +44434,7 @@ size_t gc_heap::desired_new_allocation (dynamic_data* dd,
44434
44434
{
44435
44435
size_t allocated = 0;
44436
44436
size_t committed = uoh_committed_size (gen_number, &allocated);
44437
- dprintf (1 , ("GC#%zd h%d, GMI: UOH budget, UOH commit %zd (obj %zd, frag %zd), total commit: %zd (recorded: %zd)",
44437
+ dprintf (2 , ("GC#%zd h%d, GMI: UOH budget, UOH commit %zd (obj %zd, frag %zd), total commit: %zd (recorded: %zd)",
44438
44438
(size_t)settings.gc_index, heap_number,
44439
44439
committed, allocated,
44440
44440
dd_fragmentation (dynamic_data_of (gen_number)),
@@ -44511,7 +44511,7 @@ size_t gc_heap::desired_new_allocation (dynamic_data* dd,
44511
44511
44512
44512
dd_surv (dd) = cst;
44513
44513
44514
- dprintf (1 , (ThreadStressLog::gcDesiredNewAllocationMsg(),
44514
+ dprintf (2 , (ThreadStressLog::gcDesiredNewAllocationMsg(),
44515
44515
heap_number, gen_number, out, current_size, (dd_desired_allocation (dd) - dd_gc_new_allocation (dd)),
44516
44516
(int)(cst*100), (int)(f*100), current_size + new_allocation, new_allocation));
44517
44517
@@ -47805,18 +47805,18 @@ void gc_heap::descr_generations (const char* msg)
47805
47805
#endif //!TRACE_GC
47806
47806
47807
47807
#ifdef STRESS_LOG
47808
- if (StressLog::StressLogOn(LF_GC, LL_INFO10 ))
47808
+ if (StressLog::StressLogOn(LF_GC, LL_INFO1000 ))
47809
47809
{
47810
47810
gc_heap* hp = 0;
47811
47811
#ifdef MULTIPLE_HEAPS
47812
47812
hp= this;
47813
47813
#endif //MULTIPLE_HEAPS
47814
47814
47815
- STRESS_LOG1(LF_GC, LL_INFO10 , "GC Heap %p\n", hp);
47815
+ STRESS_LOG1(LF_GC, LL_INFO1000 , "GC Heap %p\n", hp);
47816
47816
for (int n = max_generation; n >= 0; --n)
47817
47817
{
47818
47818
#ifndef USE_REGIONS
47819
- STRESS_LOG4(LF_GC, LL_INFO10 , " Generation %d [%p, %p] cur = %p\n",
47819
+ STRESS_LOG4(LF_GC, LL_INFO1000 , " Generation %d [%p, %p] cur = %p\n",
47820
47820
n,
47821
47821
generation_allocation_start(generation_of(n)),
47822
47822
generation_allocation_limit(generation_of(n)),
@@ -47826,7 +47826,7 @@ void gc_heap::descr_generations (const char* msg)
47826
47826
heap_segment* seg = generation_start_segment(generation_of(n));
47827
47827
while (seg)
47828
47828
{
47829
- STRESS_LOG4(LF_GC, LL_INFO10 , " Segment mem %p alloc = %p used %p committed %p\n",
47829
+ STRESS_LOG4(LF_GC, LL_INFO1000 , " Segment mem %p alloc = %p used %p committed %p\n",
47830
47830
heap_segment_mem(seg),
47831
47831
heap_segment_allocated(seg),
47832
47832
heap_segment_used(seg),
@@ -48656,7 +48656,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p)
48656
48656
dprintf (2,("[%s]GC#%zu(%s): Verifying heap - begin",
48657
48657
(begin_gc_p ? "BEG" : "END"),
48658
48658
VolatileLoad(&settings.gc_index),
48659
- (settings.concurrent ? "BGC" : (gc_heap::background_running_p() ? "FGC" : "NGC") )));
48659
+ get_str_gc_type( )));
48660
48660
#else
48661
48661
dprintf (2,("[%s]GC#%zu: Verifying heap - begin",
48662
48662
(begin_gc_p ? "BEG" : "END"), VolatileLoad(&settings.gc_index)));
@@ -49063,7 +49063,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p)
49063
49063
49064
49064
#ifdef BACKGROUND_GC
49065
49065
dprintf (2, ("(%s)(%s)(%s) total_objects_verified is %zd, total_objects_verified_deep is %zd",
49066
- (settings.concurrent ? "BGC" : (gc_heap::background_running_p () ? "FGC" : "NGC") ),
49066
+ get_str_gc_type( ),
49067
49067
(begin_gc_p ? "BEG" : "END"),
49068
49068
((current_c_gc_state == c_gc_state_planning) ? "in plan" : "not in plan"),
49069
49069
total_objects_verified, total_objects_verified_deep));
@@ -49116,7 +49116,7 @@ void gc_heap::verify_heap (BOOL begin_gc_p)
49116
49116
}
49117
49117
dprintf (2,("GC%zu(%s): Verifying heap - end",
49118
49118
VolatileLoad(&settings.gc_index),
49119
- (settings.concurrent ? "BGC" : (gc_heap::background_running_p() ? "FGC" : "NGC") )));
49119
+ get_str_gc_type( )));
49120
49120
#else
49121
49121
dprintf (2,("GC#d: Verifying heap - end", VolatileLoad(&settings.gc_index)));
49122
49122
#endif //BACKGROUND_GC
@@ -50881,6 +50881,15 @@ last_recorded_gc_info* gc_heap::get_completed_bgc_info()
50881
50881
}
50882
50882
#endif //BACKGROUND_GC
50883
50883
50884
+ const char* gc_heap::get_str_gc_type()
50885
+ {
50886
+ #ifdef BACKGROUND_GC
50887
+ return (settings.concurrent ? "BGC" : (gc_heap::background_running_p () ? "FGC" : "NGC"));
50888
+ #else // BACKGROUND_GC
50889
+ return "NGC";
50890
+ #endif // BACKGROUND_GC
50891
+ }
50892
+
50884
50893
void gc_heap::do_pre_gc()
50885
50894
{
50886
50895
STRESS_LOG_GC_STACK;
@@ -50909,14 +50918,21 @@ void gc_heap::do_pre_gc()
50909
50918
#ifdef TRACE_GC
50910
50919
size_t total_allocated_since_last_gc[total_oh_count];
50911
50920
get_total_allocated_since_last_gc (total_allocated_since_last_gc);
50912
-
50921
+ bool compatibleWithStressLog = true;
50922
+ #ifdef SIMPLE_DPRINTF
50923
+ compatibleWithStressLog = false;
50924
+ #endif //SIMPLE_DPRINTF
50925
+ bgc_state b_state = bgc_not_in_process;
50913
50926
#ifdef BACKGROUND_GC
50927
+ b_state = settings.b_state;
50928
+ #endif //BACKGROUND_GC
50929
+
50914
50930
size_t heap_size_before = get_total_heap_size();
50915
50931
uint64_t start_gc_time = GetHighPrecisionTimeStamp();
50916
50932
uint64_t elapsed_since_last_gc_us = start_gc_time - last_alloc_reset_suspended_end_time;
50917
50933
max_peak_heap_size = max (max_peak_heap_size, heap_size_before);
50918
50934
50919
- dprintf (6666, (ThreadStressLog::gcDetailedStartMsg(),
50935
+ dprintf (6666, (ThreadStressLog::gcDetailedStartMsg(compatibleWithStressLog ),
50920
50936
VolatileLoad(&settings.gc_index),
50921
50937
dd_collection_count (hp->dynamic_data_of (0)),
50922
50938
settings.condemned_generation,
@@ -50929,18 +50945,11 @@ void gc_heap::do_pre_gc()
50929
50945
(elapsed_since_last_gc_us ? (total_allocated_since_last_gc[gc_oh_num::loh] / 1000.0 / elapsed_since_last_gc_us) : 0),
50930
50946
total_allocated_since_last_gc[gc_oh_num::poh],
50931
50947
(elapsed_since_last_gc_us ? (total_allocated_since_last_gc[gc_oh_num::poh] / 1000.0 / elapsed_since_last_gc_us) : 0),
50932
- (settings.concurrent ? "BGC" : (gc_heap::background_running_p() ? "FGC" : "NGC")),
50933
- settings.b_state,
50934
- n_heaps,
50935
- (heap_size_before / 1000.0 / 1000.0),
50936
- (max_peak_heap_size / 1000.0 / 1000.0)));
50937
- #else
50938
- dprintf (1, ("*GC* %d(gen0:%d)(%d)(alloc: %zd)",
50939
- VolatileLoad(&settings.gc_index),
50940
- dd_collection_count(hp->dynamic_data_of(0)),
50941
- settings.condemned_generation,
50942
- (total_allocated_since_last_gc[0] + total_allocated_since_last_gc[1] + total_allocated_since_last_gc[2])));
50943
- #endif //BACKGROUND_GC
50948
+ get_str_gc_type(),
50949
+ b_state,
50950
+ n_heaps
50951
+ SIMPLE_DPRINTF_ARG(heap_size_before / 1000.0 / 1000.0)
50952
+ SIMPLE_DPRINTF_ARG(max_peak_heap_size / 1000.0 / 1000.0)));
50944
50953
50945
50954
if (heap_hard_limit)
50946
50955
{
@@ -51359,18 +51368,12 @@ void gc_heap::do_post_gc()
51359
51368
}
51360
51369
#endif //BGC_SERVO_TUNING
51361
51370
51362
- #ifdef BACKGROUND_GC
51363
- const char* str_gc_type = (settings.concurrent ? "BGC" : (gc_heap::background_running_p () ? "FGC" : "NGC"));
51364
- #else
51365
- const char* str_gc_type = "NGC";
51366
- #endif //BACKGROUND_GC
51367
-
51368
51371
dprintf (6666, (ThreadStressLog::gcDetailedEndMsg(),
51369
51372
VolatileLoad (&settings.gc_index),
51370
51373
dd_collection_count (hp->dynamic_data_of (0)),
51371
51374
(get_total_heap_size() / 1000.0 / 1000.0),
51372
51375
settings.condemned_generation,
51373
- str_gc_type ,
51376
+ get_str_gc_type() ,
51374
51377
(settings.compaction ? "C" : "S"),
51375
51378
(settings.promotion ? "P" : "S"),
51376
51379
settings.entry_memory_load,
0 commit comments