comparison src/share/vm/interpreter/linkResolver.cpp @ 1783:d5d065957597

6953144: Tiered compilation Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation. Reviewed-by: kvn, never, phh, twisti
author iveresov
date Fri, 03 Sep 2010 17:51:07 -0700
parents 083fde3b838e
children f95d63e2154a
comparison
equal deleted inserted replaced
1782:f353275af40e 1783:d5d065957597
1 /* 1 /*
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
81 _resolved_klass = resolved_klass; 81 _resolved_klass = resolved_klass;
82 _selected_klass = selected_klass; 82 _selected_klass = selected_klass;
83 _resolved_method = resolved_method; 83 _resolved_method = resolved_method;
84 _selected_method = selected_method; 84 _selected_method = selected_method;
85 _vtable_index = vtable_index; 85 _vtable_index = vtable_index;
86 if (CompilationPolicy::mustBeCompiled(selected_method)) { 86 if (CompilationPolicy::must_be_compiled(selected_method)) {
87 // This path is unusual, mostly used by the '-Xcomp' stress test mode. 87 // This path is unusual, mostly used by the '-Xcomp' stress test mode.
88 88
89 // Note: with several active threads, the mustBeCompiled may be true 89 // Note: with several active threads, the must_be_compiled may be true
90 // while canBeCompiled is false; remove assert 90 // while can_be_compiled is false; remove assert
91 // assert(CompilationPolicy::canBeCompiled(selected_method), "cannot compile"); 91 // assert(CompilationPolicy::can_be_compiled(selected_method), "cannot compile");
92 if (THREAD->is_Compiler_thread()) { 92 if (THREAD->is_Compiler_thread()) {
93 // don't force compilation, resolve was on behalf of compiler 93 // don't force compilation, resolve was on behalf of compiler
94 return; 94 return;
95 } 95 }
96 if (instanceKlass::cast(selected_method->method_holder())->is_not_initialized()) { 96 if (instanceKlass::cast(selected_method->method_holder())->is_not_initialized()) {
102 // We sometimes use the link resolver to do reflective lookups 102 // We sometimes use the link resolver to do reflective lookups
103 // even before classes are initialized. 103 // even before classes are initialized.
104 return; 104 return;
105 } 105 }
106 CompileBroker::compile_method(selected_method, InvocationEntryBci, 106 CompileBroker::compile_method(selected_method, InvocationEntryBci,
107 methodHandle(), 0, "mustBeCompiled", CHECK); 107 CompLevel_initial_compile,
108 methodHandle(), 0, "must_be_compiled", CHECK);
108 } 109 }
109 } 110 }
110 111
111 112
112 //------------------------------------------------------------------------------------------------------------------------ 113 //------------------------------------------------------------------------------------------------------------------------