mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-14 07:29:51 +00:00
8210884: ZGC: Remove insertion of filler objects
Reviewed-by: eosterlund
This commit is contained in:
parent
85e31a838e
commit
ebfb84c1fe
@ -285,11 +285,6 @@ inline uintptr_t ZPage::alloc_object(size_t size) {
|
||||
|
||||
_top = new_top;
|
||||
|
||||
// Fill alignment padding if needed
|
||||
if (aligned_size != size) {
|
||||
ZUtils::insert_filler_object(addr + size, aligned_size - size);
|
||||
}
|
||||
|
||||
return ZAddress::good(addr);
|
||||
}
|
||||
|
||||
@ -308,11 +303,6 @@ inline uintptr_t ZPage::alloc_object_atomic(size_t size) {
|
||||
|
||||
const uintptr_t prev_top = Atomic::cmpxchg(new_top, &_top, addr);
|
||||
if (prev_top == addr) {
|
||||
// Fill alignment padding if needed
|
||||
if (aligned_size != size) {
|
||||
ZUtils::insert_filler_object(addr + size, aligned_size - size);
|
||||
}
|
||||
|
||||
// Success
|
||||
return ZAddress::good(addr);
|
||||
}
|
||||
|
||||
@ -22,8 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/z/zAddress.inline.hpp"
|
||||
#include "gc/z/zUtils.inline.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
@ -40,10 +38,3 @@ uintptr_t ZUtils::alloc_aligned(size_t alignment, size_t size) {
|
||||
|
||||
return (uintptr_t)res;
|
||||
}
|
||||
|
||||
void ZUtils::insert_filler_object(uintptr_t addr, size_t size) {
|
||||
const size_t fill_size_in_words = bytes_to_words(size);
|
||||
if (fill_size_in_words >= CollectedHeap::min_fill_size()) {
|
||||
CollectedHeap::fill_with_objects((HeapWord*)ZAddress::good(addr), fill_size_in_words);
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,9 +42,6 @@ public:
|
||||
// Object
|
||||
static size_t object_size(uintptr_t addr);
|
||||
static void object_copy(uintptr_t from, uintptr_t to, size_t size);
|
||||
|
||||
// Filler
|
||||
static void insert_filler_object(uintptr_t addr, size_t size);
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_Z_ZUTILS_HPP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user