--- a/hotspot/src/share/vm/opto/graphKit.cpp Wed Oct 07 19:01:55 2009 -0400
+++ b/hotspot/src/share/vm/opto/graphKit.cpp Fri Oct 16 02:05:46 2009 -0700
@@ -3186,6 +3186,15 @@
return;
}
+ if (use_ReduceInitialCardMarks()
+ && obj == just_allocated_object(control())) {
+ // We can skip marks on a freshly-allocated object in Eden.
+ // Keep this code in sync with maybe_defer_card_mark() in runtime.cpp.
+ // That routine informs GC to take appropriate compensating steps
+ // so as to make this card-mark elision safe.
+ return;
+ }
+
if (!use_precise) {
// All card marks for a (non-array) instance are in one place:
adr = obj;