equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
170 } |
170 } |
171 |
171 |
172 void log_nmethod(JavaThread* thread, nmethod* nm) { |
172 void log_nmethod(JavaThread* thread, nmethod* nm) { |
173 log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]", |
173 log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]", |
174 nm->compile_id(), nm->is_osr_method() ? "%" : "", |
174 nm->compile_id(), nm->is_osr_method() ? "%" : "", |
175 nm, nm->code_begin(), nm->code_end()); |
175 p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end())); |
176 } |
176 } |
177 |
177 |
178 void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) { |
178 void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) { |
179 StringLogMessage lm; |
179 StringLogMessage lm; |
180 lm.print("%4d COMPILE SKIPPED: %s", task->compile_id(), reason); |
180 lm.print("%4d COMPILE SKIPPED: %s", task->compile_id(), reason); |
1784 thread->init_log(log); |
1784 thread->init_log(log); |
1785 |
1785 |
1786 if (xtty != NULL) { |
1786 if (xtty != NULL) { |
1787 ttyLocker ttyl; |
1787 ttyLocker ttyl; |
1788 // Record any per thread log files |
1788 // Record any per thread log files |
1789 xtty->elem("thread_logfile thread='%d' filename='%s'", thread_id, file_name); |
1789 xtty->elem("thread_logfile thread='" INTX_FORMAT "' filename='%s'", thread_id, file_name); |
1790 } |
1790 } |
1791 return; |
1791 return; |
1792 } |
1792 } |
1793 } |
1793 } |
1794 warning("Cannot open log file: %s", file_name); |
1794 warning("Cannot open log file: %s", file_name); |
1815 // Call this from the compiler at convenient points, to poll for _should_block. |
1815 // Call this from the compiler at convenient points, to poll for _should_block. |
1816 void CompileBroker::maybe_block() { |
1816 void CompileBroker::maybe_block() { |
1817 if (_should_block) { |
1817 if (_should_block) { |
1818 #ifndef PRODUCT |
1818 #ifndef PRODUCT |
1819 if (PrintCompilation && (Verbose || WizardMode)) |
1819 if (PrintCompilation && (Verbose || WizardMode)) |
1820 tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", Thread::current()); |
1820 tty->print_cr("compiler thread " INTPTR_FORMAT " poll detects block request", p2i(Thread::current())); |
1821 #endif |
1821 #endif |
1822 ThreadInVMfromNative tivfn(JavaThread::current()); |
1822 ThreadInVMfromNative tivfn(JavaThread::current()); |
1823 } |
1823 } |
1824 } |
1824 } |
1825 |
1825 |
1832 { |
1832 { |
1833 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1833 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1834 CodeCache::print_summary(&s, detailed); |
1834 CodeCache::print_summary(&s, detailed); |
1835 } |
1835 } |
1836 ttyLocker ttyl; |
1836 ttyLocker ttyl; |
1837 tty->print(s.as_string()); |
1837 tty->print("%s", s.as_string()); |
1838 } |
1838 } |
1839 |
1839 |
1840 // ------------------------------------------------------------------ |
1840 // ------------------------------------------------------------------ |
1841 // CompileBroker::invoke_compiler_on_method |
1841 // CompileBroker::invoke_compiler_on_method |
1842 // |
1842 // |
2037 // because log_state() will use locks causing lock conflicts. |
2037 // because log_state() will use locks causing lock conflicts. |
2038 CodeCache::log_state(&s); |
2038 CodeCache::log_state(&s); |
2039 // Lock to prevent tearing |
2039 // Lock to prevent tearing |
2040 ttyLocker ttyl; |
2040 ttyLocker ttyl; |
2041 xtty->begin_elem("code_cache_full"); |
2041 xtty->begin_elem("code_cache_full"); |
2042 xtty->print(s.as_string()); |
2042 xtty->print("%s", s.as_string()); |
2043 xtty->stamp(); |
2043 xtty->stamp(); |
2044 xtty->end_elem(); |
2044 xtty->end_elem(); |
2045 } |
2045 } |
2046 |
2046 |
2047 CodeCache::report_codemem_full(); |
2047 CodeCache::report_codemem_full(); |