提交 935505d7 编写于 作者: D dbuck

8164508: unexpected profiling mismatch in c1 generated code

Summary: made 8027631 first arg skip applicable to not inlined virtual callsite too.
Reviewed-by: kvn, jcm
上级 40d1bc75
......@@ -3191,14 +3191,14 @@ void LIRGenerator::profile_arguments(ProfileCall* x) {
Bytecodes::Code bc = x->method()->java_code_at_bci(bci);
int start = 0;
int stop = data->is_CallTypeData() ? ((ciCallTypeData*)data)->number_of_arguments() : ((ciVirtualCallTypeData*)data)->number_of_arguments();
if (x->inlined() && x->callee()->is_static() && Bytecodes::has_receiver(bc)) {
if (x->callee()->is_loaded() && x->callee()->is_static() && Bytecodes::has_receiver(bc)) {
// first argument is not profiled at call (method handle invoke)
assert(x->method()->raw_code_at_bci(bci) == Bytecodes::_invokehandle, "invokehandle expected");
start = 1;
}
ciSignature* callee_signature = x->callee()->signature();
// method handle call to virtual method
bool has_receiver = x->inlined() && !x->callee()->is_static() && !Bytecodes::has_receiver(bc);
bool has_receiver = x->callee()->is_loaded() && !x->callee()->is_static() && !Bytecodes::has_receiver(bc);
ciSignatureStream callee_signature_stream(callee_signature, has_receiver ? x->callee()->holder() : NULL);
bool ignored_will_link;
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -23,10 +23,11 @@
/**
* @test
* @bug 8059556 8158639
* @bug 8059556 8158639 8164508
*
* @run main/othervm -Xbatch NullConstantReceiver
* @run main/othervm -Xbatch -XX:CompileCommand=exclude,*::run NullConstantReceiver
* @run main/othervm -Xbatch -XX:CompileCommand=compileonly,*::run NullConstantReceiver
*/
import java.lang.invoke.MethodHandle;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册