hotspot/src/share/vm/gc/g1/youngList.cpp
changeset 37039 79f62b89a7a6
parent 36365 bcc9c9afda49
child 37985 539c597ee0fa
equal deleted inserted replaced
36592:e208f63ee9ca 37039:79f62b89a7a6
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/g1/g1CollectedHeap.hpp"
    26 #include "gc/g1/g1CollectedHeap.hpp"
       
    27 #include "gc/g1/g1CollectionSet.hpp"
    27 #include "gc/g1/g1CollectorPolicy.hpp"
    28 #include "gc/g1/g1CollectorPolicy.hpp"
    28 #include "gc/g1/heapRegion.hpp"
    29 #include "gc/g1/heapRegion.hpp"
    29 #include "gc/g1/heapRegion.inline.hpp"
    30 #include "gc/g1/heapRegion.inline.hpp"
    30 #include "gc/g1/heapRegionRemSet.hpp"
    31 #include "gc/g1/heapRegionRemSet.hpp"
    31 #include "gc/g1/youngList.hpp"
    32 #include "gc/g1/youngList.hpp"
   151     _g1h->g1_policy()->set_region_survivor(curr, young_index_in_cset);
   152     _g1h->g1_policy()->set_region_survivor(curr, young_index_in_cset);
   152 
   153 
   153     // The region is a non-empty survivor so let's add it to
   154     // The region is a non-empty survivor so let's add it to
   154     // the incremental collection set for the next evacuation
   155     // the incremental collection set for the next evacuation
   155     // pause.
   156     // pause.
   156     _g1h->g1_policy()->add_region_to_incremental_cset_rhs(curr);
   157     _g1h->collection_set()->add_survivor_regions(curr);
   157     young_index_in_cset += 1;
   158     young_index_in_cset += 1;
   158   }
   159   }
   159   assert((uint) young_index_in_cset == _survivor_length, "post-condition");
   160   assert((uint) young_index_in_cset == _survivor_length, "post-condition");
   160   _g1h->g1_policy()->note_stop_adding_survivor_regions();
   161   _g1h->g1_policy()->note_stop_adding_survivor_regions();
   161 
   162