// Metaspace are deallocated when their class loader are GC'ed. // This class implements a policy for inducing GC's to recover // Metaspaces.
class MetaspaceGCThresholdUpdater : public AllStatic { public: enum Type {
ComputeNewSize,
ExpandAndAllocate,
Last
};
staticconstchar* to_string(MetaspaceGCThresholdUpdater::Type updater) { switch (updater) { case ComputeNewSize: return"compute_new_size"; case ExpandAndAllocate: return"expand_and_allocate"; default:
assert(false, "Got bad updater: %d", (int) updater); return NULL;
};
}
};
class MetaspaceGC : public AllStatic {
// The current high-water-mark for inducing a GC. // When committed memory of all metaspaces reaches this value, // a GC is induced and the value is increased. Size is in bytes. staticvolatile size_t _capacity_until_GC; static uint _shrink_factor;
// Retrieve all statistics in one go; make sure the values are consistent. static MetaspaceStats get_statistics(Metaspace::MetadataType mdtype); static MetaspaceCombinedStats get_combined_statistics();
// (See JDK-8251342). Implement or Consolidate. static MetaspaceChunkFreeListSummary chunk_free_list_summary(Metaspace::MetadataType mdtype) { return MetaspaceChunkFreeListSummary(0,0,0,0,0,0,0,0);
}
// Log change in used metadata. staticvoid print_metaspace_change(const MetaspaceCombinedStats& pre_meta_values);
// This will print out a basic metaspace usage report but // unlike print_report() is guaranteed not to lock or to walk the CLDG. staticvoid print_basic_report(outputStream* st, size_t scale = 0);
// Prints a report about the current metaspace state. // Function will walk the CLDG and will lock the expand lock; if that is not // convenient, use print_basic_report() instead. staticvoid print_report(outputStream* out, size_t scale = 0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.