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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_concurrentG1Refine.cpp.incl" 27 28 // Possible sizes for the card counts cache: odd primes that roughly double in size. 29 // (See jvmtiTagMap.cpp). 30 int ConcurrentG1Refine::_cc_cache_sizes[] = { 31 16381, 32771, 76831, 150001, 307261, 32 614563, 1228891, 2457733, 4915219, 9830479, 33 19660831, 39321619, 78643219, 157286461, -1 34 }; 35 36 ConcurrentG1Refine::ConcurrentG1Refine() : 37 _card_counts(NULL), _card_epochs(NULL), 38 _n_card_counts(0), _max_n_card_counts(0), 39 _cache_size_index(0), _expand_card_counts(false), 40 _hot_cache(NULL), 41 _def_use_cache(false), _use_cache(false), 42 _n_periods(0), 43 _threads(NULL), _n_threads(0) 44 { 45 46 // Ergomonically select initial concurrent refinement parameters | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "gc_implementation/g1/concurrentG1Refine.hpp" 27 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" 28 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 29 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 30 #include "gc_implementation/g1/g1RemSet.hpp" 31 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" 32 #include "memory/space.inline.hpp" 33 #include "runtime/atomic.hpp" 34 #include "utilities/copy.hpp" 35 36 // Possible sizes for the card counts cache: odd primes that roughly double in size. 37 // (See jvmtiTagMap.cpp). 38 int ConcurrentG1Refine::_cc_cache_sizes[] = { 39 16381, 32771, 76831, 150001, 307261, 40 614563, 1228891, 2457733, 4915219, 9830479, 41 19660831, 39321619, 78643219, 157286461, -1 42 }; 43 44 ConcurrentG1Refine::ConcurrentG1Refine() : 45 _card_counts(NULL), _card_epochs(NULL), 46 _n_card_counts(0), _max_n_card_counts(0), 47 _cache_size_index(0), _expand_card_counts(false), 48 _hot_cache(NULL), 49 _def_use_cache(false), _use_cache(false), 50 _n_periods(0), 51 _threads(NULL), _n_threads(0) 52 { 53 54 // Ergomonically select initial concurrent refinement parameters |