diff --git a/src/share/vm/gc_implementation/g1/elasticHeap.cpp b/src/share/vm/gc_implementation/g1/elasticHeap.cpp index 940f818fd9dc741b3af5a499ce7d2fcd036f412a..60af0db80dd81fd954bb6753f2171c7dc7ac44c0 100644 --- a/src/share/vm/gc_implementation/g1/elasticHeap.cpp +++ b/src/share/vm/gc_implementation/g1/elasticHeap.cpp @@ -290,7 +290,7 @@ Monitor* ElasticHeapTimer::_monitor = NULL; bool ElasticHeapTimer::has_error(TRAPS, const char* error) { if (HAS_PENDING_EXCEPTION) { - tty->print_cr(error); + tty->print_cr("%s", error); java_lang_Throwable::print(PENDING_EXCEPTION, tty); tty->cr(); CLEAR_PENDING_EXCEPTION; diff --git a/src/share/vm/jfr/periodic/jfrThreadCPULoadEvent.cpp b/src/share/vm/jfr/periodic/jfrThreadCPULoadEvent.cpp index 2b049dd411ba5d36208f09b11e09ef6714b81eb0..08c67525e34096629bf66f6a56c5ad597d2ec61d 100644 --- a/src/share/vm/jfr/periodic/jfrThreadCPULoadEvent.cpp +++ b/src/share/vm/jfr/periodic/jfrThreadCPULoadEvent.cpp @@ -127,7 +127,7 @@ void JfrThreadCPULoadEvent::send_events() { } jt = jt->next(); } - log_trace(jfr)("Measured CPU usage for %d threads in %.3f milliseconds", thread_count, + log_trace(jfr)("Measured CPU usage for " SIZE_FORMAT " threads in %.3f milliseconds", thread_count, (double)(JfrTraceTime::now() - event_time) / (JfrTraceTime::frequency() / 1000)); // Restore this thread's thread id periodic_trace_data->set_thread_id(periodic_thread_id); diff --git a/src/share/vm/jfr/utilities/jfrJavaLog.cpp b/src/share/vm/jfr/utilities/jfrJavaLog.cpp index bead06b690de04b45b50def09d60c886083cdaf7..9d693d39c89241867f1d594033d03309ce8244bd 100644 --- a/src/share/vm/jfr/utilities/jfrJavaLog.cpp +++ b/src/share/vm/jfr/utilities/jfrJavaLog.cpp @@ -39,25 +39,25 @@ void JfrJavaLog::log(jint tag_set, jint level, jstring message, TRAPS) { ResourceMark rm(THREAD); const char* const s = JfrJavaSupport::c_str(message, CHECK); assert(s != NULL, "invariant"); - + switch(level) { case LogLevel::Off: break; case LogLevel::Trace: - log_trace(jfr)(s); + log_trace(jfr)("%s", s); break; case LogLevel::Debug: - log_debug(jfr)(s); + log_debug(jfr)("%s", s); break; case LogLevel::Info: - log_info(jfr)(s); + log_info(jfr)("%s", s); break; case LogLevel::Warning: - log_warning(jfr)(s); + log_warning(jfr)("%s", s); break; case LogLevel::Error: - log_error(jfr)(s); - break; + log_error(jfr)("%s", s); + break; default: break; }