Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions src/hotspot/share/classfile/fieldLayoutBuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -137,7 +137,7 @@ void FieldLayout::initialize_instance_layout(const InstanceKlass* super_klass) {
} else {
bool has_fields = reconstruct_layout(super_klass);
fill_holes(super_klass);
if ((UseEmptySlotsInSupers && !super_klass->has_contended_annotations()) || !has_fields) {
if (!super_klass->has_contended_annotations() || !has_fields) {
_start = _blocks; // start allocating fields from the first empty block
} else {
_start = _last; // append fields at the end of the reconstructed layout
Expand Down Expand Up @@ -364,20 +364,6 @@ void FieldLayout::fill_holes(const InstanceKlass* super_klass) {
b = p;
}

if (!UseEmptySlotsInSupers) {
// Add an empty slots to align fields of the subclass on a heapOopSize boundary
// in order to emulate the behavior of the previous algorithm
int align = (b->offset() + b->size()) % heapOopSize;
if (align != 0) {
int sz = heapOopSize - align;
LayoutRawBlock* p = new LayoutRawBlock(LayoutRawBlock::EMPTY, sz);
p->set_offset(b->offset() + b->size());
b->set_next_block(p);
p->set_prev_block(b);
b = p;
}
}

LayoutRawBlock* last = new LayoutRawBlock(LayoutRawBlock::EMPTY, INT_MAX);
last->set_offset(b->offset() + b->size());
assert(last->offset() > 0, "Sanity check");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,14 @@ static SpecialFlag const special_jvm_flags[] = {
{ "DontYieldALot", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "PreserveAllAnnotations", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseNotificationThread", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseEmptySlotsInSupers", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
{ "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },

// -------------- Obsolete Flags - sorted by expired_in --------------

{ "MetaspaceReclaimPolicy", JDK_Version::undefined(), JDK_Version::jdk(21), JDK_Version::undefined() },

{ "UseEmptySlotsInSupers", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "OldSize", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#if defined(X86)
{ "UseRTMLocking", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/runtime/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1948,10 +1948,6 @@ const int ObjectAlignmentInBytes = 8;
product(bool, UseFastUnorderedTimeStamps, false, EXPERIMENTAL, \
"Use platform unstable time where supported for timestamps only") \
\
product(bool, UseEmptySlotsInSupers, true, \
"(Deprecated) Allow allocating fields in empty slots of " \
"super-classes") \
\
product(bool, DeoptimizeNMethodBarriersALot, false, DIAGNOSTIC, \
"Make nmethod barriers deoptimise a lot.") \
\
Expand Down
79 changes: 0 additions & 79 deletions test/hotspot/jtreg/runtime/FieldLayout/OldLayoutCheck.java

This file was deleted.