8035667: EventMetaspaceSummary doesn't report committed Metaspace memory
Reviewed-by: jmasa, stefank
This commit is contained in:
parent
15efa470b9
commit
a00bf70f6f
@ -62,16 +62,16 @@ public:
|
||||
};
|
||||
|
||||
class MetaspaceSizes : public StackObj {
|
||||
size_t _capacity;
|
||||
size_t _committed;
|
||||
size_t _used;
|
||||
size_t _reserved;
|
||||
|
||||
public:
|
||||
MetaspaceSizes() : _capacity(0), _used(0), _reserved(0) {}
|
||||
MetaspaceSizes(size_t capacity, size_t used, size_t reserved) :
|
||||
_capacity(capacity), _used(used), _reserved(reserved) {}
|
||||
MetaspaceSizes() : _committed(0), _used(0), _reserved(0) {}
|
||||
MetaspaceSizes(size_t committed, size_t used, size_t reserved) :
|
||||
_committed(committed), _used(used), _reserved(reserved) {}
|
||||
|
||||
size_t capacity() const { return _capacity; }
|
||||
size_t committed() const { return _committed; }
|
||||
size_t used() const { return _used; }
|
||||
size_t reserved() const { return _reserved; }
|
||||
};
|
||||
|
@ -258,7 +258,7 @@ void GCTracer::send_gc_heap_summary_event(GCWhen::Type when, const GCHeapSummary
|
||||
static TraceStructMetaspaceSizes to_trace_struct(const MetaspaceSizes& sizes) {
|
||||
TraceStructMetaspaceSizes meta_sizes;
|
||||
|
||||
meta_sizes.set_capacity(sizes.capacity());
|
||||
meta_sizes.set_committed(sizes.committed());
|
||||
meta_sizes.set_used(sizes.used());
|
||||
meta_sizes.set_reserved(sizes.reserved());
|
||||
|
||||
|
@ -85,15 +85,15 @@ GCHeapSummary CollectedHeap::create_heap_summary() {
|
||||
|
||||
MetaspaceSummary CollectedHeap::create_metaspace_summary() {
|
||||
const MetaspaceSizes meta_space(
|
||||
MetaspaceAux::allocated_capacity_bytes(),
|
||||
MetaspaceAux::committed_bytes(),
|
||||
MetaspaceAux::allocated_used_bytes(),
|
||||
MetaspaceAux::reserved_bytes());
|
||||
const MetaspaceSizes data_space(
|
||||
MetaspaceAux::allocated_capacity_bytes(Metaspace::NonClassType),
|
||||
MetaspaceAux::committed_bytes(Metaspace::NonClassType),
|
||||
MetaspaceAux::allocated_used_bytes(Metaspace::NonClassType),
|
||||
MetaspaceAux::reserved_bytes(Metaspace::NonClassType));
|
||||
const MetaspaceSizes class_space(
|
||||
MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType),
|
||||
MetaspaceAux::committed_bytes(Metaspace::ClassType),
|
||||
MetaspaceAux::allocated_used_bytes(Metaspace::ClassType),
|
||||
MetaspaceAux::reserved_bytes(Metaspace::ClassType));
|
||||
|
||||
|
@ -185,7 +185,7 @@ Declares a structure type that can be used in other events.
|
||||
</event>
|
||||
|
||||
<struct id="MetaspaceSizes">
|
||||
<value type="BYTES64" field="capacity" label="Capacity" description="Total available memory to allocate in" />
|
||||
<value type="BYTES64" field="committed" label="Committed" description="Committed memory for this space" />
|
||||
<value type="BYTES64" field="used" label="Used" description="Bytes allocated by objects in the space" />
|
||||
<value type="BYTES64" field="reserved" label="Reserved" description="Reserved memory for this space" />
|
||||
</struct>
|
||||
|
Loading…
Reference in New Issue
Block a user