src/share/vm/opto/doCall.cpp

changeset 2687
3d58a4983660
parent 2314
f95d63e2154a
child 2744
4124a5a27707
     1.1 --- a/src/share/vm/opto/doCall.cpp	Sun Mar 27 13:17:37 2011 -0700
     1.2 +++ b/src/share/vm/opto/doCall.cpp	Mon Mar 28 03:58:07 2011 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -27,6 +27,7 @@
    1.11  #include "ci/ciCallSite.hpp"
    1.12  #include "ci/ciMethodHandle.hpp"
    1.13  #include "classfile/vmSymbols.hpp"
    1.14 +#include "compiler/compileBroker.hpp"
    1.15  #include "compiler/compileLog.hpp"
    1.16  #include "interpreter/linkResolver.hpp"
    1.17  #include "opto/addnode.hpp"
    1.18 @@ -43,17 +44,17 @@
    1.19  #ifndef PRODUCT
    1.20  void trace_type_profile(ciMethod *method, int depth, int bci, ciMethod *prof_method, ciKlass *prof_klass, int site_count, int receiver_count) {
    1.21    if (TraceTypeProfile || PrintInlining || PrintOptoInlining) {
    1.22 -    tty->print("   ");
    1.23 -    for( int i = 0; i < depth; i++ ) tty->print("  ");
    1.24 -    if (!PrintOpto) {
    1.25 -      method->print_short_name();
    1.26 -      tty->print(" ->");
    1.27 +    if (!PrintInlining) {
    1.28 +      if (!PrintOpto && !PrintCompilation) {
    1.29 +        method->print_short_name();
    1.30 +        tty->cr();
    1.31 +      }
    1.32 +      CompileTask::print_inlining(prof_method, depth, bci);
    1.33      }
    1.34 -    tty->print(" @ %d  ", bci);
    1.35 -    prof_method->print_short_name();
    1.36 -    tty->print("  >>TypeProfile (%d/%d counts) = ", receiver_count, site_count);
    1.37 +    CompileTask::print_inline_indent(depth);
    1.38 +    tty->print(" \\-> TypeProfile (%d/%d counts) = ", receiver_count, site_count);
    1.39      prof_klass->name()->print_symbol();
    1.40 -    tty->print_cr(" (%d bytes)", prof_method->code_size());
    1.41 +    tty->cr();
    1.42    }
    1.43  }
    1.44  #endif
    1.45 @@ -269,13 +270,13 @@
    1.46            }
    1.47            if (miss_cg != NULL) {
    1.48              if (next_hit_cg != NULL) {
    1.49 -              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth(), jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1)));
    1.50 +              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1)));
    1.51                // We don't need to record dependency on a receiver here and below.
    1.52                // Whenever we inline, the dependency is added by Parse::Parse().
    1.53                miss_cg = CallGenerator::for_predicted_call(profile.receiver(1), miss_cg, next_hit_cg, PROB_MAX);
    1.54              }
    1.55              if (miss_cg != NULL) {
    1.56 -              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth(), jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count));
    1.57 +              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count));
    1.58                cg = CallGenerator::for_predicted_call(profile.receiver(0), miss_cg, hit_cg, profile.receiver_prob(0));
    1.59                if (cg != NULL)  return cg;
    1.60              }

mercurial