mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
7075646: G1: fix inconsistencies in the monitoring data
Fixed a few inconsistencies in the monitoring data, in particular when reported from jstat. Reviewed-by: jmasa, brutisso, johnc
This commit is contained in:
parent
1b62d10b4b
commit
55c503aea2
10 changed files with 419 additions and 268 deletions
|
@ -34,6 +34,11 @@
|
|||
class GenerationCounters: public CHeapObj {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
void initialize(const char* name, int ordinal, int spaces,
|
||||
size_t min_capacity, size_t max_capacity,
|
||||
size_t curr_capacity);
|
||||
|
||||
protected:
|
||||
PerfVariable* _current_size;
|
||||
VirtualSpace* _virtual_space;
|
||||
|
@ -48,11 +53,18 @@ class GenerationCounters: public CHeapObj {
|
|||
char* _name_space;
|
||||
|
||||
// This constructor is only meant for use with the PSGenerationCounters
|
||||
// constructor. The need for such an constructor should be eliminated
|
||||
// constructor. The need for such an constructor should be eliminated
|
||||
// when VirtualSpace and PSVirtualSpace are unified.
|
||||
GenerationCounters() : _name_space(NULL), _current_size(NULL), _virtual_space(NULL) {}
|
||||
public:
|
||||
GenerationCounters()
|
||||
: _name_space(NULL), _current_size(NULL), _virtual_space(NULL) {}
|
||||
|
||||
// This constructor is used for subclasses that do not have a space
|
||||
// associated with them (e.g, in G1).
|
||||
GenerationCounters(const char* name, int ordinal, int spaces,
|
||||
size_t min_capacity, size_t max_capacity,
|
||||
size_t curr_capacity);
|
||||
|
||||
public:
|
||||
GenerationCounters(const char* name, int ordinal, int spaces,
|
||||
VirtualSpace* v);
|
||||
|
||||
|
@ -60,10 +72,7 @@ class GenerationCounters: public CHeapObj {
|
|||
if (_name_space != NULL) FREE_C_HEAP_ARRAY(char, _name_space);
|
||||
}
|
||||
|
||||
virtual void update_all() {
|
||||
_current_size->set_value(_virtual_space == NULL ? 0 :
|
||||
_virtual_space->committed_size());
|
||||
}
|
||||
virtual void update_all();
|
||||
|
||||
const char* name_space() const { return _name_space; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue