Shark tweak
Gary Benson
gbenson at redhat.com
Thu Jun 18 09:20:12 PDT 2009
Hi all,
This commit tweaks when a warning is printed.
Cheers,
Gary
--
http://gbenson.net/
-------------- next part --------------
diff -r 4e8a6af384a1 -r 025782d51e5c ChangeLog
--- a/ChangeLog Thu Jun 18 12:00:59 2009 -0400
+++ b/ChangeLog Thu Jun 18 12:14:25 2009 -0400
@@ -1,3 +1,9 @@
+2009-06-18 Gary Benson <gbenson at redhat.com>
+
+ * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
+ (SharkTopLevelBlock::improve_virtual_call): Only print cast
+ warnings when run with -XX:+SharkPerformanceWarnings.
+
2009-06-18 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/share/vm/shark/sharkInvariants.hpp: New file.
diff -r 4e8a6af384a1 -r 025782d51e5c ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 18 12:00:59 2009 -0400
+++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Jun 18 12:14:25 2009 -0400
@@ -902,15 +902,15 @@
// types, but I can't even tell which direction it
// doesn't like. For now I'm going to block *any* cast.
if (monomorphic_target != dest_method) {
-#ifndef PRODUCT
- tty->print_cr("found monomorphic target, but inhibited cast:");
- tty->print(" dest_method = ");
- dest_method->print_short_name(tty);
- tty->cr();
- tty->print(" monomorphic_target = ");
- monomorphic_target->print_short_name(tty);
- tty->cr();
-#endif // !PRODUCT
+ if (SharkPerformanceWarnings) {
+ warning("found monomorphic target, but inhibited cast:");
+ tty->print(" dest_method = ");
+ dest_method->print_short_name(tty);
+ tty->cr();
+ tty->print(" monomorphic_target = ");
+ monomorphic_target->print_short_name(tty);
+ tty->cr();
+ }
monomorphic_target = NULL;
}
}
More information about the distro-pkg-dev
mailing list