Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 20212:d7e2d5f2846b
8027553: Change the in_cset_fast_test functionality to use the G1BiasedArray abstraction
Summary: Instead of using a manually managed array for the in_cset_fast_test array, use a G1BiasedArray instance.
Reviewed-by: brutisso, mgerdin
author | tschatzl |
---|---|
date | Mon, 21 Jul 2014 09:40:19 +0200 |
parents | c49dcaf78a65 |
children | 983092f35ff7 |
comparison
equal
deleted
inserted
replaced
20211:82693fb204a5 | 20212:d7e2d5f2846b |
---|---|
1509 | 1509 |
1510 // Start a new incremental collection set for the next pause | 1510 // Start a new incremental collection set for the next pause |
1511 assert(g1_policy()->collection_set() == NULL, "must be"); | 1511 assert(g1_policy()->collection_set() == NULL, "must be"); |
1512 g1_policy()->start_incremental_cset_building(); | 1512 g1_policy()->start_incremental_cset_building(); |
1513 | 1513 |
1514 // Clear the _cset_fast_test bitmap in anticipation of adding | |
1515 // regions to the incremental collection set for the next | |
1516 // evacuation pause. | |
1517 clear_cset_fast_test(); | 1514 clear_cset_fast_test(); |
1518 | 1515 |
1519 init_mutator_alloc_region(); | 1516 init_mutator_alloc_region(); |
1520 | 1517 |
1521 double end = os::elapsedTime(); | 1518 double end = os::elapsedTime(); |
1931 _expand_heap_after_alloc_failure(true), | 1928 _expand_heap_after_alloc_failure(true), |
1932 _surviving_young_words(NULL), | 1929 _surviving_young_words(NULL), |
1933 _old_marking_cycles_started(0), | 1930 _old_marking_cycles_started(0), |
1934 _old_marking_cycles_completed(0), | 1931 _old_marking_cycles_completed(0), |
1935 _concurrent_cycle_started(false), | 1932 _concurrent_cycle_started(false), |
1936 _in_cset_fast_test(NULL), | 1933 _in_cset_fast_test(), |
1937 _in_cset_fast_test_base(NULL), | |
1938 _dirty_cards_region_list(NULL), | 1934 _dirty_cards_region_list(NULL), |
1939 _worker_cset_start_region(NULL), | 1935 _worker_cset_start_region(NULL), |
1940 _worker_cset_start_region_time_stamp(NULL), | 1936 _worker_cset_start_region_time_stamp(NULL), |
1941 _gc_timer_stw(new (ResourceObj::C_HEAP, mtGC) STWGCTimer()), | 1937 _gc_timer_stw(new (ResourceObj::C_HEAP, mtGC) STWGCTimer()), |
1942 _gc_timer_cm(new (ResourceObj::C_HEAP, mtGC) ConcurrentGCTimer()), | 1938 _gc_timer_cm(new (ResourceObj::C_HEAP, mtGC) ConcurrentGCTimer()), |
2074 _bot_shared = new G1BlockOffsetSharedArray(_reserved, | 2070 _bot_shared = new G1BlockOffsetSharedArray(_reserved, |
2075 heap_word_size(init_byte_size)); | 2071 heap_word_size(init_byte_size)); |
2076 | 2072 |
2077 _g1h = this; | 2073 _g1h = this; |
2078 | 2074 |
2079 _in_cset_fast_test_length = max_regions(); | 2075 _in_cset_fast_test.initialize(_g1_reserved.start(), _g1_reserved.end(), HeapRegion::GrainBytes); |
2080 _in_cset_fast_test_base = | |
2081 NEW_C_HEAP_ARRAY(bool, (size_t) _in_cset_fast_test_length, mtGC); | |
2082 | |
2083 // We're biasing _in_cset_fast_test to avoid subtracting the | |
2084 // beginning of the heap every time we want to index; basically | |
2085 // it's the same with what we do with the card table. | |
2086 _in_cset_fast_test = _in_cset_fast_test_base - | |
2087 ((uintx) _g1_reserved.start() >> HeapRegion::LogOfHRGrainBytes); | |
2088 | |
2089 // Clear the _cset_fast_test bitmap in anticipation of adding | |
2090 // regions to the incremental collection set for the first | |
2091 // evacuation pause. | |
2092 clear_cset_fast_test(); | |
2093 | 2076 |
2094 // Create the ConcurrentMark data structure and thread. | 2077 // Create the ConcurrentMark data structure and thread. |
2095 // (Must do this late, so that "max_regions" is defined.) | 2078 // (Must do this late, so that "max_regions" is defined.) |
2096 _cm = new ConcurrentMark(this, heap_rs); | 2079 _cm = new ConcurrentMark(this, heap_rs); |
2097 if (_cm == NULL || !_cm->completed_initialization()) { | 2080 if (_cm == NULL || !_cm->completed_initialization()) { |
4143 cleanup_surviving_young_words(); | 4126 cleanup_surviving_young_words(); |
4144 | 4127 |
4145 // Start a new incremental collection set for the next pause. | 4128 // Start a new incremental collection set for the next pause. |
4146 g1_policy()->start_incremental_cset_building(); | 4129 g1_policy()->start_incremental_cset_building(); |
4147 | 4130 |
4148 // Clear the _cset_fast_test bitmap in anticipation of adding | |
4149 // regions to the incremental collection set for the next | |
4150 // evacuation pause. | |
4151 clear_cset_fast_test(); | 4131 clear_cset_fast_test(); |
4152 | 4132 |
4153 _young_list->reset_sampled_info(); | 4133 _young_list->reset_sampled_info(); |
4154 | 4134 |
4155 // Don't check the whole heap at this point as the | 4135 // Don't check the whole heap at this point as the |