< prev index next >

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 25,34 **** --- 25,37 ---- #include "precompiled.hpp" #include "jvm.h" #include "classfile/classLoaderDataGraph.hpp" #include "classfile/classLoaderStats.hpp" #include "classfile/javaClasses.hpp" + #include "classfile/stringTable.hpp" + #include "classfile/symbolTable.hpp" + #include "classfile/systemDictionary.hpp" #include "code/codeCache.hpp" #include "compiler/compileBroker.hpp" #include "gc/g1/g1HeapRegionEventSender.hpp" #include "gc/shared/gcConfiguration.hpp" #include "gc/shared/gcTrace.hpp"
*** 504,513 **** --- 507,581 ---- TRACE_REQUEST_FUNC(ClassLoaderStatistics) { JfrClassLoaderStatsVMOperation op; VMThread::execute(&op); } + #define FILL_TABLE_EVENT(event, statistics) \ + ({ \ + event.set_bucketCount(statistics._number_of_buckets); \ + event.set_entryCount(statistics._number_of_entries); \ + event.set_totalFootprint(statistics._total_footprint); \ + event.set_maximumBucketCount(statistics._maximum_bucket_size); \ + event.set_averageBucketCount(statistics._average_bucket_size); \ + event.set_varianceOfBucketCount(statistics._variance_of_bucket_size); \ + event.set_stdDevOfBucketCount(statistics._stddev_of_bucket_size); \ + event.set_insertionRate(statistics._add_rate); \ + event.set_removalRate(statistics._remove_rate); \ + }) + + TRACE_REQUEST_FUNC(SymbolTableStatistics) { + SymbolTable *table = SymbolTable::the_table(); + TableStatistics statistics = table->get_table_statistics(); + if (statistics._owned) { + //statistics.print(tty, "SymbolTable"); + EventSymbolTableStatistics event; + FILL_TABLE_EVENT(event, statistics); + event.commit(); + } + } + + TRACE_REQUEST_FUNC(StringTableStatistics) { + StringTable *table = StringTable::the_table(); + TableStatistics statistics = table->get_table_statistics(); + if (statistics._owned) { + //statistics.print(tty, "StringTable"); + EventStringTableStatistics event; + FILL_TABLE_EVENT(event, statistics); + event.commit(); + } + } + + TRACE_REQUEST_FUNC(PlaceholderTableStatistics) { + TableStatistics statistics = SystemDictionary::placeholders_statistics(); + if (statistics._owned) { + //statistics.print(tty, "PlaceholderTable"); + EventPlaceholderTableStatistics event; + FILL_TABLE_EVENT(event, statistics); + event.commit(); + } + } + + TRACE_REQUEST_FUNC(LoaderConstraintsTableStatistics) { + TableStatistics statistics = SystemDictionary::loader_constraints_statistics(); + if (statistics._owned) { + //statistics.print(tty, "LoaderConstraintsTable"); + EventLoaderConstraintsTableStatistics event; + FILL_TABLE_EVENT(event, statistics); + event.commit(); + } + } + + TRACE_REQUEST_FUNC(ProtectionDomainCacheTableStatistics) { + TableStatistics statistics = SystemDictionary::protection_domain_cache_statistics(); + if (statistics._owned) { + //statistics.print(tty, "ProtectionDomainCacheTable"); + EventProtectionDomainCacheTableStatistics event; + FILL_TABLE_EVENT(event, statistics); + event.commit(); + } + } + TRACE_REQUEST_FUNC(CompilerStatistics) { EventCompilerStatistics event; event.set_compileCount(CompileBroker::get_total_compile_count()); event.set_bailoutCount(CompileBroker::get_total_bailout_count()); event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
< prev index next >