8218406: C1: Redundant nmethod dependency for private method is added
authorvlivanov
Mon, 04 Feb 2019 17:35:38 -0800
changeset 53634 f57b943a1a22
parent 53633 eebdde444bb5
child 53635 247e5ca412f5
8218406: C1: Redundant nmethod dependency for private method is added Reviewed-by: kvn
src/hotspot/share/c1/c1_GraphBuilder.cpp
--- a/src/hotspot/share/c1/c1_GraphBuilder.cpp	Mon Feb 04 17:35:36 2019 -0800
+++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp	Mon Feb 04 17:35:38 2019 -0800
@@ -1989,7 +1989,7 @@
 
   if (cha_monomorphic_target != NULL) {
     assert(!cha_monomorphic_target->is_abstract(), "");
-    if (!(target->is_final_method())) {
+    if (!target->is_final_method() && !target->is_private()) {
       // If we inlined because CHA revealed only a single target method,
       // then we are dependent on that target method not getting overridden
       // by dynamic class loading.  Be sure to test the "static" receiver