comparison src/share/vm/runtime/sharedRuntime.cpp @ 17884:cf9f24de0b93

8039904: dtrace/hotspot/Monitors/Monitors001 fails with "assert(s > 0) failed: Bad size calculated" Summary: Dtrace monitoring uses size before mirror size is set. Reviewed-by: kamg, hseigel
author coleenp
date Fri, 11 Apr 2014 20:02:37 +0000
parents a9becfeecd1b
children e0a77b91da68
comparison
equal deleted inserted replaced
17883:9428a0b94204 17884:cf9f24de0b93
958 /** 958 /**
959 * This function ought to be a void function, but cannot be because 959 * This function ought to be a void function, but cannot be because
960 * it gets turned into a tail-call on sparc, which runs into dtrace bug 960 * it gets turned into a tail-call on sparc, which runs into dtrace bug
961 * 6254741. Once that is fixed we can remove the dummy return value. 961 * 6254741. Once that is fixed we can remove the dummy return value.
962 */ 962 */
963 int SharedRuntime::dtrace_object_alloc(oopDesc* o) { 963 int SharedRuntime::dtrace_object_alloc(oopDesc* o, int size) {
964 return dtrace_object_alloc_base(Thread::current(), o); 964 return dtrace_object_alloc_base(Thread::current(), o, size);
965 } 965 }
966 966
967 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o) { 967 int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o, int size) {
968 assert(DTraceAllocProbes, "wrong call"); 968 assert(DTraceAllocProbes, "wrong call");
969 Klass* klass = o->klass(); 969 Klass* klass = o->klass();
970 int size = o->size();
971 Symbol* name = klass->name(); 970 Symbol* name = klass->name();
972 #ifndef USDT2 971 #ifndef USDT2
973 HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread), 972 HS_DTRACE_PROBE4(hotspot, object__alloc, get_java_tid(thread),
974 name->bytes(), name->utf8_length(), size * HeapWordSize); 973 name->bytes(), name->utf8_length(), size * HeapWordSize);
975 #else /* USDT2 */ 974 #else /* USDT2 */