8218406: C1: Redundant nmethod dependency for private method is added
Reviewed-by: kvn
--- 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