提交 ba3eeabb 编写于 作者: C Chuansheng Lu 提交者: Jonathan Lu

[Misc] Fixed compilation failure with gcc 7.4

Summary: Fixed build failure caused by -Werror=format-security

Test Plan: build and sanity test

Reviewed-by: D-D-H, mmyxym

Issue: https://github.com/alibaba/dragonwell8/issues/79
上级 ca5fefe8
...@@ -290,7 +290,7 @@ Monitor* ElasticHeapTimer::_monitor = NULL; ...@@ -290,7 +290,7 @@ Monitor* ElasticHeapTimer::_monitor = NULL;
bool ElasticHeapTimer::has_error(TRAPS, const char* error) { bool ElasticHeapTimer::has_error(TRAPS, const char* error) {
if (HAS_PENDING_EXCEPTION) { if (HAS_PENDING_EXCEPTION) {
tty->print_cr(error); tty->print_cr("%s", error);
java_lang_Throwable::print(PENDING_EXCEPTION, tty); java_lang_Throwable::print(PENDING_EXCEPTION, tty);
tty->cr(); tty->cr();
CLEAR_PENDING_EXCEPTION; CLEAR_PENDING_EXCEPTION;
......
...@@ -127,7 +127,7 @@ void JfrThreadCPULoadEvent::send_events() { ...@@ -127,7 +127,7 @@ void JfrThreadCPULoadEvent::send_events() {
} }
jt = jt->next(); 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)); (double)(JfrTraceTime::now() - event_time) / (JfrTraceTime::frequency() / 1000));
// Restore this thread's thread id // Restore this thread's thread id
periodic_trace_data->set_thread_id(periodic_thread_id); periodic_trace_data->set_thread_id(periodic_thread_id);
......
...@@ -44,19 +44,19 @@ void JfrJavaLog::log(jint tag_set, jint level, jstring message, TRAPS) { ...@@ -44,19 +44,19 @@ void JfrJavaLog::log(jint tag_set, jint level, jstring message, TRAPS) {
case LogLevel::Off: case LogLevel::Off:
break; break;
case LogLevel::Trace: case LogLevel::Trace:
log_trace(jfr)(s); log_trace(jfr)("%s", s);
break; break;
case LogLevel::Debug: case LogLevel::Debug:
log_debug(jfr)(s); log_debug(jfr)("%s", s);
break; break;
case LogLevel::Info: case LogLevel::Info:
log_info(jfr)(s); log_info(jfr)("%s", s);
break; break;
case LogLevel::Warning: case LogLevel::Warning:
log_warning(jfr)(s); log_warning(jfr)("%s", s);
break; break;
case LogLevel::Error: case LogLevel::Error:
log_error(jfr)(s); log_error(jfr)("%s", s);
break; break;
default: default:
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册