mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8036860: Pad and cache-align the BiasedMappedArray
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
This commit is contained in:
parent
483ea400a5
commit
a07b2194f7
4 changed files with 28 additions and 6 deletions
|
@ -24,6 +24,14 @@
|
|||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc_implementation/g1/g1BiasedArray.hpp"
|
||||
#include "memory/padded.inline.hpp"
|
||||
|
||||
// Allocate a new array, generic version.
|
||||
address G1BiasedMappedArrayBase::create_new_base_array(size_t length, size_t elem_size) {
|
||||
assert(length > 0, "just checking");
|
||||
assert(elem_size > 0, "just checking");
|
||||
return PaddedPrimitiveArray<u_char, mtGC>::create_unfreeable(length * elem_size);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void G1BiasedMappedArrayBase::verify_index(idx_t index) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue