src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page




2165   HeapRegion* dummy_region = new_heap_region(0 /* index of bottom region */,
2166                                              _g1_reserved.start());
2167   // We'll re-use the same region whether the alloc region will
2168   // require BOT updates or not and, if it doesn't, then a non-young
2169   // region will complain that it cannot support allocations without
2170   // BOT updates. So we'll tag the dummy region as young to avoid that.
2171   dummy_region->set_young();
2172   // Make sure it's full.
2173   dummy_region->set_top(dummy_region->end());
2174   G1AllocRegion::setup(this, dummy_region);
2175 
2176   init_mutator_alloc_region();
2177 
2178   // Do create of the monitoring and management support so that
2179   // values in the heap have been properly initialized.
2180   _g1mm = new G1MonitoringSupport(this);
2181 
2182   return JNI_OK;
2183 }
2184 




2185 void G1CollectedHeap::ref_processing_init() {
2186   // Reference processing in G1 currently works as follows:
2187   //
2188   // * There are two reference processor instances. One is
2189   //   used to record and process discovered references
2190   //   during concurrent marking; the other is used to
2191   //   record and process references during STW pauses
2192   //   (both full and incremental).
2193   // * Both ref processors need to 'span' the entire heap as
2194   //   the regions in the collection set may be dotted around.
2195   //
2196   // * For the concurrent marking ref processor:
2197   //   * Reference discovery is enabled at initial marking.
2198   //   * Reference discovery is disabled and the discovered
2199   //     references processed etc during remarking.
2200   //   * Reference discovery is MT (see below).
2201   //   * Reference discovery requires a barrier (see below).
2202   //   * Reference processing may or may not be MT
2203   //     (depending on the value of ParallelRefProcEnabled
2204   //     and ParallelGCThreads).




2165   HeapRegion* dummy_region = new_heap_region(0 /* index of bottom region */,
2166                                              _g1_reserved.start());
2167   // We'll re-use the same region whether the alloc region will
2168   // require BOT updates or not and, if it doesn't, then a non-young
2169   // region will complain that it cannot support allocations without
2170   // BOT updates. So we'll tag the dummy region as young to avoid that.
2171   dummy_region->set_young();
2172   // Make sure it's full.
2173   dummy_region->set_top(dummy_region->end());
2174   G1AllocRegion::setup(this, dummy_region);
2175 
2176   init_mutator_alloc_region();
2177 
2178   // Do create of the monitoring and management support so that
2179   // values in the heap have been properly initialized.
2180   _g1mm = new G1MonitoringSupport(this);
2181 
2182   return JNI_OK;
2183 }
2184 
2185 size_t G1CollectedHeap::max_heap_alignment() {
2186   return HeapRegion::max_heap_alignment();
2187 }
2188 
2189 void G1CollectedHeap::ref_processing_init() {
2190   // Reference processing in G1 currently works as follows:
2191   //
2192   // * There are two reference processor instances. One is
2193   //   used to record and process discovered references
2194   //   during concurrent marking; the other is used to
2195   //   record and process references during STW pauses
2196   //   (both full and incremental).
2197   // * Both ref processors need to 'span' the entire heap as
2198   //   the regions in the collection set may be dotted around.
2199   //
2200   // * For the concurrent marking ref processor:
2201   //   * Reference discovery is enabled at initial marking.
2202   //   * Reference discovery is disabled and the discovered
2203   //     references processed etc during remarking.
2204   //   * Reference discovery is MT (see below).
2205   //   * Reference discovery requires a barrier (see below).
2206   //   * Reference processing may or may not be MT
2207   //     (depending on the value of ParallelRefProcEnabled
2208   //     and ParallelGCThreads).