annotate hotspot/src/share/vm/gc/g1/g1RemSetSummary.hpp @ 35190:8a4918d9f9ae

8145673: G1RemSetSummary.hpp uses FREE_C_HEAP_ARRAY Summary: Move destructor work into cpp file Reviewed-by: mgerdin, stefank
author tschatzl
date Fri, 18 Dec 2015 14:27:51 +0100
parents be6025ebffea
children ae1105fff9e4
rev   line source
tschatzl@17854 1 /*
pliden@30764 2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
tschatzl@17854 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
tschatzl@17854 4 *
tschatzl@17854 5 * This code is free software; you can redistribute it and/or modify it
tschatzl@17854 6 * under the terms of the GNU General Public License version 2 only, as
tschatzl@17854 7 * published by the Free Software Foundation.
tschatzl@17854 8 *
tschatzl@17854 9 * This code is distributed in the hope that it will be useful, but WITHOUT
tschatzl@17854 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
tschatzl@17854 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
tschatzl@17854 12 * version 2 for more details (a copy is included in the LICENSE file that
tschatzl@17854 13 * accompanied this code).
tschatzl@17854 14 *
tschatzl@17854 15 * You should have received a copy of the GNU General Public License version
tschatzl@17854 16 * 2 along with this work; if not, write to the Free Software Foundation,
tschatzl@17854 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
tschatzl@17854 18 *
tschatzl@17854 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
tschatzl@17854 20 * or visit www.oracle.com if you need additional information or have any
tschatzl@17854 21 * questions.
tschatzl@17854 22 *
tschatzl@17854 23 */
tschatzl@17854 24
pliden@30764 25 #ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
pliden@30764 26 #define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
tschatzl@17854 27
tschatzl@35190 28 #include "utilities/globalDefinitions.hpp"
tschatzl@17854 29 #include "utilities/ostream.hpp"
tschatzl@17854 30
tschatzl@17854 31 class G1RemSet;
tschatzl@17854 32
tschatzl@17854 33 // A G1RemSetSummary manages statistical information about the G1RemSet
tschatzl@17854 34
tschatzl@17854 35 class G1RemSetSummary VALUE_OBJ_CLASS_SPEC {
tschatzl@17854 36 private:
tschatzl@17854 37 friend class GetRSThreadVTimeClosure;
tschatzl@17854 38
tschatzl@17854 39 G1RemSet* _remset;
tschatzl@17854 40
tschatzl@17854 41 G1RemSet* remset() const {
tschatzl@17854 42 return _remset;
tschatzl@17854 43 }
tschatzl@17854 44
tschatzl@17854 45 size_t _num_refined_cards;
tschatzl@17854 46 size_t _num_processed_buf_mutator;
tschatzl@17854 47 size_t _num_processed_buf_rs_threads;
tschatzl@17854 48
tschatzl@17854 49 size_t _num_coarsenings;
tschatzl@17854 50
tschatzl@17854 51 double* _rs_threads_vtimes;
tschatzl@17854 52 size_t _num_vtimes;
tschatzl@17854 53
tschatzl@17854 54 double _sampling_thread_vtime;
tschatzl@17854 55
tschatzl@17854 56 void set_rs_thread_vtime(uint thread, double value);
tschatzl@17854 57 void set_sampling_thread_vtime(double value) {
tschatzl@17854 58 _sampling_thread_vtime = value;
tschatzl@17854 59 }
tschatzl@17854 60
tschatzl@17854 61 // update this summary with current data from various places
tschatzl@17854 62 void update();
tschatzl@17854 63
tschatzl@17854 64 public:
tschatzl@35190 65 G1RemSetSummary();
tschatzl@35190 66 ~G1RemSetSummary();
tschatzl@17854 67
tschatzl@17854 68 // set the counters in this summary to the values of the others
tschatzl@17854 69 void set(G1RemSetSummary* other);
tschatzl@17854 70 // subtract all counters from the other summary, and set them in the current
tschatzl@17854 71 void subtract_from(G1RemSetSummary* other);
tschatzl@17854 72
tschatzl@17854 73 // initialize and get the first sampling
tschatzl@20310 74 void initialize(G1RemSet* remset);
brutisso@35061 75 bool const initialized() { return _rs_threads_vtimes != NULL; }
tschatzl@17854 76
tschatzl@17854 77 void print_on(outputStream* out);
tschatzl@17854 78
tschatzl@17854 79 double rs_thread_vtime(uint thread) const;
tschatzl@17854 80
tschatzl@17854 81 double sampling_thread_vtime() const {
tschatzl@17854 82 return _sampling_thread_vtime;
tschatzl@17854 83 }
tschatzl@17854 84
tschatzl@17854 85 size_t num_concurrent_refined_cards() const {
tschatzl@17854 86 return _num_refined_cards;
tschatzl@17854 87 }
tschatzl@17854 88
tschatzl@17854 89 size_t num_processed_buf_mutator() const {
tschatzl@17854 90 return _num_processed_buf_mutator;
tschatzl@17854 91 }
tschatzl@17854 92
tschatzl@17854 93 size_t num_processed_buf_rs_threads() const {
tschatzl@17854 94 return _num_processed_buf_rs_threads;
tschatzl@17854 95 }
tschatzl@17854 96
tschatzl@17854 97 size_t num_processed_buf_total() const {
tschatzl@17854 98 return num_processed_buf_mutator() + num_processed_buf_rs_threads();
tschatzl@17854 99 }
tschatzl@17854 100
tschatzl@17854 101 size_t num_coarsenings() const {
tschatzl@17854 102 return _num_coarsenings;
tschatzl@17854 103 }
tschatzl@17854 104 };
tschatzl@17854 105
pliden@30764 106 #endif // SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP