# HG changeset patch # User dlong # Date 1512499111 28800 # Node ID 0dc66cdf4720a63b36e57eea6bcbd35ef40431d8 # Parent 1a0499fd252e0d069a5ea9d3effc7ae1e85731b7 8145579: SimpleThresholdPolicy assumes non-trivial methods to be trivial Reviewed-by: shade, kvn, thartmann diff -r 1a0499fd252e -r 0dc66cdf4720 src/hotspot/share/c1/c1_GraphBuilder.cpp --- a/src/hotspot/share/c1/c1_GraphBuilder.cpp Tue Dec 05 09:49:23 2017 -0800 +++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp Tue Dec 05 10:38:31 2017 -0800 @@ -1439,6 +1439,9 @@ } if (needs_check) { + // Not a trivial method because C2 can do better with inlined check. + compilation()->set_would_profile(true); + // Perform the registration of finalizable objects. ValueStack* state_before = copy_state_for_exception(); load_local(objectType, 0); @@ -3556,6 +3559,9 @@ } bool GraphBuilder::try_inline_intrinsics(ciMethod* callee, bool ignore_return) { + // Not a trivial method because C2 may do intrinsics better. + compilation()->set_would_profile(true); + // For calling is_intrinsic_available we need to transition to // the '_thread_in_vm' state because is_intrinsic_available() // accesses critical VM-internal data.