src/hotspot/share/gc/g1/g1RemSetTrackingPolicy.cpp
changeset 53704 ef72c85a0534
parent 51494 1906adbef2dc
equal deleted inserted replaced
53703:24341625d8f2 53704:ef72c85a0534
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, 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.
    21  * questions.
    21  * questions.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/g1/collectionSetChooser.hpp"
    26 #include "gc/g1/g1CollectionSetChooser.hpp"
    27 #include "gc/g1/g1RemSetTrackingPolicy.hpp"
    27 #include "gc/g1/g1RemSetTrackingPolicy.hpp"
    28 #include "gc/g1/heapRegion.inline.hpp"
    28 #include "gc/g1/heapRegion.inline.hpp"
    29 #include "gc/g1/heapRegionRemSet.hpp"
    29 #include "gc/g1/heapRegionRemSet.hpp"
    30 #include "runtime/safepoint.hpp"
    30 #include "runtime/safepoint.hpp"
    31 
    31 
   124   // - They must contain some live data in them.
   124   // - They must contain some live data in them.
   125   // - Only need to rebuild non-complete remembered sets.
   125   // - Only need to rebuild non-complete remembered sets.
   126   // - Otherwise only add those old gen regions which occupancy is low enough that there
   126   // - Otherwise only add those old gen regions which occupancy is low enough that there
   127   // is a chance that we will ever evacuate them in the mixed gcs.
   127   // is a chance that we will ever evacuate them in the mixed gcs.
   128   if ((total_live_bytes > 0) &&
   128   if ((total_live_bytes > 0) &&
   129       CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) &&
   129       G1CollectionSetChooser::region_occupancy_low_enough_for_evac(total_live_bytes) &&
   130       !r->rem_set()->is_tracked()) {
   130       !r->rem_set()->is_tracked()) {
   131 
   131 
   132     r->rem_set()->set_state_updating();
   132     r->rem_set()->set_state_updating();
   133     selected_for_rebuild = true;
   133     selected_for_rebuild = true;
   134   }
   134   }