Mercurial > hg > graal-compiler
comparison src/share/vm/gc_interface/collectedHeap.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 | 1d1603768966 |
children | d968f546734e |
comparison
equal
deleted
inserted
replaced
3891:ac8738449b6f | 3892:baf763f388e6 |
---|---|
155 } | 155 } |
156 if (ZeroTLAB) { | 156 if (ZeroTLAB) { |
157 // ..and clear it. | 157 // ..and clear it. |
158 Copy::zero_to_words(obj, new_tlab_size); | 158 Copy::zero_to_words(obj, new_tlab_size); |
159 } else { | 159 } else { |
160 // ...and clear just the allocated object. | 160 // ...and zap just allocated object. |
161 Copy::zero_to_words(obj, size); | 161 #ifdef ASSERT |
162 // Skip mangling the space corresponding to the object header to | |
163 // ensure that the returned space is not considered parsable by | |
164 // any concurrent GC thread. | |
165 size_t hdr_size = oopDesc::header_size(); | |
166 Copy::fill_to_words(obj + hdr_size, new_tlab_size - hdr_size, badHeapWordVal); | |
167 #endif // ASSERT | |
162 } | 168 } |
163 thread->tlab().fill(obj, obj + size, new_tlab_size); | 169 thread->tlab().fill(obj, obj + size, new_tlab_size); |
164 return obj; | 170 return obj; |
165 } | 171 } |
166 | 172 |