Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/g1BiasedArray.hpp @ 17760:5479cb006184
8036860: Pad and cache-align the BiasedMappedArray
Summary: Pad and cache-align BiasedMappedArray instances by default to avoid performance variability problems due to false sharing, as instances of this data structures are typically used for performance sensitive code.
Reviewed-by: brutisso, stefank
author | tschatzl |
---|---|
date | Mon, 24 Mar 2014 15:31:00 +0100 |
parents | a19bea467577 |
children | 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp Mon Mar 24 15:30:56 2014 +0100 +++ b/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp Mon Mar 24 15:31:00 2014 +0100 @@ -25,8 +25,8 @@ #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1BIASEDARRAY_HPP #define SHARE_VM_GC_IMPLEMENTATION_G1_G1BIASEDARRAY_HPP +#include "memory/allocation.hpp" #include "utilities/debug.hpp" -#include "memory/allocation.inline.hpp" // Implements the common base functionality for arrays that contain provisions // for accessing its elements using a biased index. @@ -48,11 +48,7 @@ _bias(0), _shift_by(0) { } // Allocate a new array, generic version. - static address create_new_base_array(size_t length, size_t elem_size) { - assert(length > 0, "just checking"); - assert(elem_size > 0, "just checking"); - return NEW_C_HEAP_ARRAY(u_char, length * elem_size, mtGC); - } + static address create_new_base_array(size_t length, size_t elem_size); // Initialize the members of this class. The biased start address of this array // is the bias (in elements) multiplied by the element size.