Disable a broken optimization in Shark
Gary Benson
gbenson at redhat.com
Wed May 5 03:30:29 PDT 2010
Hi all,
This commit disables an optimization that Shark cannot currently
support. Explained in the code. PR icedtea/481.
Cheers,
Gary
--
http://gbenson.net/
-------------- next part --------------
diff -r b571e4dc0ca6 -r 540dc0858c17 ChangeLog
--- a/ChangeLog Tue May 04 17:50:37 2010 +0100
+++ b/ChangeLog Wed May 05 11:28:27 2010 +0100
@@ -1,3 +1,10 @@
+2010-05-05 Gary Benson <gbenson at redhat.com>
+
+ PR icedtea/481
+ * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
+ (SharkTopLevelBlock::improve_virtual_call): Disable an
+ optimization that cannot currently be supported.
+
2010-05-04 Andrew John Hughes <ahughes at redhat.com>
Move OpenJDK patches to appropriate subdirectory.
diff -r b571e4dc0ca6 -r 540dc0858c17 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Tue May 04 17:50:37 2010 +0100
+++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Wed May 05 11:28:27 2010 +0100
@@ -903,6 +903,18 @@
dest_method->holder() == java_lang_Object_klass())
return dest_method;
+#ifdef SHARK_CAN_DEOPTIMIZE_ANYWHERE
+ // This code can replace a virtual call with a direct call if this
+ // class is the only one in the entire set of loaded classes that
+ // implements this method. This makes the compiled code dependent
+ // on other classes that implement the method not being loaded, a
+ // condition which is enforced by the dependency tracker. If the
+ // dependency tracker determines a method has become invalid it
+ // will mark it for recompilation, causing running copies to be
+ // deoptimized. Shark currently can't deoptimize arbitrarily like
+ // that, so this optimization cannot be used.
+ // http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=481
+
// All other interesting cases are instance classes
if (!receiver_type->is_instance_klass())
return NULL;
@@ -958,6 +970,8 @@
// with non-monomorphic targets if the receiver has an exact
// type. We don't mark types this way, so we can't do this.
+#endif // SHARK_CAN_DEOPTIMIZE_ANYWHERE
+
return NULL;
}
More information about the distro-pkg-dev
mailing list