8276209: Some call sites doesn't pass the parameter 'size' to SharedRuntime::dtrace_object_alloc(_base)
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
71c4b19517
commit
c815c5cbbb
@ -1091,7 +1091,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
StubFrame f(sasm, "dtrace_object_alloc", dont_gc_arguments);
|
||||
save_live_registers(sasm);
|
||||
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), c_rarg0);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), c_rarg0);
|
||||
|
||||
restore_live_registers(sasm);
|
||||
}
|
||||
|
@ -3563,7 +3563,7 @@ void TemplateTable::_new() {
|
||||
// Trigger dtrace event for fastpath
|
||||
__ push(atos); // save the return value
|
||||
__ call_VM_leaf(
|
||||
CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), r0);
|
||||
CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), r0);
|
||||
__ pop(atos); // restore the return value
|
||||
|
||||
}
|
||||
|
@ -3985,7 +3985,7 @@ void TemplateTable::_new() {
|
||||
__ cbz(Rtemp, Lcontinue);
|
||||
|
||||
__ push(atos);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), Robj);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), Robj);
|
||||
__ pop(atos);
|
||||
|
||||
__ bind(Lcontinue);
|
||||
|
@ -694,7 +694,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
// save_live_registers(sasm);
|
||||
//
|
||||
// __ save_thread(L7_thread_cache);
|
||||
// __ call(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc),
|
||||
// __ call(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)),
|
||||
// relocInfo::runtime_call_type);
|
||||
// __ delayed()->mov(I0, O0);
|
||||
// __ restore_thread(L7_thread_cache);
|
||||
|
@ -3803,7 +3803,7 @@ void TemplateTable::_new() {
|
||||
// Check and trigger dtrace event.
|
||||
SkipIfEqualZero::skip_to_label_if_equal_zero(_masm, Rscratch, &DTraceAllocProbes, Ldone);
|
||||
__ push(atos);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc));
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)));
|
||||
__ pop(atos);
|
||||
|
||||
__ b(Ldone);
|
||||
|
@ -667,7 +667,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
save_live_registers(sasm, 1);
|
||||
|
||||
__ NOT_LP64(push(rax)) LP64_ONLY(mov(c_rarg0, rax));
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc)));
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc))));
|
||||
NOT_LP64(__ pop(rax));
|
||||
|
||||
restore_live_registers(sasm);
|
||||
|
@ -3822,7 +3822,7 @@ void TemplateTable::_new() {
|
||||
SkipIfEqual skip(_masm, &DTraceAllocProbes, false, Z_ARG5 /*scratch*/);
|
||||
// Trigger dtrace event for fastpath.
|
||||
__ push(atos); // Save the return value.
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), RallocatedObject);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), RallocatedObject);
|
||||
__ pop(atos); // Restore the return value.
|
||||
}
|
||||
__ z_bru(done);
|
||||
|
@ -1497,7 +1497,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
save_live_registers(sasm, 1);
|
||||
|
||||
__ NOT_LP64(push(rax)) LP64_ONLY(mov(c_rarg0, rax));
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc)));
|
||||
__ call(RuntimeAddress(CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc))));
|
||||
NOT_LP64(__ pop(rax));
|
||||
|
||||
restore_live_registers(sasm);
|
||||
|
@ -4038,7 +4038,7 @@ void TemplateTable::_new() {
|
||||
// Trigger dtrace event for fastpath
|
||||
__ push(atos);
|
||||
__ call_VM_leaf(
|
||||
CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), rax);
|
||||
CAST_FROM_FN_PTR(address, static_cast<int (*)(oopDesc*)>(SharedRuntime::dtrace_object_alloc)), rax);
|
||||
__ pop(atos);
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ void MemAllocator::Allocation::notify_allocation_dtrace_sampler() {
|
||||
Klass* klass = obj()->klass();
|
||||
size_t word_size = _allocator._word_size;
|
||||
if (klass != NULL && klass->name() != NULL) {
|
||||
SharedRuntime::dtrace_object_alloc(obj(), (int)word_size);
|
||||
SharedRuntime::dtrace_object_alloc(Thread::current(), obj(), word_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1635,7 +1635,8 @@ void PhaseMacroExpand::expand_dtrace_alloc_probe(AllocateNode* alloc, Node* oop,
|
||||
// Slow-path call
|
||||
int size = TypeFunc::Parms + 2;
|
||||
CallLeafNode *call = new CallLeafNode(OptoRuntime::dtrace_object_alloc_Type(),
|
||||
CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc_base),
|
||||
CAST_FROM_FN_PTR(address,
|
||||
static_cast<int (*)(Thread*, oopDesc*)>(SharedRuntime::dtrace_object_alloc)),
|
||||
"dtrace_object_alloc",
|
||||
TypeRawPtr::BOTTOM);
|
||||
|
||||
|
@ -1001,11 +1001,15 @@ jlong SharedRuntime::get_java_tid(Thread* thread) {
|
||||
* it gets turned into a tail-call on sparc, which runs into dtrace bug
|
||||
* 6254741. Once that is fixed we can remove the dummy return value.
|
||||
*/
|
||||
int SharedRuntime::dtrace_object_alloc(oopDesc* o, int size) {
|
||||
return dtrace_object_alloc_base(Thread::current(), o, size);
|
||||
int SharedRuntime::dtrace_object_alloc(oopDesc* o) {
|
||||
return dtrace_object_alloc(Thread::current(), o, o->size());
|
||||
}
|
||||
|
||||
int SharedRuntime::dtrace_object_alloc_base(Thread* thread, oopDesc* o, int size) {
|
||||
int SharedRuntime::dtrace_object_alloc(Thread* thread, oopDesc* o) {
|
||||
return dtrace_object_alloc(thread, o, o->size());
|
||||
}
|
||||
|
||||
int SharedRuntime::dtrace_object_alloc(Thread* thread, oopDesc* o, size_t size) {
|
||||
assert(DTraceAllocProbes, "wrong call");
|
||||
Klass* klass = o->klass();
|
||||
Symbol* name = klass->name();
|
||||
|
@ -271,8 +271,9 @@ class SharedRuntime: AllStatic {
|
||||
static void register_finalizer(JavaThread* thread, oopDesc* obj);
|
||||
|
||||
// dtrace notifications
|
||||
static int dtrace_object_alloc(oopDesc* o, int size);
|
||||
static int dtrace_object_alloc_base(Thread* thread, oopDesc* o, int size);
|
||||
static int dtrace_object_alloc(oopDesc* o);
|
||||
static int dtrace_object_alloc(Thread* thread, oopDesc* o);
|
||||
static int dtrace_object_alloc(Thread* thread, oopDesc* o, size_t size);
|
||||
static int dtrace_method_entry(JavaThread* thread, Method* m);
|
||||
static int dtrace_method_exit(JavaThread* thread, Method* m);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user