JDK-6587322 : dtrace probe object__alloc doesn't fire in some situations on amd64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u3
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • CPU: x86
  • Submitted: 2007-07-31
  • Updated: 2011-04-19
  • Resolved: 2011-04-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7 b85Fixed hs17Fixed
Description
In the interpreter code, templateTable_amd64.cpp, function: void
TemplateTable::_new(), line:3335-3342 contains the code for DTrace of
object allocation. But if the code fall into the previous if-branch
(line:3302), it will jump to the line: 3352, which will not report the
object allocation to DTrace. 

This is sponsored bug (fix). Originator/submitter is: Neo Jia <###@###.###>

Comments
EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/455df1b81409,ChangeRequest=6587322
09-02-2010

SUGGESTED FIX Index: templateTable_amd64.cpp =================================================================== --- templateTable_amd64.cpp (revision 211) +++ templateTable_amd64.cpp (working copy) @@ -3327,18 +3327,19 @@ (intptr_t) markOopDesc::prototype()); // header (address 0x1) } __ movq(Address(rax, oopDesc::klass_offset_in_bytes()), rsi); // klass + + { + SkipIfEqual skip(_masm, &DTraceAllocProbes, false); + // Trigger dtrace event for fastpath + __ push(atos); // save the return value + __ call_VM_leaf( + CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), rax); + __ pop(atos); // restore the return value + } + __ jmp(done); } - { - SkipIfEqual skip(_masm, &DTraceAllocProbes, false); - // Trigger dtrace event for fastpath - __ push(atos); // save the return value - __ call_VM_leaf( - CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), rax); - __ pop(atos); // restore the return value - } - // slow case __ bind(slow_case); __ get_constant_pool(c_rarg1);
31-07-2007

EVALUATION i486 and sparc code have code to call probe in right place, and this code is misplaced for amd64.
31-07-2007