diff src/share/vm/oops/cpCacheKlass.cpp @ 3892:baf763f388e6

7059037: Use BIS for zeroing on T4 Summary: Use BIS for zeroing new allocated big (2Kb and more) objects and arrays. Reviewed-by: never, twisti, ysr
author kvn
date Fri, 26 Aug 2011 08:52:22 -0700
parents c7f3d0b4570f
children
line wrap: on
line diff
--- a/src/share/vm/oops/cpCacheKlass.cpp	Thu Aug 25 20:29:30 2011 -0700
+++ b/src/share/vm/oops/cpCacheKlass.cpp	Fri Aug 26 08:52:22 2011 -0700
@@ -63,8 +63,10 @@
   //   CollectedHeap::permanent_obj_allocate(klass, size, CHECK_NULL);
 
   oop obj = CollectedHeap::permanent_obj_allocate_no_klass_install(klass, size, CHECK_NULL);
-  NOT_PRODUCT(Universe::heap()->check_for_bad_heap_word_value((HeapWord*) obj,
-                                                              size));
+#ifndef PRODUCT
+  const size_t hs = oopDesc::header_size();
+  Universe::heap()->check_for_bad_heap_word_value(((HeapWord*) obj)+hs, size-hs);
+#endif
   constantPoolCacheOop cache = (constantPoolCacheOop) obj;
   assert(!UseConcMarkSweepGC || obj->klass_or_null() == NULL,
          "klass should be NULL here when using CMS");