2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2013-12-24 11:48:39 -08:00
|
|
|
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2010-05-27 19:08:38 -07:00
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "precompiled.hpp"
|
2012-11-12 14:03:53 -08:00
|
|
|
#include "ci/ciReplay.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "classfile/systemDictionary.hpp"
|
|
|
|
#include "classfile/vmSymbols.hpp"
|
2011-03-28 03:58:07 -07:00
|
|
|
#include "compiler/compileBroker.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "compiler/compileLog.hpp"
|
|
|
|
#include "interpreter/linkResolver.hpp"
|
|
|
|
#include "oops/objArrayKlass.hpp"
|
|
|
|
#include "opto/callGenerator.hpp"
|
|
|
|
#include "opto/parse.hpp"
|
|
|
|
#include "runtime/handles.inline.hpp"
|
2015-03-13 21:53:13 +03:00
|
|
|
#include "utilities/events.hpp"
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
//------------------------------InlineTree-------------------------------------
|
2011-06-22 14:45:37 -07:00
|
|
|
InlineTree::InlineTree(Compile* c,
|
|
|
|
const InlineTree *caller_tree, ciMethod* callee,
|
|
|
|
JVMState* caller_jvms, int caller_bci,
|
|
|
|
float site_invoke_ratio, int max_inline_level) :
|
|
|
|
C(c),
|
|
|
|
_caller_jvms(caller_jvms),
|
|
|
|
_caller_tree((InlineTree*) caller_tree),
|
|
|
|
_method(callee),
|
|
|
|
_site_invoke_ratio(site_invoke_ratio),
|
|
|
|
_max_inline_level(max_inline_level),
|
2012-12-23 17:08:22 +01:00
|
|
|
_count_inline_bcs(method()->code_size_for_inlining()),
|
2013-02-27 05:58:48 -08:00
|
|
|
_subtrees(c->comp_arena(), 2, 0, NULL),
|
|
|
|
_msg(NULL)
|
2010-01-08 13:58:49 -08:00
|
|
|
{
|
2014-01-08 10:25:50 -08:00
|
|
|
#ifndef PRODUCT
|
|
|
|
_count_inlines = 0;
|
|
|
|
_forced_inline = false;
|
|
|
|
#endif
|
2007-12-01 00:00:00 +00:00
|
|
|
if (_caller_jvms != NULL) {
|
|
|
|
// Keep a private copy of the caller_jvms:
|
|
|
|
_caller_jvms = new (C) JVMState(caller_jvms->method(), caller_tree->caller_jvms());
|
|
|
|
_caller_jvms->set_bci(caller_jvms->bci());
|
2009-07-31 17:12:33 -07:00
|
|
|
assert(!caller_jvms->should_reexecute(), "there should be no reexecute bytecode with inlining");
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
assert(_caller_jvms->same_calls_as(caller_jvms), "consistent JVMS");
|
2010-01-08 13:58:49 -08:00
|
|
|
assert((caller_tree == NULL ? 0 : caller_tree->stack_depth() + 1) == stack_depth(), "correct (redundant) depth parameter");
|
2007-12-01 00:00:00 +00:00
|
|
|
assert(caller_bci == this->caller_bci(), "correct (redundant) bci parameter");
|
2014-01-24 15:26:56 +04:00
|
|
|
// Update hierarchical counts, count_inline_bcs() and count_inlines()
|
|
|
|
InlineTree *caller = (InlineTree *)caller_tree;
|
|
|
|
for( ; caller != NULL; caller = ((InlineTree *)(caller->caller_tree())) ) {
|
|
|
|
caller->_count_inline_bcs += count_inline_bcs();
|
|
|
|
NOT_PRODUCT(caller->_count_inlines++;)
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-13 14:36:39 -07:00
|
|
|
/**
|
|
|
|
* Return true when EA is ON and a java constructor is called or
|
|
|
|
* a super constructor is called from an inlined java constructor.
|
|
|
|
* Also return true for boxing methods.
|
|
|
|
*/
|
2008-03-07 11:09:13 -08:00
|
|
|
static bool is_init_with_ea(ciMethod* callee_method,
|
|
|
|
ciMethod* caller_method, Compile* C) {
|
2013-05-13 14:36:39 -07:00
|
|
|
if (!C->do_escape_analysis() || !EliminateAllocations) {
|
|
|
|
return false; // EA is off
|
|
|
|
}
|
|
|
|
if (callee_method->is_initializer()) {
|
|
|
|
return true; // constuctor
|
|
|
|
}
|
|
|
|
if (caller_method->is_initializer() &&
|
|
|
|
caller_method != C->method() &&
|
|
|
|
caller_method->holder()->is_subclass_of(callee_method->holder())) {
|
|
|
|
return true; // super constructor is called from inlined constructor
|
|
|
|
}
|
|
|
|
if (C->eliminate_boxing() && callee_method->is_boxing_method()) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
|
|
|
|
2013-05-13 14:36:39 -07:00
|
|
|
/**
|
|
|
|
* Force inlining unboxing accessor.
|
|
|
|
*/
|
2013-05-08 15:08:01 -07:00
|
|
|
static bool is_unboxing_method(ciMethod* callee_method, Compile* C) {
|
|
|
|
return C->eliminate_boxing() && callee_method->is_unboxing_method();
|
|
|
|
}
|
|
|
|
|
2013-02-27 05:58:48 -08:00
|
|
|
// positive filter: should callee be inlined?
|
|
|
|
bool InlineTree::should_inline(ciMethod* callee_method, ciMethod* caller_method,
|
|
|
|
int caller_bci, ciCallProfile& profile,
|
|
|
|
WarmCallInfo* wci_result) {
|
2007-12-01 00:00:00 +00:00
|
|
|
// Allows targeted inlining
|
2015-10-20 18:07:28 +02:00
|
|
|
if (C->directive()->should_inline(callee_method)) {
|
2007-12-01 00:00:00 +00:00
|
|
|
*wci_result = *(WarmCallInfo::always_hot());
|
2013-09-24 16:08:00 -07:00
|
|
|
if (C->print_inlining() && Verbose) {
|
2011-06-22 14:45:37 -07:00
|
|
|
CompileTask::print_inline_indent(inline_level());
|
2007-12-01 00:00:00 +00:00
|
|
|
tty->print_cr("Inlined method is hot: ");
|
|
|
|
}
|
2015-09-18 10:11:11 +02:00
|
|
|
set_msg("force inline by CompileCommand");
|
2014-01-08 10:25:50 -08:00
|
|
|
_forced_inline = true;
|
2013-02-27 05:58:48 -08:00
|
|
|
return true;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2014-07-14 03:24:35 -07:00
|
|
|
if (callee_method->force_inline()) {
|
|
|
|
set_msg("force inline by annotation");
|
|
|
|
_forced_inline = true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-01-08 10:25:50 -08:00
|
|
|
#ifndef PRODUCT
|
|
|
|
int inline_depth = inline_level()+1;
|
|
|
|
if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
|
|
|
|
set_msg("force inline by ciReplay");
|
|
|
|
_forced_inline = true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-08-31 01:40:45 -07:00
|
|
|
int size = callee_method->code_size_for_inlining();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Check for too many throws (and not too huge)
|
2008-03-07 11:09:13 -08:00
|
|
|
if(callee_method->interpreter_throwout_count() > InlineThrowCount &&
|
|
|
|
size < InlineThrowMaxSize ) {
|
2007-12-01 00:00:00 +00:00
|
|
|
wci_result->set_profit(wci_result->profit() * 100);
|
2013-09-24 16:08:00 -07:00
|
|
|
if (C->print_inlining() && Verbose) {
|
2011-06-22 14:45:37 -07:00
|
|
|
CompileTask::print_inline_indent(inline_level());
|
2007-12-01 00:00:00 +00:00
|
|
|
tty->print_cr("Inlined method with many throws (throws=%d):", callee_method->interpreter_throwout_count());
|
|
|
|
}
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("many throws");
|
|
|
|
return true;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2011-05-10 00:45:03 -07:00
|
|
|
int default_max_inline_size = C->max_inline_size();
|
|
|
|
int inline_small_code_size = InlineSmallCode / 4;
|
|
|
|
int max_inline_size = default_max_inline_size;
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
int call_site_count = method()->scale_count(profile.count());
|
|
|
|
int invoke_count = method()->interpreter_invocation_count();
|
2011-05-10 00:45:03 -07:00
|
|
|
|
|
|
|
assert(invoke_count != 0, "require invocation count greater than zero");
|
|
|
|
int freq = call_site_count / invoke_count;
|
2008-03-07 11:09:13 -08:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// bump the max size if the call is frequent
|
2008-03-07 11:09:13 -08:00
|
|
|
if ((freq >= InlineFrequencyRatio) ||
|
|
|
|
(call_site_count >= InlineFrequencyCount) ||
|
2013-05-08 15:08:01 -07:00
|
|
|
is_unboxing_method(callee_method, C) ||
|
2008-03-07 11:09:13 -08:00
|
|
|
is_init_with_ea(callee_method, caller_method, C)) {
|
|
|
|
|
2011-05-10 00:45:03 -07:00
|
|
|
max_inline_size = C->freq_inline_size();
|
|
|
|
if (size <= max_inline_size && TraceFrequencyInlining) {
|
2011-06-22 14:45:37 -07:00
|
|
|
CompileTask::print_inline_indent(inline_level());
|
2007-12-01 00:00:00 +00:00
|
|
|
tty->print_cr("Inlined frequent method (freq=%d count=%d):", freq, call_site_count);
|
2011-06-22 14:45:37 -07:00
|
|
|
CompileTask::print_inline_indent(inline_level());
|
2007-12-01 00:00:00 +00:00
|
|
|
callee_method->print();
|
|
|
|
tty->cr();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// Not hot. Check for medium-sized pre-existing nmethod at cold sites.
|
2008-03-07 11:09:13 -08:00
|
|
|
if (callee_method->has_compiled_code() &&
|
2013-03-19 10:56:33 -07:00
|
|
|
callee_method->instructions_size() > inline_small_code_size) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("already compiled into a medium method");
|
|
|
|
return false;
|
2013-03-19 10:56:33 -07:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2011-05-10 00:45:03 -07:00
|
|
|
if (size > max_inline_size) {
|
2013-02-27 05:58:48 -08:00
|
|
|
if (max_inline_size > default_max_inline_size) {
|
|
|
|
set_msg("hot method too big");
|
|
|
|
} else {
|
|
|
|
set_msg("too big");
|
|
|
|
}
|
|
|
|
return false;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2013-02-27 05:58:48 -08:00
|
|
|
return true;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-27 05:58:48 -08:00
|
|
|
// negative filter: should callee NOT be inlined?
|
|
|
|
bool InlineTree::should_not_inline(ciMethod *callee_method,
|
|
|
|
ciMethod* caller_method,
|
2013-10-04 10:11:48 -07:00
|
|
|
JVMState* jvms,
|
2013-02-27 05:58:48 -08:00
|
|
|
WarmCallInfo* wci_result) {
|
|
|
|
|
|
|
|
const char* fail_msg = NULL;
|
|
|
|
|
|
|
|
// First check all inlining restrictions which are required for correctness
|
|
|
|
if ( callee_method->is_abstract()) {
|
|
|
|
fail_msg = "abstract method"; // // note: we allow ik->is_abstract()
|
|
|
|
} else if (!callee_method->holder()->is_initialized()) {
|
|
|
|
fail_msg = "method holder not initialized";
|
|
|
|
} else if ( callee_method->is_native()) {
|
|
|
|
fail_msg = "native method";
|
|
|
|
} else if ( callee_method->dont_inline()) {
|
|
|
|
fail_msg = "don't inline by annotation";
|
|
|
|
}
|
|
|
|
|
|
|
|
// one more inlining restriction
|
|
|
|
if (fail_msg == NULL && callee_method->has_unloaded_classes_in_signature()) {
|
|
|
|
fail_msg = "unloaded signature classes";
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-02-27 05:58:48 -08:00
|
|
|
if (fail_msg != NULL) {
|
|
|
|
set_msg(fail_msg);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ignore heuristic controls on inlining
|
2015-10-20 18:07:28 +02:00
|
|
|
if (C->directive()->should_inline(callee_method)) {
|
2015-09-18 10:11:11 +02:00
|
|
|
set_msg("force inline by CompileCommand");
|
2013-02-27 05:58:48 -08:00
|
|
|
return false;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2015-10-20 18:07:28 +02:00
|
|
|
if (C->directive()->should_not_inline(callee_method)) {
|
2015-09-18 10:11:11 +02:00
|
|
|
set_msg("disallowed by CompileCommand");
|
2013-05-08 15:08:01 -07:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef PRODUCT
|
2014-01-08 10:25:50 -08:00
|
|
|
int caller_bci = jvms->bci();
|
|
|
|
int inline_depth = inline_level()+1;
|
|
|
|
if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
|
|
|
|
set_msg("force inline by ciReplay");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ciReplay::should_not_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
|
|
|
|
set_msg("disallowed by ciReplay");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-05-08 15:08:01 -07:00
|
|
|
if (ciReplay::should_not_inline(callee_method)) {
|
|
|
|
set_msg("disallowed by ciReplay");
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-07-14 03:24:35 -07:00
|
|
|
if (callee_method->force_inline()) {
|
|
|
|
set_msg("force inline by annotation");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Now perform checks which are heuristic
|
|
|
|
|
2013-05-08 15:08:01 -07:00
|
|
|
if (is_unboxing_method(callee_method, C)) {
|
|
|
|
// Inline unboxing methods.
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-07-14 03:24:35 -07:00
|
|
|
if (callee_method->has_compiled_code() &&
|
|
|
|
callee_method->instructions_size() > InlineSmallCode) {
|
|
|
|
set_msg("already compiled into a big method");
|
|
|
|
return true;
|
2012-07-24 10:51:00 -07:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// don't inline exception code unless the top method belongs to an
|
|
|
|
// exception class
|
|
|
|
if (caller_tree() != NULL &&
|
|
|
|
callee_method->holder()->is_subclass_of(C->env()->Throwable_klass())) {
|
|
|
|
const InlineTree *top = this;
|
|
|
|
while (top->caller_tree() != NULL) top = top->caller_tree();
|
|
|
|
ciInstanceKlass* k = top->method()->holder();
|
2013-02-27 05:58:48 -08:00
|
|
|
if (!k->is_subclass_of(C->env()->Throwable_klass())) {
|
|
|
|
set_msg("exception method");
|
|
|
|
return true;
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// use frequency-based objections only for non-trivial methods
|
2013-02-27 05:58:48 -08:00
|
|
|
if (callee_method->code_size() <= MaxTrivialSize) {
|
|
|
|
return false;
|
|
|
|
}
|
2008-03-07 11:09:13 -08:00
|
|
|
|
|
|
|
// don't use counts with -Xcomp or CTW
|
|
|
|
if (UseInterpreter && !CompileTheWorld) {
|
|
|
|
|
|
|
|
if (!callee_method->has_compiled_code() &&
|
|
|
|
!callee_method->was_executed_more_than(0)) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("never executed");
|
|
|
|
return true;
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (is_init_with_ea(callee_method, caller_method, C)) {
|
|
|
|
// Escape Analysis: inline all executed constructors
|
2013-05-08 15:08:01 -07:00
|
|
|
return false;
|
2014-10-15 14:00:41 +02:00
|
|
|
} else {
|
|
|
|
intx counter_high_value;
|
|
|
|
// Tiered compilation uses a different "high value" than non-tiered compilation.
|
|
|
|
// Determine the right value to use.
|
|
|
|
if (TieredCompilation) {
|
|
|
|
counter_high_value = InvocationCounter::count_limit / 2;
|
|
|
|
} else {
|
|
|
|
counter_high_value = CompileThreshold / 2;
|
|
|
|
}
|
|
|
|
if (!callee_method->was_executed_more_than(MIN2(MinInliningThreshold, counter_high_value))) {
|
|
|
|
set_msg("executed < MinInliningThreshold times");
|
|
|
|
return true;
|
|
|
|
}
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2013-02-27 05:58:48 -08:00
|
|
|
return false;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------try_to_inline-----------------------------------
|
2013-02-27 05:58:48 -08:00
|
|
|
// return true if ok
|
2007-12-01 00:00:00 +00:00
|
|
|
// Relocated from "InliningClosure::try_to_inline"
|
2013-02-27 05:58:48 -08:00
|
|
|
bool InlineTree::try_to_inline(ciMethod* callee_method, ciMethod* caller_method,
|
2013-10-04 10:11:48 -07:00
|
|
|
int caller_bci, JVMState* jvms, ciCallProfile& profile,
|
2013-02-27 05:58:48 -08:00
|
|
|
WarmCallInfo* wci_result, bool& should_delay) {
|
|
|
|
|
2014-01-24 15:26:56 +04:00
|
|
|
if (ClipInlining && (int)count_inline_bcs() >= DesiredMethodLimit) {
|
2012-12-23 17:08:22 +01:00
|
|
|
if (!callee_method->force_inline() || !IncrementalInline) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("size > DesiredMethodLimit");
|
|
|
|
return false;
|
2012-12-23 17:08:22 +01:00
|
|
|
} else if (!C->inlining_incrementally()) {
|
|
|
|
should_delay = true;
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2014-01-08 10:25:50 -08:00
|
|
|
_forced_inline = false; // Reset
|
2013-02-27 05:58:48 -08:00
|
|
|
if (!should_inline(callee_method, caller_method, caller_bci, profile,
|
|
|
|
wci_result)) {
|
|
|
|
return false;
|
|
|
|
}
|
2013-10-04 10:11:48 -07:00
|
|
|
if (should_not_inline(callee_method, caller_method, jvms, wci_result)) {
|
2013-02-27 05:58:48 -08:00
|
|
|
return false;
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2010-01-08 13:58:49 -08:00
|
|
|
if (InlineAccessors && callee_method->is_accessor()) {
|
|
|
|
// accessor methods are not subject to any of the following limits.
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("accessor");
|
|
|
|
return true;
|
2010-01-08 13:58:49 -08:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// suppress a few checks for accessors and trivial methods
|
2012-07-24 10:51:00 -07:00
|
|
|
if (callee_method->code_size() > MaxTrivialSize) {
|
2008-03-07 11:09:13 -08:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// don't inline into giant methods
|
2012-12-23 17:08:22 +01:00
|
|
|
if (C->over_inlining_cutoff()) {
|
|
|
|
if ((!callee_method->force_inline() && !caller_method->is_compiled_lambda_form())
|
|
|
|
|| !IncrementalInline) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("NodeCountInliningCutoff");
|
|
|
|
return false;
|
2012-12-23 17:08:22 +01:00
|
|
|
} else {
|
|
|
|
should_delay = true;
|
|
|
|
}
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2008-03-07 11:09:13 -08:00
|
|
|
if ((!UseInterpreter || CompileTheWorld) &&
|
|
|
|
is_init_with_ea(callee_method, caller_method, C)) {
|
|
|
|
// Escape Analysis stress testing when running Xcomp or CTW:
|
|
|
|
// inline constructors even if they are not reached.
|
2014-01-08 10:25:50 -08:00
|
|
|
} else if (forced_inline()) {
|
2014-07-14 03:24:35 -07:00
|
|
|
// Inlining was forced by CompilerOracle, ciReplay or annotation
|
2008-03-07 11:09:13 -08:00
|
|
|
} else if (profile.count() == 0) {
|
|
|
|
// don't inline unreached call sites
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("call site not reached");
|
|
|
|
return false;
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-01-08 13:58:49 -08:00
|
|
|
if (!C->do_inlining() && InlineAccessors) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("not an accessor");
|
|
|
|
return false;
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
2014-06-02 10:01:15 +02:00
|
|
|
|
|
|
|
// Limit inlining depth in case inlining is forced or
|
|
|
|
// _max_inline_level was increased to compensate for lambda forms.
|
|
|
|
if (inline_level() > MaxForceInlineLevel) {
|
|
|
|
set_msg("MaxForceInlineLevel");
|
|
|
|
return false;
|
|
|
|
}
|
2011-06-22 14:45:37 -07:00
|
|
|
if (inline_level() > _max_inline_level) {
|
2012-12-23 17:08:22 +01:00
|
|
|
if (!callee_method->force_inline() || !IncrementalInline) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("inlining too deep");
|
|
|
|
return false;
|
2012-12-23 17:08:22 +01:00
|
|
|
} else if (!C->inlining_incrementally()) {
|
|
|
|
should_delay = true;
|
|
|
|
}
|
2008-03-07 11:09:13 -08:00
|
|
|
}
|
2011-03-28 03:58:07 -07:00
|
|
|
|
2011-05-02 00:55:09 -07:00
|
|
|
// detect direct and indirect recursive inlining
|
2013-10-04 10:11:48 -07:00
|
|
|
{
|
2011-05-02 00:55:09 -07:00
|
|
|
// count the current method and the callee
|
2013-10-04 10:11:48 -07:00
|
|
|
const bool is_compiled_lambda_form = callee_method->is_compiled_lambda_form();
|
|
|
|
int inline_level = 0;
|
|
|
|
if (!is_compiled_lambda_form) {
|
|
|
|
if (method() == callee_method) {
|
|
|
|
inline_level++;
|
|
|
|
}
|
2013-02-27 05:58:48 -08:00
|
|
|
}
|
2011-05-02 00:55:09 -07:00
|
|
|
// count callers of current method and callee
|
2013-10-04 10:11:48 -07:00
|
|
|
Node* callee_argument0 = is_compiled_lambda_form ? jvms->map()->argument(jvms, 0)->uncast() : NULL;
|
|
|
|
for (JVMState* j = jvms->caller(); j != NULL && j->has_method(); j = j->caller()) {
|
|
|
|
if (j->method() == callee_method) {
|
|
|
|
if (is_compiled_lambda_form) {
|
|
|
|
// Since compiled lambda forms are heavily reused we allow recursive inlining. If it is truly
|
|
|
|
// a recursion (using the same "receiver") we limit inlining otherwise we can easily blow the
|
|
|
|
// compiler stack.
|
|
|
|
Node* caller_argument0 = j->map()->argument(j, 0)->uncast();
|
|
|
|
if (caller_argument0 == callee_argument0) {
|
|
|
|
inline_level++;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
inline_level++;
|
2013-02-27 05:58:48 -08:00
|
|
|
}
|
2011-03-28 03:58:07 -07:00
|
|
|
}
|
2013-10-04 10:11:48 -07:00
|
|
|
}
|
|
|
|
if (inline_level > MaxRecursiveInlineLevel) {
|
|
|
|
set_msg("recursive inlining is too deep");
|
|
|
|
return false;
|
2011-03-28 03:58:07 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-08-31 01:40:45 -07:00
|
|
|
int size = callee_method->code_size_for_inlining();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2014-01-24 15:26:56 +04:00
|
|
|
if (ClipInlining && (int)count_inline_bcs() + size >= DesiredMethodLimit) {
|
2012-12-23 17:08:22 +01:00
|
|
|
if (!callee_method->force_inline() || !IncrementalInline) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("size > DesiredMethodLimit");
|
|
|
|
return false;
|
2012-12-23 17:08:22 +01:00
|
|
|
} else if (!C->inlining_incrementally()) {
|
|
|
|
should_delay = true;
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ok, inline this method
|
2013-02-27 05:58:48 -08:00
|
|
|
return true;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------pass_initial_checks----------------------------
|
|
|
|
bool pass_initial_checks(ciMethod* caller_method, int caller_bci, ciMethod* callee_method) {
|
|
|
|
ciInstanceKlass *callee_holder = callee_method ? callee_method->holder() : NULL;
|
|
|
|
// Check if a callee_method was suggested
|
|
|
|
if( callee_method == NULL ) return false;
|
|
|
|
// Check if klass of callee_method is loaded
|
|
|
|
if( !callee_holder->is_loaded() ) return false;
|
|
|
|
if( !callee_holder->is_initialized() ) return false;
|
|
|
|
if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) {
|
|
|
|
// Checks that constant pool's call site has been visited
|
|
|
|
// stricter than callee_holder->is_initialized()
|
|
|
|
ciBytecodeStream iter(caller_method);
|
|
|
|
iter.force_bci(caller_bci);
|
|
|
|
Bytecodes::Code call_bc = iter.cur_bc();
|
2010-01-05 13:05:58 +01:00
|
|
|
// An invokedynamic instruction does not have a klass.
|
|
|
|
if (call_bc != Bytecodes::_invokedynamic) {
|
2010-05-23 01:38:26 -07:00
|
|
|
int index = iter.get_index_u2_cpcache();
|
2010-01-05 13:05:58 +01:00
|
|
|
if (!caller_method->is_klass_loaded(index, true)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
// Try to do constant pool resolution if running Xcomp
|
|
|
|
if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) {
|
|
|
|
return false;
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2011-09-01 01:31:25 -07:00
|
|
|
//------------------------------check_can_parse--------------------------------
|
|
|
|
const char* InlineTree::check_can_parse(ciMethod* callee) {
|
|
|
|
// Certain methods cannot be parsed at all:
|
|
|
|
if ( callee->is_native()) return "native method";
|
2012-07-24 10:51:00 -07:00
|
|
|
if ( callee->is_abstract()) return "abstract method";
|
2011-09-01 01:31:25 -07:00
|
|
|
if (!callee->can_be_compiled()) return "not compilable (disabled)";
|
|
|
|
if (!callee->has_balanced_monitors()) return "not compilable (unbalanced monitors)";
|
|
|
|
if ( callee->get_flow_analysis()->failing()) return "not compilable (flow analysis failed)";
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
//------------------------------print_inlining---------------------------------
|
2013-02-01 03:02:01 -08:00
|
|
|
void InlineTree::print_inlining(ciMethod* callee_method, int caller_bci,
|
2015-03-13 21:53:13 +03:00
|
|
|
ciMethod* caller_method, bool success) const {
|
2013-02-27 05:58:48 -08:00
|
|
|
const char* inline_msg = msg();
|
|
|
|
assert(inline_msg != NULL, "just checking");
|
2013-02-01 03:02:01 -08:00
|
|
|
if (C->log() != NULL) {
|
|
|
|
if (success) {
|
2013-02-27 05:58:48 -08:00
|
|
|
C->log()->inline_success(inline_msg);
|
2013-02-01 03:02:01 -08:00
|
|
|
} else {
|
2013-02-27 05:58:48 -08:00
|
|
|
C->log()->inline_fail(inline_msg);
|
2013-02-01 03:02:01 -08:00
|
|
|
}
|
|
|
|
}
|
2013-09-24 16:08:00 -07:00
|
|
|
if (C->print_inlining()) {
|
2013-02-27 05:58:48 -08:00
|
|
|
C->print_inlining(callee_method, inline_level(), caller_bci, inline_msg);
|
2013-02-01 03:02:01 -08:00
|
|
|
if (callee_method == NULL) tty->print(" callee not monotonic or profiled");
|
|
|
|
if (Verbose && callee_method) {
|
|
|
|
const InlineTree *top = this;
|
|
|
|
while( top->caller_tree() != NULL ) { top = top->caller_tree(); }
|
|
|
|
//tty->print(" bcs: %d+%d invoked: %d", top->count_inline_bcs(), callee_method->code_size(), callee_method->interpreter_invocation_count());
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2015-03-13 21:53:13 +03:00
|
|
|
#if INCLUDE_TRACE
|
|
|
|
EventCompilerInlining event;
|
|
|
|
if (event.should_commit()) {
|
2016-08-23 19:21:48 +02:00
|
|
|
event.set_compileId(C->compile_id());
|
2015-03-13 21:53:13 +03:00
|
|
|
event.set_message(inline_msg);
|
|
|
|
event.set_succeeded(success);
|
|
|
|
event.set_bci(caller_bci);
|
|
|
|
event.set_caller(caller_method->get_Method());
|
|
|
|
event.set_callee(callee_method->to_trace_struct());
|
|
|
|
event.commit();
|
|
|
|
}
|
|
|
|
#endif // INCLUDE_TRACE
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------ok_to_inline-----------------------------------
|
2012-12-23 17:08:22 +01:00
|
|
|
WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms, ciCallProfile& profile, WarmCallInfo* initial_wci, bool& should_delay) {
|
2007-12-01 00:00:00 +00:00
|
|
|
assert(callee_method != NULL, "caller checks for optimized virtual!");
|
2012-12-23 17:08:22 +01:00
|
|
|
assert(!should_delay, "should be initialized to false");
|
2007-12-01 00:00:00 +00:00
|
|
|
#ifdef ASSERT
|
|
|
|
// Make sure the incoming jvms has the same information content as me.
|
|
|
|
// This means that we can eventually make this whole class AllStatic.
|
|
|
|
if (jvms->caller() == NULL) {
|
|
|
|
assert(_caller_jvms == NULL, "redundant instance state");
|
|
|
|
} else {
|
|
|
|
assert(_caller_jvms->same_calls_as(jvms->caller()), "redundant instance state");
|
|
|
|
}
|
|
|
|
assert(_method == jvms->method(), "redundant instance state");
|
|
|
|
#endif
|
|
|
|
int caller_bci = jvms->bci();
|
2013-02-27 05:58:48 -08:00
|
|
|
ciMethod* caller_method = jvms->method();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2011-09-01 01:31:25 -07:00
|
|
|
// Do some initial checks.
|
|
|
|
if (!pass_initial_checks(caller_method, caller_bci, callee_method)) {
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg("failed initial checks");
|
2015-03-13 21:53:13 +03:00
|
|
|
print_inlining(callee_method, caller_bci, caller_method, false /* !success */);
|
2007-12-01 00:00:00 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-09-01 01:31:25 -07:00
|
|
|
// Do some parse checks.
|
2013-02-27 05:58:48 -08:00
|
|
|
set_msg(check_can_parse(callee_method));
|
|
|
|
if (msg() != NULL) {
|
2015-03-13 21:53:13 +03:00
|
|
|
print_inlining(callee_method, caller_bci, caller_method, false /* !success */);
|
2011-09-01 01:31:25 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Check if inlining policy says no.
|
|
|
|
WarmCallInfo wci = *(initial_wci);
|
2013-02-27 05:58:48 -08:00
|
|
|
bool success = try_to_inline(callee_method, caller_method, caller_bci,
|
2013-10-04 10:11:48 -07:00
|
|
|
jvms, profile, &wci, should_delay);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
#ifndef PRODUCT
|
2014-01-24 15:26:56 +04:00
|
|
|
if (InlineWarmCalls && (PrintOpto || C->print_inlining())) {
|
2007-12-01 00:00:00 +00:00
|
|
|
bool cold = wci.is_cold();
|
|
|
|
bool hot = !cold && wci.is_hot();
|
2013-02-27 05:58:48 -08:00
|
|
|
bool old_cold = !success;
|
2007-12-01 00:00:00 +00:00
|
|
|
if (old_cold != cold || (Verbose || WizardMode)) {
|
2013-02-27 05:58:48 -08:00
|
|
|
if (msg() == NULL) {
|
|
|
|
set_msg("OK");
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
tty->print(" OldInlining= %4s : %s\n WCI=",
|
2013-02-27 05:58:48 -08:00
|
|
|
old_cold ? "cold" : "hot", msg());
|
2007-12-01 00:00:00 +00:00
|
|
|
wci.print();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
2014-01-24 15:26:56 +04:00
|
|
|
if (success) {
|
|
|
|
wci = *(WarmCallInfo::always_hot());
|
|
|
|
} else {
|
|
|
|
wci = *(WarmCallInfo::always_cold());
|
2013-02-27 05:58:48 -08:00
|
|
|
}
|
2014-01-24 15:26:56 +04:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
if (!InlineWarmCalls) {
|
|
|
|
if (!wci.is_cold() && !wci.is_hot()) {
|
|
|
|
// Do not inline the warm calls.
|
|
|
|
wci = *(WarmCallInfo::always_cold());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!wci.is_cold()) {
|
|
|
|
// Inline!
|
2013-02-27 05:58:48 -08:00
|
|
|
if (msg() == NULL) {
|
|
|
|
set_msg("inline (hot)");
|
|
|
|
}
|
2015-03-13 21:53:13 +03:00
|
|
|
print_inlining(callee_method, caller_bci, caller_method, true /* success */);
|
2014-01-24 15:26:56 +04:00
|
|
|
build_inline_tree_for_callee(callee_method, jvms, caller_bci);
|
2015-03-13 21:53:13 +03:00
|
|
|
if (InlineWarmCalls && !wci.is_hot()) {
|
2007-12-01 00:00:00 +00:00
|
|
|
return new (C) WarmCallInfo(wci); // copy to heap
|
2015-03-13 21:53:13 +03:00
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
return WarmCallInfo::always_hot();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Do not inline
|
2013-02-27 05:58:48 -08:00
|
|
|
if (msg() == NULL) {
|
|
|
|
set_msg("too cold to inline");
|
|
|
|
}
|
2015-03-13 21:53:13 +03:00
|
|
|
print_inlining(callee_method, caller_bci, caller_method, false /* !success */ );
|
2007-12-01 00:00:00 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------compute_callee_frequency-----------------------
|
|
|
|
float InlineTree::compute_callee_frequency( int caller_bci ) const {
|
|
|
|
int count = method()->interpreter_call_site_count(caller_bci);
|
|
|
|
int invcnt = method()->interpreter_invocation_count();
|
|
|
|
float freq = (float)count/(float)invcnt;
|
|
|
|
// Call-site count / interpreter invocation count, scaled recursively.
|
|
|
|
// Always between 0.0 and 1.0. Represents the percentage of the method's
|
|
|
|
// total execution time used at this call site.
|
|
|
|
|
|
|
|
return freq;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------build_inline_tree_for_callee-------------------
|
|
|
|
InlineTree *InlineTree::build_inline_tree_for_callee( ciMethod* callee_method, JVMState* caller_jvms, int caller_bci) {
|
|
|
|
float recur_frequency = _site_invoke_ratio * compute_callee_frequency(caller_bci);
|
|
|
|
// Attempt inlining.
|
|
|
|
InlineTree* old_ilt = callee_at(caller_bci, callee_method);
|
|
|
|
if (old_ilt != NULL) {
|
|
|
|
return old_ilt;
|
|
|
|
}
|
2011-06-22 14:45:37 -07:00
|
|
|
int max_inline_level_adjust = 0;
|
2010-01-08 13:58:49 -08:00
|
|
|
if (caller_jvms->method() != NULL) {
|
2015-04-27 10:49:43 +02:00
|
|
|
if (caller_jvms->method()->is_compiled_lambda_form()) {
|
2011-06-22 14:45:37 -07:00
|
|
|
max_inline_level_adjust += 1; // don't count actions in MH or indy adapter frames
|
2015-04-27 10:49:43 +02:00
|
|
|
} else if (callee_method->is_method_handle_intrinsic() ||
|
|
|
|
callee_method->is_compiled_lambda_form()) {
|
|
|
|
max_inline_level_adjust += 1; // don't count method handle calls from java.lang.invoke implementation
|
2010-01-08 13:58:49 -08:00
|
|
|
}
|
2013-09-24 16:08:00 -07:00
|
|
|
if (max_inline_level_adjust != 0 && C->print_inlining() && (Verbose || WizardMode)) {
|
2011-06-22 14:45:37 -07:00
|
|
|
CompileTask::print_inline_indent(inline_level());
|
2011-05-10 00:45:03 -07:00
|
|
|
tty->print_cr(" \\-> discounting inline depth");
|
2010-01-08 13:58:49 -08:00
|
|
|
}
|
2011-06-22 14:45:37 -07:00
|
|
|
if (max_inline_level_adjust != 0 && C->log()) {
|
2010-01-08 13:58:49 -08:00
|
|
|
int id1 = C->log()->identify(caller_jvms->method());
|
|
|
|
int id2 = C->log()->identify(callee_method);
|
2011-06-22 14:45:37 -07:00
|
|
|
C->log()->elem("inline_level_discount caller='%d' callee='%d'", id1, id2);
|
2010-01-08 13:58:49 -08:00
|
|
|
}
|
|
|
|
}
|
2011-06-22 14:45:37 -07:00
|
|
|
InlineTree* ilt = new InlineTree(C, this, callee_method, caller_jvms, caller_bci, recur_frequency, _max_inline_level + max_inline_level_adjust);
|
|
|
|
_subtrees.append(ilt);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
NOT_PRODUCT( _count_inlines += 1; )
|
|
|
|
|
|
|
|
return ilt;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------callee_at-----------------------------
|
|
|
|
InlineTree *InlineTree::callee_at(int bci, ciMethod* callee) const {
|
|
|
|
for (int i = 0; i < _subtrees.length(); i++) {
|
|
|
|
InlineTree* sub = _subtrees.at(i);
|
|
|
|
if (sub->caller_bci() == bci && callee == sub->method()) {
|
|
|
|
return sub;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------build_inline_tree_root-------------------------
|
|
|
|
InlineTree *InlineTree::build_inline_tree_root() {
|
|
|
|
Compile* C = Compile::current();
|
|
|
|
|
|
|
|
// Root of inline tree
|
2011-06-22 14:45:37 -07:00
|
|
|
InlineTree* ilt = new InlineTree(C, NULL, C->method(), NULL, -1, 1.0F, MaxInlineLevel);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
return ilt;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------find_subtree_from_root-----------------------------
|
|
|
|
// Given a jvms, which determines a call chain from the root method,
|
|
|
|
// find the corresponding inline tree.
|
|
|
|
// Note: This method will be removed or replaced as InlineTree goes away.
|
2012-07-24 10:51:00 -07:00
|
|
|
InlineTree* InlineTree::find_subtree_from_root(InlineTree* root, JVMState* jvms, ciMethod* callee) {
|
2007-12-01 00:00:00 +00:00
|
|
|
InlineTree* iltp = root;
|
|
|
|
uint depth = jvms && jvms->has_method() ? jvms->depth() : 0;
|
|
|
|
for (uint d = 1; d <= depth; d++) {
|
|
|
|
JVMState* jvmsp = jvms->of_depth(d);
|
|
|
|
// Select the corresponding subtree for this bci.
|
|
|
|
assert(jvmsp->method() == iltp->method(), "tree still in sync");
|
|
|
|
ciMethod* d_callee = (d == depth) ? callee : jvms->of_depth(d+1)->method();
|
|
|
|
InlineTree* sub = iltp->callee_at(jvmsp->bci(), d_callee);
|
2012-07-24 10:51:00 -07:00
|
|
|
if (sub == NULL) {
|
|
|
|
if (d == depth) {
|
|
|
|
sub = iltp->build_inline_tree_for_callee(d_callee, jvmsp, jvmsp->bci());
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2012-07-24 10:51:00 -07:00
|
|
|
guarantee(sub != NULL, "should be a sub-ilt here");
|
|
|
|
return sub;
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
iltp = sub;
|
|
|
|
}
|
|
|
|
return iltp;
|
|
|
|
}
|
2011-09-11 14:48:24 -07:00
|
|
|
|
2014-01-08 10:25:50 -08:00
|
|
|
// Count number of nodes in this subtree
|
|
|
|
int InlineTree::count() const {
|
|
|
|
int result = 1;
|
|
|
|
for (int i = 0 ; i < _subtrees.length(); i++) {
|
|
|
|
result += _subtrees.at(i)->count();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void InlineTree::dump_replay_data(outputStream* out) {
|
|
|
|
out->print(" %d %d ", inline_level(), caller_bci());
|
|
|
|
method()->dump_name_as_ascii(out);
|
|
|
|
for (int i = 0 ; i < _subtrees.length(); i++) {
|
|
|
|
_subtrees.at(i)->dump_replay_data(out);
|
|
|
|
}
|
|
|
|
}
|
2011-09-11 14:48:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef PRODUCT
|
|
|
|
void InlineTree::print_impl(outputStream* st, int indent) const {
|
|
|
|
for (int i = 0; i < indent; i++) st->print(" ");
|
2014-01-08 10:25:50 -08:00
|
|
|
st->print(" @ %d", caller_bci());
|
2011-09-11 14:48:24 -07:00
|
|
|
method()->print_short_name(st);
|
|
|
|
st->cr();
|
|
|
|
|
|
|
|
for (int i = 0 ; i < _subtrees.length(); i++) {
|
|
|
|
_subtrees.at(i)->print_impl(st, indent + 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void InlineTree::print_value_on(outputStream* st) const {
|
|
|
|
print_impl(st, 2);
|
|
|
|
}
|
|
|
|
#endif
|