25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "jvm.h" |
26 #include "jvm.h" |
27 #include "classfile/classLoaderDataGraph.hpp" |
27 #include "classfile/classLoaderDataGraph.hpp" |
28 #include "classfile/classLoaderStats.hpp" |
28 #include "classfile/classLoaderStats.hpp" |
29 #include "classfile/javaClasses.hpp" |
29 #include "classfile/javaClasses.hpp" |
|
30 #include "classfile/stringTable.hpp" |
|
31 #include "classfile/symbolTable.hpp" |
|
32 #include "classfile/systemDictionary.hpp" |
30 #include "code/codeCache.hpp" |
33 #include "code/codeCache.hpp" |
31 #include "compiler/compileBroker.hpp" |
34 #include "compiler/compileBroker.hpp" |
32 #include "gc/g1/g1HeapRegionEventSender.hpp" |
35 #include "gc/g1/g1HeapRegionEventSender.hpp" |
33 #include "gc/shared/gcConfiguration.hpp" |
36 #include "gc/shared/gcConfiguration.hpp" |
34 #include "gc/shared/gcTrace.hpp" |
37 #include "gc/shared/gcTrace.hpp" |
504 TRACE_REQUEST_FUNC(ClassLoaderStatistics) { |
507 TRACE_REQUEST_FUNC(ClassLoaderStatistics) { |
505 JfrClassLoaderStatsVMOperation op; |
508 JfrClassLoaderStatsVMOperation op; |
506 VMThread::execute(&op); |
509 VMThread::execute(&op); |
507 } |
510 } |
508 |
511 |
|
512 template<typename EVENT> |
|
513 static void emit_table_statistics(TableStatistics statistics) { |
|
514 EVENT event; |
|
515 event.set_bucketCount(statistics._number_of_buckets); |
|
516 event.set_entryCount(statistics._number_of_entries); |
|
517 event.set_totalFootprint(statistics._total_footprint); |
|
518 event.set_bucketCountMaximum(statistics._maximum_bucket_size); |
|
519 event.set_bucketCountAverage(statistics._average_bucket_size); |
|
520 event.set_bucketCountVariance(statistics._variance_of_bucket_size); |
|
521 event.set_bucketCountStandardDeviation(statistics._stddev_of_bucket_size); |
|
522 event.set_insertionRate(statistics._add_rate); |
|
523 event.set_removalRate(statistics._remove_rate); |
|
524 event.commit(); |
|
525 } |
|
526 |
|
527 TRACE_REQUEST_FUNC(SymbolTableStatistics) { |
|
528 TableStatistics statistics = SymbolTable::the_table()->get_table_statistics(); |
|
529 emit_table_statistics<EventSymbolTableStatistics>(statistics); |
|
530 } |
|
531 |
|
532 TRACE_REQUEST_FUNC(StringTableStatistics) { |
|
533 TableStatistics statistics = StringTable::the_table()->get_table_statistics(); |
|
534 emit_table_statistics<EventStringTableStatistics>(statistics); |
|
535 } |
|
536 |
|
537 TRACE_REQUEST_FUNC(PlaceholderTableStatistics) { |
|
538 TableStatistics statistics = SystemDictionary::placeholders_statistics(); |
|
539 emit_table_statistics<EventPlaceholderTableStatistics>(statistics); |
|
540 } |
|
541 |
|
542 TRACE_REQUEST_FUNC(LoaderConstraintsTableStatistics) { |
|
543 TableStatistics statistics = SystemDictionary::loader_constraints_statistics(); |
|
544 emit_table_statistics<EventLoaderConstraintsTableStatistics>(statistics); |
|
545 } |
|
546 |
|
547 TRACE_REQUEST_FUNC(ProtectionDomainCacheTableStatistics) { |
|
548 TableStatistics statistics = SystemDictionary::protection_domain_cache_statistics(); |
|
549 emit_table_statistics<EventProtectionDomainCacheTableStatistics>(statistics); |
|
550 } |
|
551 |
509 TRACE_REQUEST_FUNC(CompilerStatistics) { |
552 TRACE_REQUEST_FUNC(CompilerStatistics) { |
510 EventCompilerStatistics event; |
553 EventCompilerStatistics event; |
511 event.set_compileCount(CompileBroker::get_total_compile_count()); |
554 event.set_compileCount(CompileBroker::get_total_compile_count()); |
512 event.set_bailoutCount(CompileBroker::get_total_bailout_count()); |
555 event.set_bailoutCount(CompileBroker::get_total_bailout_count()); |
513 event.set_invalidatedCount(CompileBroker::get_total_invalidated_count()); |
556 event.set_invalidatedCount(CompileBroker::get_total_invalidated_count()); |