8067374: Use %f instead of %g for LogCompilation output

Changed format string from %g to %f.

Reviewed-by: kvn
This commit is contained in:
Zoltan Majo 2015-01-15 11:30:13 +01:00
parent 834ff91cc5
commit 9d6b3c1d71
3 changed files with 3 additions and 3 deletions

View file

@ -94,7 +94,7 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
if (log != NULL) { if (log != NULL) {
int rid = (receiver_count >= 0)? log->identify(profile.receiver(0)): -1; int rid = (receiver_count >= 0)? log->identify(profile.receiver(0)): -1;
int r2id = (rid != -1 && profile.has_receiver(1))? log->identify(profile.receiver(1)):-1; int r2id = (rid != -1 && profile.has_receiver(1))? log->identify(profile.receiver(1)):-1;
log->begin_elem("call method='%d' count='%d' prof_factor='%g'", log->begin_elem("call method='%d' count='%d' prof_factor='%f'",
log->identify(callee), site_count, prof_factor); log->identify(callee), site_count, prof_factor);
if (call_does_dispatch) log->print(" virtual='1'"); if (call_does_dispatch) log->print(" virtual='1'");
if (allow_inline) log->print(" inline='1'"); if (allow_inline) log->print(" inline='1'");

View file

@ -441,7 +441,7 @@ Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses)
CompileLog* log = C->log(); CompileLog* log = C->log();
if (log != NULL) { if (log != NULL) {
log->begin_head("parse method='%d' uses='%g'", log->begin_head("parse method='%d' uses='%f'",
log->identify(parse_method), expected_uses); log->identify(parse_method), expected_uses);
if (depth() == 1 && C->is_osr_compilation()) { if (depth() == 1 && C->is_osr_compilation()) {
log->print(" osr_bci='%d'", C->entry_bci()); log->print(" osr_bci='%d'", C->entry_bci());

View file

@ -832,7 +832,7 @@ float Parse::dynamic_branch_prediction(float &cnt) {
sprintf(prob_str_buf, "%g", prob); sprintf(prob_str_buf, "%g", prob);
prob_str = prob_str_buf; prob_str = prob_str_buf;
} }
C->log()->elem("branch target_bci='%d' taken='%d' not_taken='%d' cnt='%g' prob='%s'", C->log()->elem("branch target_bci='%d' taken='%d' not_taken='%d' cnt='%f' prob='%s'",
iter().get_dest(), taken, not_taken, cnt, prob_str); iter().get_dest(), taken, not_taken, cnt, prob_str);
} }
return prob; return prob;