1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
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 *
503 // Stop concurrent GC threads
504 Universe::heap()->stop();
505
506 // Print GC/heap related information.
507 if (PrintGCDetails) {
508 Universe::print();
509 AdaptiveSizePolicyOutput(0);
510 if (Verbose) {
511 ClassLoaderDataGraph::dump_on(gclog_or_tty);
512 }
513 }
514
515 if (PrintBytecodeHistogram) {
516 BytecodeHistogram::print();
517 }
518
519 if (JvmtiExport::should_post_thread_life()) {
520 JvmtiExport::post_thread_end(thread);
521 }
522
523
524 EventThreadEnd event;
525 if (event.should_commit()) {
526 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj()));
527 event.commit();
528 }
529
530 // Always call even when there are not JVMTI environments yet, since environments
531 // may be attached late and JVMTI must track phases of VM execution
532 JvmtiExport::post_vm_death();
533 Threads::shutdown_vm_agents();
534
535 // Terminate the signal thread
536 // Note: we don't wait until it actually dies.
537 os::terminate_signal_thread();
538
539 print_statistics();
540 Universe::heap()->print_tracing_info();
541
542 { MutexLocker ml(BeforeExit_lock);
543 _before_exit_status = BEFORE_EXIT_DONE;
544 BeforeExit_lock->notify_all();
545 }
546
547 if (VerifyStringTableAtExit) {
548 int fail_cnt = 0;
549 {
|
1 /*
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
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 *
503 // Stop concurrent GC threads
504 Universe::heap()->stop();
505
506 // Print GC/heap related information.
507 if (PrintGCDetails) {
508 Universe::print();
509 AdaptiveSizePolicyOutput(0);
510 if (Verbose) {
511 ClassLoaderDataGraph::dump_on(gclog_or_tty);
512 }
513 }
514
515 if (PrintBytecodeHistogram) {
516 BytecodeHistogram::print();
517 }
518
519 if (JvmtiExport::should_post_thread_life()) {
520 JvmtiExport::post_thread_end(thread);
521 }
522
523 EventThreadEnd event;
524 if (event.should_commit()) {
525 event.set_thread(THREAD_TRACE_ID(thread));
526 event.commit();
527 }
528
529 TRACE_VM_EXIT();
530
531 // Always call even when there are not JVMTI environments yet, since environments
532 // may be attached late and JVMTI must track phases of VM execution
533 JvmtiExport::post_vm_death();
534 Threads::shutdown_vm_agents();
535
536 // Terminate the signal thread
537 // Note: we don't wait until it actually dies.
538 os::terminate_signal_thread();
539
540 print_statistics();
541 Universe::heap()->print_tracing_info();
542
543 { MutexLocker ml(BeforeExit_lock);
544 _before_exit_status = BEFORE_EXIT_DONE;
545 BeforeExit_lock->notify_all();
546 }
547
548 if (VerifyStringTableAtExit) {
549 int fail_cnt = 0;
550 {
|