comparison src/cpu/x86/vm/templateInterpreter_x86_64.cpp @ 2118:dd031b2226de

4930919: race condition in MDO creation at back branch locations Summary: Reuse set_method_data_for_bcp() to setup mdp after MDO creation. Reviewed-by: kvn, never
author iveresov
date Mon, 10 Jan 2011 18:46:29 -0800
parents 0fc262af204f
children b599a4c6c2df
comparison
equal deleted inserted replaced
2117:70427f06ea47 2118:dd031b2226de
1 /* 1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2011, 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.
1381 // invocation counter overflow 1381 // invocation counter overflow
1382 if (inc_counter) { 1382 if (inc_counter) {
1383 if (ProfileInterpreter) { 1383 if (ProfileInterpreter) {
1384 // We have decided to profile this method in the interpreter 1384 // We have decided to profile this method in the interpreter
1385 __ bind(profile_method); 1385 __ bind(profile_method);
1386 1386 __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method));
1387 __ call_VM(noreg, 1387 __ set_method_data_pointer_for_bcp();
1388 CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method),
1389 r13, true);
1390
1391 __ movptr(rbx, Address(rbp, method_offset)); // restore methodOop
1392 __ movptr(rax, Address(rbx,
1393 in_bytes(methodOopDesc::method_data_offset())));
1394 __ movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize),
1395 rax);
1396 __ test_method_data_pointer(rax, profile_method_continue);
1397 __ addptr(rax, in_bytes(methodDataOopDesc::data_offset()));
1398 __ movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize),
1399 rax);
1400 __ jmp(profile_method_continue); 1388 __ jmp(profile_method_continue);
1401 } 1389 }
1402 // Handle overflow of counter and compile method 1390 // Handle overflow of counter and compile method
1403 __ bind(invocation_counter_overflow); 1391 __ bind(invocation_counter_overflow);
1404 generate_counter_overflow(&continue_after_compile); 1392 generate_counter_overflow(&continue_after_compile);