< prev index next >

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

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "classfile/classLoaderDataGraph.hpp"
  28 #include "classfile/classLoaderStats.hpp"
  29 #include "classfile/javaClasses.hpp"



  30 #include "code/codeCache.hpp"
  31 #include "compiler/compileBroker.hpp"
  32 #include "gc/g1/g1HeapRegionEventSender.hpp"
  33 #include "gc/shared/gcConfiguration.hpp"
  34 #include "gc/shared/gcTrace.hpp"
  35 #include "gc/shared/gcVMOperations.hpp"
  36 #include "gc/shared/objectCountEventSender.hpp"
  37 #include "jfr/jfrEvents.hpp"
  38 #include "jfr/periodic/jfrModuleEvent.hpp"
  39 #include "jfr/periodic/jfrOSInterface.hpp"
  40 #include "jfr/periodic/jfrThreadCPULoadEvent.hpp"
  41 #include "jfr/periodic/jfrThreadDumpEvent.hpp"
  42 #include "jfr/periodic/jfrNetworkUtilization.hpp"
  43 #include "jfr/recorder/jfrRecorder.hpp"
  44 #include "jfr/support/jfrThreadId.hpp"
  45 #include "jfr/utilities/jfrTime.hpp"
  46 #include "jfrfiles/jfrPeriodic.hpp"
  47 #include "logging/log.hpp"
  48 #include "memory/heapInspection.hpp"
  49 #include "memory/resourceArea.hpp"


 489     _stats->iterate(this);
 490   }
 491 };
 492 
 493 class JfrClassLoaderStatsVMOperation : public ClassLoaderStatsVMOperation {
 494  public:
 495   JfrClassLoaderStatsVMOperation() : ClassLoaderStatsVMOperation(NULL) { }
 496 
 497   void doit() {
 498     JfrClassLoaderStatsClosure clsc;
 499     ClassLoaderDataGraph::loaded_cld_do(&clsc);
 500     clsc.createEvents();
 501   }
 502 };
 503 
 504 TRACE_REQUEST_FUNC(ClassLoaderStatistics) {
 505   JfrClassLoaderStatsVMOperation op;
 506   VMThread::execute(&op);
 507 }
 508 








































 509 TRACE_REQUEST_FUNC(CompilerStatistics) {
 510   EventCompilerStatistics event;
 511   event.set_compileCount(CompileBroker::get_total_compile_count());
 512   event.set_bailoutCount(CompileBroker::get_total_bailout_count());
 513   event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
 514   event.set_osrCompileCount(CompileBroker::get_total_osr_compile_count());
 515   event.set_standardCompileCount(CompileBroker::get_total_standard_compile_count());
 516   event.set_osrBytesCompiled(CompileBroker::get_sum_osr_bytes_compiled());
 517   event.set_standardBytesCompiled(CompileBroker::get_sum_standard_bytes_compiled());
 518   event.set_nmetodsSize(CompileBroker::get_sum_nmethod_size());
 519   event.set_nmetodCodeSize(CompileBroker::get_sum_nmethod_code_size());
 520   event.set_peakTimeSpent(CompileBroker::get_peak_compilation_time());
 521   event.set_totalTimeSpent(CompileBroker::get_total_compilation_time());
 522   event.commit();
 523 }
 524 
 525 TRACE_REQUEST_FUNC(CompilerConfiguration) {
 526   EventCompilerConfiguration event;
 527   event.set_threadCount(CICompilerCount);
 528   event.set_tieredCompilation(TieredCompilation);




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "classfile/classLoaderDataGraph.hpp"
  28 #include "classfile/classLoaderStats.hpp"
  29 #include "classfile/javaClasses.hpp"
  30 #include "classfile/stringTable.hpp"
  31 #include "classfile/symbolTable.hpp"
  32 #include "classfile/systemDictionary.hpp"
  33 #include "code/codeCache.hpp"
  34 #include "compiler/compileBroker.hpp"
  35 #include "gc/g1/g1HeapRegionEventSender.hpp"
  36 #include "gc/shared/gcConfiguration.hpp"
  37 #include "gc/shared/gcTrace.hpp"
  38 #include "gc/shared/gcVMOperations.hpp"
  39 #include "gc/shared/objectCountEventSender.hpp"
  40 #include "jfr/jfrEvents.hpp"
  41 #include "jfr/periodic/jfrModuleEvent.hpp"
  42 #include "jfr/periodic/jfrOSInterface.hpp"
  43 #include "jfr/periodic/jfrThreadCPULoadEvent.hpp"
  44 #include "jfr/periodic/jfrThreadDumpEvent.hpp"
  45 #include "jfr/periodic/jfrNetworkUtilization.hpp"
  46 #include "jfr/recorder/jfrRecorder.hpp"
  47 #include "jfr/support/jfrThreadId.hpp"
  48 #include "jfr/utilities/jfrTime.hpp"
  49 #include "jfrfiles/jfrPeriodic.hpp"
  50 #include "logging/log.hpp"
  51 #include "memory/heapInspection.hpp"
  52 #include "memory/resourceArea.hpp"


 492     _stats->iterate(this);
 493   }
 494 };
 495 
 496 class JfrClassLoaderStatsVMOperation : public ClassLoaderStatsVMOperation {
 497  public:
 498   JfrClassLoaderStatsVMOperation() : ClassLoaderStatsVMOperation(NULL) { }
 499 
 500   void doit() {
 501     JfrClassLoaderStatsClosure clsc;
 502     ClassLoaderDataGraph::loaded_cld_do(&clsc);
 503     clsc.createEvents();
 504   }
 505 };
 506 
 507 TRACE_REQUEST_FUNC(ClassLoaderStatistics) {
 508   JfrClassLoaderStatsVMOperation op;
 509   VMThread::execute(&op);
 510 }
 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 
 552 TRACE_REQUEST_FUNC(CompilerStatistics) {
 553   EventCompilerStatistics event;
 554   event.set_compileCount(CompileBroker::get_total_compile_count());
 555   event.set_bailoutCount(CompileBroker::get_total_bailout_count());
 556   event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
 557   event.set_osrCompileCount(CompileBroker::get_total_osr_compile_count());
 558   event.set_standardCompileCount(CompileBroker::get_total_standard_compile_count());
 559   event.set_osrBytesCompiled(CompileBroker::get_sum_osr_bytes_compiled());
 560   event.set_standardBytesCompiled(CompileBroker::get_sum_standard_bytes_compiled());
 561   event.set_nmetodsSize(CompileBroker::get_sum_nmethod_size());
 562   event.set_nmetodCodeSize(CompileBroker::get_sum_nmethod_code_size());
 563   event.set_peakTimeSpent(CompileBroker::get_peak_compilation_time());
 564   event.set_totalTimeSpent(CompileBroker::get_total_compilation_time());
 565   event.commit();
 566 }
 567 
 568 TRACE_REQUEST_FUNC(CompilerConfiguration) {
 569   EventCompilerConfiguration event;
 570   event.set_threadCount(CICompilerCount);
 571   event.set_tieredCompilation(TieredCompilation);


< prev index next >