8164508: unexpected profiling mismatch in c1 generated code
authorjcm
Fri, 09 Sep 2016 06:11:54 -0700
changeset 41319 af9a986a9ce2
parent 41318 af7443b374fb
child 41320 01ba89ffe494
8164508: unexpected profiling mismatch in c1 generated code Summary: made 8027631 first arg skip applicable to not inlined virtual callsite too. Reviewed-by: kvn
hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
hotspot/test/compiler/jsr292/NullConstantReceiver.java
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Wed Sep 07 12:23:25 2016 -0700
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Sep 09 06:11:54 2016 -0700
@@ -3210,14 +3210,14 @@
       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;
--- a/hotspot/test/compiler/jsr292/NullConstantReceiver.java	Wed Sep 07 12:23:25 2016 -0700
+++ b/hotspot/test/compiler/jsr292/NullConstantReceiver.java	Fri Sep 09 06:11:54 2016 -0700
@@ -23,10 +23,11 @@
 
 /**
  * @test
- * @bug 8059556 8158639
+ * @bug 8059556 8158639 8164508
  *
  * @run main/othervm -Xbatch compiler.jsr292.NullConstantReceiver
  * @run main/othervm -Xbatch -XX:CompileCommand=exclude,*::run compiler.jsr292.NullConstantReceiver
+ * @run main/othervm -Xbatch -XX:CompileCommand=compileonly,*::run compiler.jsr292.NullConstantReceiver
  */
 
 package compiler.jsr292;