src/share/vm/opto/doCall.cpp

changeset 4357
ad5dd04754ee
parent 4313
beebba0acc11
child 4409
d092d1b31229
     1.1 --- a/src/share/vm/opto/doCall.cpp	Mon Dec 17 11:00:22 2012 -0800
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Tue Dec 18 14:55:25 2012 +0100
     1.3 @@ -40,19 +40,24 @@
     1.4  #include "prims/nativeLookup.hpp"
     1.5  #include "runtime/sharedRuntime.hpp"
     1.6  
     1.7 -void trace_type_profile(ciMethod *method, int depth, int bci, ciMethod *prof_method, ciKlass *prof_klass, int site_count, int receiver_count) {
     1.8 +void trace_type_profile(Compile* C, ciMethod *method, int depth, int bci, ciMethod *prof_method, ciKlass *prof_klass, int site_count, int receiver_count) {
     1.9    if (TraceTypeProfile || PrintInlining NOT_PRODUCT(|| PrintOptoInlining)) {
    1.10 +    outputStream* out = tty;
    1.11      if (!PrintInlining) {
    1.12        if (NOT_PRODUCT(!PrintOpto &&) !PrintCompilation) {
    1.13          method->print_short_name();
    1.14          tty->cr();
    1.15        }
    1.16        CompileTask::print_inlining(prof_method, depth, bci);
    1.17 +    } else {
    1.18 +      out = C->print_inlining_stream();
    1.19      }
    1.20 -    CompileTask::print_inline_indent(depth);
    1.21 -    tty->print(" \\-> TypeProfile (%d/%d counts) = ", receiver_count, site_count);
    1.22 -    prof_klass->name()->print_symbol();
    1.23 -    tty->cr();
    1.24 +    CompileTask::print_inline_indent(depth, out);
    1.25 +    out->print(" \\-> TypeProfile (%d/%d counts) = ", receiver_count, site_count);
    1.26 +    stringStream ss;
    1.27 +    prof_klass->name()->print_symbol_on(&ss);
    1.28 +    out->print(ss.as_string());
    1.29 +    out->cr();
    1.30    }
    1.31  }
    1.32  
    1.33 @@ -233,13 +238,13 @@
    1.34            }
    1.35            if (miss_cg != NULL) {
    1.36              if (next_hit_cg != NULL) {
    1.37 -              trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1));
    1.38 +              trace_type_profile(C, jvms->method(), jvms->depth() - 1, jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1));
    1.39                // We don't need to record dependency on a receiver here and below.
    1.40                // Whenever we inline, the dependency is added by Parse::Parse().
    1.41                miss_cg = CallGenerator::for_predicted_call(profile.receiver(1), miss_cg, next_hit_cg, PROB_MAX);
    1.42              }
    1.43              if (miss_cg != NULL) {
    1.44 -              trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count);
    1.45 +              trace_type_profile(C, jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count);
    1.46                CallGenerator* cg = CallGenerator::for_predicted_call(profile.receiver(0), miss_cg, hit_cg, profile.receiver_prob(0));
    1.47                if (cg != NULL)  return cg;
    1.48              }

mercurial