src/hotspot/share/gc/g1/g1RemSetSummary.hpp
author tschatzl
Wed, 18 Apr 2018 11:36:48 +0200
changeset 49806 2d62570a615c
parent 49392 2956d0ece7a9
child 53244 9807daeb47c4
permissions -rw-r--r--
8200426: Make G1 code use _g1h members Summary: Consistently use _g1h member names for cached G1CollectedHeap* variables. Reviewed-by: sangheki, sjohanss
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     1
/*
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     4
 *
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     8
 *
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    13
 * accompanied this code).
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    14
 *
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    18
 *
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    21
 * questions.
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    22
 *
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    23
 */
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 27880
diff changeset
    25
#ifndef SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 27880
diff changeset
    26
#define SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    27
35190
8a4918d9f9ae 8145673: G1RemSetSummary.hpp uses FREE_C_HEAP_ARRAY
tschatzl
parents: 35061
diff changeset
    28
#include "utilities/globalDefinitions.hpp"
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    29
#include "utilities/ostream.hpp"
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    30
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    31
class G1RemSet;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    32
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    33
// A G1RemSetSummary manages statistical information about the G1RemSet
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    34
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 47216
diff changeset
    35
class G1RemSetSummary {
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    36
private:
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    37
  friend class GetRSThreadVTimeClosure;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    38
46652
ab8716d193bb 8183226: Remembered set summarization accesses not fully initialized java thread DCQS
tschatzl
parents: 46614
diff changeset
    39
  G1RemSet* _rem_set;
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    40
46614
ae1105fff9e4 8179677: Let G1Remset::_conc_refined_cards only count number of cards concurrently refined
tschatzl
parents: 35190
diff changeset
    41
  size_t _num_conc_refined_cards;
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    42
  size_t _num_processed_buf_mutator;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    43
  size_t _num_processed_buf_rs_threads;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    44
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    45
  size_t _num_coarsenings;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    46
46652
ab8716d193bb 8183226: Remembered set summarization accesses not fully initialized java thread DCQS
tschatzl
parents: 46614
diff changeset
    47
  size_t _num_vtimes;
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    48
  double* _rs_threads_vtimes;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    49
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    50
  double _sampling_thread_vtime;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    51
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    52
  void set_rs_thread_vtime(uint thread, double value);
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    53
  void set_sampling_thread_vtime(double value) {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    54
    _sampling_thread_vtime = value;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    55
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    56
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    57
  // update this summary with current data from various places
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    58
  void update();
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    59
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    60
public:
35190
8a4918d9f9ae 8145673: G1RemSetSummary.hpp uses FREE_C_HEAP_ARRAY
tschatzl
parents: 35061
diff changeset
    61
  G1RemSetSummary();
46652
ab8716d193bb 8183226: Remembered set summarization accesses not fully initialized java thread DCQS
tschatzl
parents: 46614
diff changeset
    62
  G1RemSetSummary(G1RemSet* remset);
ab8716d193bb 8183226: Remembered set summarization accesses not fully initialized java thread DCQS
tschatzl
parents: 46614
diff changeset
    63
35190
8a4918d9f9ae 8145673: G1RemSetSummary.hpp uses FREE_C_HEAP_ARRAY
tschatzl
parents: 35061
diff changeset
    64
  ~G1RemSetSummary();
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    65
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    66
  // set the counters in this summary to the values of the others
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    67
  void set(G1RemSetSummary* other);
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    68
  // subtract all counters from the other summary, and set them in the current
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    69
  void subtract_from(G1RemSetSummary* other);
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    70
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    71
  void print_on(outputStream* out);
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    72
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    73
  double rs_thread_vtime(uint thread) const;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    74
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    75
  double sampling_thread_vtime() const {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    76
    return _sampling_thread_vtime;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    77
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    78
46614
ae1105fff9e4 8179677: Let G1Remset::_conc_refined_cards only count number of cards concurrently refined
tschatzl
parents: 35190
diff changeset
    79
  size_t num_conc_refined_cards() const {
ae1105fff9e4 8179677: Let G1Remset::_conc_refined_cards only count number of cards concurrently refined
tschatzl
parents: 35190
diff changeset
    80
    return _num_conc_refined_cards;
17854
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    81
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    82
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    83
  size_t num_processed_buf_mutator() const {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    84
    return _num_processed_buf_mutator;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    85
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    86
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    87
  size_t num_processed_buf_rs_threads() const {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    88
    return _num_processed_buf_rs_threads;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    89
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    90
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    91
  size_t num_processed_buf_total() const {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    92
    return num_processed_buf_mutator() + num_processed_buf_rs_threads();
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    93
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    94
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    95
  size_t num_coarsenings() const {
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    96
    return _num_coarsenings;
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    97
  }
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    98
};
d65bc1546091 8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff changeset
    99
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 27880
diff changeset
   100
#endif // SHARE_VM_GC_G1_G1REMSETSUMMARY_HPP