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 "classfile/classLoader.hpp"
27 #include "classfile/stringTable.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "code/codeCache.hpp"
30 #include "compiler/compileBroker.hpp"
31 #include "compiler/compilerOracle.hpp"
32 #include "gc/shared/genCollectedHeap.hpp"
33 #include "interpreter/bytecodeHistogram.hpp"
34 #if INCLUDE_JVMCI
35 #include "jvmci/jvmciCompiler.hpp"
36 #include "jvmci/jvmciRuntime.hpp"
37 #endif
38 #include "memory/oopFactory.hpp"
39 #include "memory/universe.hpp"
40 #include "oops/constantPool.hpp"
41 #include "oops/generateOopMap.hpp"
42 #include "oops/instanceKlass.hpp"
43 #include "oops/instanceOop.hpp"
44 #include "oops/method.hpp"
45 #include "oops/objArrayOop.hpp"
46 #include "oops/oop.inline.hpp"
47 #include "oops/symbol.hpp"
48 #include "prims/jvmtiExport.hpp"
49 #include "runtime/arguments.hpp"
50 #include "runtime/biasedLocking.hpp"
51 #include "runtime/compilationPolicy.hpp"
52 #include "runtime/fprofiler.hpp"
53 #include "runtime/init.hpp"
54 #include "runtime/interfaceSupport.hpp"
55 #include "runtime/java.hpp"
56 #include "runtime/memprofiler.hpp"
57 #include "runtime/sharedRuntime.hpp"
435 // Stop the WatcherThread. We do this before disenrolling various
436 // PeriodicTasks to reduce the likelihood of races.
437 if (PeriodicTask::num_tasks() > 0) {
438 WatcherThread::stop();
439 }
440
441 // Print statistics gathered (profiling ...)
442 if (Arguments::has_profile()) {
443 FlatProfiler::disengage();
444 FlatProfiler::print(10);
445 }
446
447 // shut down the StatSampler task
448 StatSampler::disengage();
449 StatSampler::destroy();
450
451 // Stop concurrent GC threads
452 Universe::heap()->stop();
453
454 // Print GC/heap related information.
455 if (PrintGCDetails) {
456 Universe::print();
457 AdaptiveSizePolicyOutput(0);
458 if (Verbose) {
459 ClassLoaderDataGraph::dump_on(gclog_or_tty);
460 }
461 }
462
463 if (PrintBytecodeHistogram) {
464 BytecodeHistogram::print();
465 }
466
467 if (JvmtiExport::should_post_thread_life()) {
468 JvmtiExport::post_thread_end(thread);
469 }
470
471
472 EventThreadEnd event;
473 if (event.should_commit()) {
474 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
475 event.commit();
476 }
477
478 // Always call even when there are not JVMTI environments yet, since environments
479 // may be attached late and JVMTI must track phases of VM execution
480 JvmtiExport::post_vm_death();
481 Threads::shutdown_vm_agents();
|
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 "classfile/classLoader.hpp"
27 #include "classfile/stringTable.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "code/codeCache.hpp"
30 #include "compiler/compileBroker.hpp"
31 #include "compiler/compilerOracle.hpp"
32 #include "gc/shared/genCollectedHeap.hpp"
33 #include "interpreter/bytecodeHistogram.hpp"
34 #if INCLUDE_JVMCI
35 #include "jvmci/jvmciCompiler.hpp"
36 #include "jvmci/jvmciRuntime.hpp"
37 #endif
38 #include "logging/log.hpp"
39 #include "memory/oopFactory.hpp"
40 #include "memory/universe.hpp"
41 #include "oops/constantPool.hpp"
42 #include "oops/generateOopMap.hpp"
43 #include "oops/instanceKlass.hpp"
44 #include "oops/instanceOop.hpp"
45 #include "oops/method.hpp"
46 #include "oops/objArrayOop.hpp"
47 #include "oops/oop.inline.hpp"
48 #include "oops/symbol.hpp"
49 #include "prims/jvmtiExport.hpp"
50 #include "runtime/arguments.hpp"
51 #include "runtime/biasedLocking.hpp"
52 #include "runtime/compilationPolicy.hpp"
53 #include "runtime/fprofiler.hpp"
54 #include "runtime/init.hpp"
55 #include "runtime/interfaceSupport.hpp"
56 #include "runtime/java.hpp"
57 #include "runtime/memprofiler.hpp"
58 #include "runtime/sharedRuntime.hpp"
436 // Stop the WatcherThread. We do this before disenrolling various
437 // PeriodicTasks to reduce the likelihood of races.
438 if (PeriodicTask::num_tasks() > 0) {
439 WatcherThread::stop();
440 }
441
442 // Print statistics gathered (profiling ...)
443 if (Arguments::has_profile()) {
444 FlatProfiler::disengage();
445 FlatProfiler::print(10);
446 }
447
448 // shut down the StatSampler task
449 StatSampler::disengage();
450 StatSampler::destroy();
451
452 // Stop concurrent GC threads
453 Universe::heap()->stop();
454
455 // Print GC/heap related information.
456 LogHandle(gc, heap, exit) log;
457 if (log.is_info()) {
458 ResourceMark rm;
459 Universe::print_on(log.info_stream());
460 if (log.is_trace()) {
461 ClassLoaderDataGraph::dump_on(log.trace_stream());
462 }
463 }
464 AdaptiveSizePolicyOutput::print();
465
466 if (PrintBytecodeHistogram) {
467 BytecodeHistogram::print();
468 }
469
470 if (JvmtiExport::should_post_thread_life()) {
471 JvmtiExport::post_thread_end(thread);
472 }
473
474
475 EventThreadEnd event;
476 if (event.should_commit()) {
477 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
478 event.commit();
479 }
480
481 // Always call even when there are not JVMTI environments yet, since environments
482 // may be attached late and JVMTI must track phases of VM execution
483 JvmtiExport::post_vm_death();
484 Threads::shutdown_vm_agents();
|