59 #include "runtime/interfaceSupport.hpp"
60 #include "runtime/java.hpp"
61 #include "runtime/memprofiler.hpp"
62 #include "runtime/sharedRuntime.hpp"
63 #include "runtime/statSampler.hpp"
64 #include "runtime/sweeper.hpp"
65 #include "runtime/task.hpp"
66 #include "runtime/thread.inline.hpp"
67 #include "runtime/timer.hpp"
68 #include "runtime/vm_operations.hpp"
69 #include "services/memTracker.hpp"
70 #include "trace/traceMacros.hpp"
71 #include "trace/tracing.hpp"
72 #include "utilities/dtrace.hpp"
73 #include "utilities/globalDefinitions.hpp"
74 #include "utilities/histogram.hpp"
75 #include "utilities/macros.hpp"
76 #include "utilities/vmError.hpp"
77 #if INCLUDE_ALL_GCS
78 #include "gc/cms/concurrentMarkSweepThread.hpp"
79 #include "gc/parallel/psScavenge.hpp"
80 #endif // INCLUDE_ALL_GCS
81 #ifdef COMPILER1
82 #include "c1/c1_Compiler.hpp"
83 #include "c1/c1_Runtime1.hpp"
84 #endif
85 #ifdef COMPILER2
86 #include "code/compiledIC.hpp"
87 #include "compiler/methodLiveness.hpp"
88 #include "opto/compile.hpp"
89 #include "opto/indexSet.hpp"
90 #include "opto/runtime.hpp"
91 #endif
92
93 GrowableArray<Method*>* collected_profiled_methods;
94
95 int compare_methods(Method** a, Method** b) {
96 // %%% there can be 32-bit overflow here
97 return ((*b)->invocation_count() + (*b)->compiled_invocation_count())
98 - ((*a)->invocation_count() + (*a)->compiled_invocation_count());
469 FlatProfiler::disengage();
470 FlatProfiler::print(10);
471 }
472
473 // shut down the StatSampler task
474 StatSampler::disengage();
475 StatSampler::destroy();
476
477 // Stop concurrent GC threads
478 Universe::heap()->stop();
479
480 // Print GC/heap related information.
481 Log(gc, heap, exit) log;
482 if (log.is_info()) {
483 ResourceMark rm;
484 Universe::print_on(log.info_stream());
485 if (log.is_trace()) {
486 ClassLoaderDataGraph::dump_on(log.trace_stream());
487 }
488 }
489 AdaptiveSizePolicyOutput::print();
490
491 if (PrintBytecodeHistogram) {
492 BytecodeHistogram::print();
493 }
494
495 if (JvmtiExport::should_post_thread_life()) {
496 JvmtiExport::post_thread_end(thread);
497 }
498
499 // Always call even when there are not JVMTI environments yet, since environments
500 // may be attached late and JVMTI must track phases of VM execution
501 JvmtiExport::post_vm_death();
502 Threads::shutdown_vm_agents();
503
504 // Terminate the signal thread
505 // Note: we don't wait until it actually dies.
506 os::terminate_signal_thread();
507
508 print_statistics();
509 Universe::heap()->print_tracing_info();
|
59 #include "runtime/interfaceSupport.hpp"
60 #include "runtime/java.hpp"
61 #include "runtime/memprofiler.hpp"
62 #include "runtime/sharedRuntime.hpp"
63 #include "runtime/statSampler.hpp"
64 #include "runtime/sweeper.hpp"
65 #include "runtime/task.hpp"
66 #include "runtime/thread.inline.hpp"
67 #include "runtime/timer.hpp"
68 #include "runtime/vm_operations.hpp"
69 #include "services/memTracker.hpp"
70 #include "trace/traceMacros.hpp"
71 #include "trace/tracing.hpp"
72 #include "utilities/dtrace.hpp"
73 #include "utilities/globalDefinitions.hpp"
74 #include "utilities/histogram.hpp"
75 #include "utilities/macros.hpp"
76 #include "utilities/vmError.hpp"
77 #if INCLUDE_ALL_GCS
78 #include "gc/cms/concurrentMarkSweepThread.hpp"
79 #include "gc/parallel/parallelScavengeHeap.hpp"
80 #include "gc/parallel/psScavenge.hpp"
81 #endif // INCLUDE_ALL_GCS
82 #ifdef COMPILER1
83 #include "c1/c1_Compiler.hpp"
84 #include "c1/c1_Runtime1.hpp"
85 #endif
86 #ifdef COMPILER2
87 #include "code/compiledIC.hpp"
88 #include "compiler/methodLiveness.hpp"
89 #include "opto/compile.hpp"
90 #include "opto/indexSet.hpp"
91 #include "opto/runtime.hpp"
92 #endif
93
94 GrowableArray<Method*>* collected_profiled_methods;
95
96 int compare_methods(Method** a, Method** b) {
97 // %%% there can be 32-bit overflow here
98 return ((*b)->invocation_count() + (*b)->compiled_invocation_count())
99 - ((*a)->invocation_count() + (*a)->compiled_invocation_count());
470 FlatProfiler::disengage();
471 FlatProfiler::print(10);
472 }
473
474 // shut down the StatSampler task
475 StatSampler::disengage();
476 StatSampler::destroy();
477
478 // Stop concurrent GC threads
479 Universe::heap()->stop();
480
481 // Print GC/heap related information.
482 Log(gc, heap, exit) log;
483 if (log.is_info()) {
484 ResourceMark rm;
485 Universe::print_on(log.info_stream());
486 if (log.is_trace()) {
487 ClassLoaderDataGraph::dump_on(log.trace_stream());
488 }
489 }
490
491 #if INCLUDE_ALL_GCS
492 AdaptiveSizePolicyOutput::print();
493 #endif
494
495 if (PrintBytecodeHistogram) {
496 BytecodeHistogram::print();
497 }
498
499 if (JvmtiExport::should_post_thread_life()) {
500 JvmtiExport::post_thread_end(thread);
501 }
502
503 // Always call even when there are not JVMTI environments yet, since environments
504 // may be attached late and JVMTI must track phases of VM execution
505 JvmtiExport::post_vm_death();
506 Threads::shutdown_vm_agents();
507
508 // Terminate the signal thread
509 // Note: we don't wait until it actually dies.
510 os::terminate_signal_thread();
511
512 print_statistics();
513 Universe::heap()->print_tracing_info();
|