< prev index next >

src/share/vm/memory/metaspaceTracer.cpp

Print this page

        

*** 29,66 **** --- 29,73 ---- #include "oops/oop.inline.hpp" void MetaspaceTracer::report_gc_threshold(size_t old_val, size_t new_val, MetaspaceGCThresholdUpdater::Type updater) const { + #if INCLUDE_JFR EventMetaspaceGCThreshold event; if (event.should_commit()) { event.set_oldValue(old_val); event.set_newValue(new_val); event.set_updater((u1)updater); event.commit(); } + #endif } void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld, size_t word_size, MetaspaceObj::Type objtype, Metaspace::MetadataType mdtype) const { + #if INCLUDE_JFR send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype); + #endif } void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld, size_t word_size, MetaspaceObj::Type objtype, Metaspace::MetadataType mdtype) const { + #if INCLUDE_JFR send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype); + #endif } template <typename E> void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld, size_t word_size, MetaspaceObj::Type objtype, Metaspace::MetadataType mdtype) const { + #if INCLUDE_JFR E event; if (event.should_commit()) { if (cld->is_anonymous()) { event.set_classLoader(NULL); event.set_anonymousClassLoader(true);
*** 76,81 **** --- 83,89 ---- event.set_size(word_size * BytesPerWord); event.set_metadataType((u1) mdtype); event.set_metaspaceObjectType((u1) objtype); event.commit(); } + #endif }
< prev index next >