changeset 22442:7eda81bed2f3

added comment explaining why SharedRuntime::register_finalizer performs a dynamic check that an object has a finalizer
author Doug Simon <doug.simon@oracle.com>
date Thu, 20 Aug 2015 22:57:39 +0200
parents fd3d534aecca
children fddb4d4ce5b6
files src/share/vm/runtime/sharedRuntime.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp	Thu Aug 20 21:56:50 2015 +0200
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Thu Aug 20 22:57:39 2015 +0200
@@ -1014,6 +1014,11 @@
 
 JRT_ENTRY_NO_ASYNC(void, SharedRuntime::register_finalizer(JavaThread* thread, oopDesc* obj))
 #if INCLUDE_JVMCI
+  // This removes the requirement for JVMCI compilers to emit code
+  // performing a dynamic check that obj has a finalizer before
+  // calling this routine. There should be no performance impact
+  // for C1 since it emits a dynamic check. C2 and the interpreter
+  // uses other runtime routines for registering finalizers.
   if (!obj->klass()->has_finalizer()) {
     return;
   }