10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "ci/ciMethod.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "runtime/frame.inline.hpp" 29 30 // Size of interpreter code. Increase if too small. Interpreter will 31 // fail with a guarantee ("not enough space for interpreter generation"); 32 // if too small. 33 // Run with +PrintInterpreter to get the VM to print out the size. 34 // Max size with JVMTI 35 #ifdef AMD64 36 int TemplateInterpreter::InterpreterCodeSize = 256 * 1024; 37 #else 38 int TemplateInterpreter::InterpreterCodeSize = 224 * 1024; 39 #endif // AMD64 40 41 // asm based interpreter deoptimization helpers 42 int AbstractInterpreter::size_activation(int max_stack, 43 int temps, 44 int extra_args, 45 int monitors, 46 int callee_params, 47 int callee_locals, 48 bool is_top_frame) { 49 // Note: This calculation must exactly parallel the frame setup 50 // in TemplateInterpreterGenerator::generate_fixed_frame. 51 52 // fixed size of an interpreter frame: 53 int overhead = frame::sender_sp_offset - 54 frame::interpreter_frame_initial_sp_offset; 55 // Our locals were accounted for by the caller (or last_frame_adjust 56 // on the transistion) Since the callee parameters already account 57 // for the callee's params we only need to account for the extra 58 // locals. 59 int size = overhead + | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "ci/ciMethod.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "runtime/frame.inline.hpp" 29 30 31 // asm based interpreter deoptimization helpers 32 int AbstractInterpreter::size_activation(int max_stack, 33 int temps, 34 int extra_args, 35 int monitors, 36 int callee_params, 37 int callee_locals, 38 bool is_top_frame) { 39 // Note: This calculation must exactly parallel the frame setup 40 // in TemplateInterpreterGenerator::generate_fixed_frame. 41 42 // fixed size of an interpreter frame: 43 int overhead = frame::sender_sp_offset - 44 frame::interpreter_frame_initial_sp_offset; 45 // Our locals were accounted for by the caller (or last_frame_adjust 46 // on the transistion) Since the callee parameters already account 47 // for the callee's params we only need to account for the extra 48 // locals. 49 int size = overhead + |