--- old/src/share/vm/jfr/periodic/jfrPeriodic.cpp 2019-09-02 18:07:43.995465700 +0300 +++ new/src/share/vm/jfr/periodic/jfrPeriodic.cpp 2019-09-02 18:07:43.369851200 +0300 @@ -26,6 +26,8 @@ #include "jvm.h" #include "classfile/classLoaderStats.hpp" #include "classfile/javaClasses.hpp" +#include "classfile/symbolTable.hpp" +#include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "compiler/compileBroker.hpp" #include "gc_implementation/g1/g1HeapRegionEventSender.hpp" @@ -87,6 +89,12 @@ event.commit(); } +TRACE_REQUEST_FUNC(VirtualizationInformation) { + EventVirtualizationInformation event; + event.set_name(JfrOSInterface::virtualization_name()); + event.commit(); +} + /* * This is left empty on purpose, having ExecutionSample as a requestable * is a way of getting the period. The period is passed to ThreadSampling::update_period. @@ -492,6 +500,46 @@ VMThread::execute(&op); } +template +static void emit_table_statistics(TableStatistics statistics) { + EVENT event; + event.set_bucketCount(statistics._number_of_buckets); + event.set_entryCount(statistics._number_of_entries); + event.set_totalFootprint(statistics._total_footprint); + event.set_bucketCountMaximum(statistics._maximum_bucket_size); + event.set_bucketCountAverage(statistics._average_bucket_size); + event.set_bucketCountVariance(statistics._variance_of_bucket_size); + event.set_bucketCountStandardDeviation(statistics._stddev_of_bucket_size); + event.set_insertionRate(statistics._add_rate); + event.set_removalRate(statistics._remove_rate); + event.commit(); +} + +TRACE_REQUEST_FUNC(SymbolTableStatistics) { + TableStatistics statistics = SymbolTable::the_table()->get_table_statistics(); + emit_table_statistics(statistics); +} + +TRACE_REQUEST_FUNC(StringTableStatistics) { + TableStatistics statistics = StringTable::the_table()->get_table_statistics(); + emit_table_statistics(statistics); +} + +TRACE_REQUEST_FUNC(PlaceholderTableStatistics) { + TableStatistics statistics = SystemDictionary::placeholders_statistics(); + emit_table_statistics(statistics); +} + +TRACE_REQUEST_FUNC(LoaderConstraintsTableStatistics) { + TableStatistics statistics = SystemDictionary::loader_constraints_statistics(); + emit_table_statistics(statistics); +} + +TRACE_REQUEST_FUNC(ProtectionDomainCacheTableStatistics) { + TableStatistics statistics = SystemDictionary::protection_domain_cache_statistics(); + emit_table_statistics(statistics); +} + TRACE_REQUEST_FUNC(CompilerStatistics) { EventCompilerStatistics event; event.set_compileCount(CompileBroker::get_total_compile_count());