Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ narrowKlass CodeInstaller::record_narrow_metadata_reference(CodeSection* section
int index = _oop_recorder->find_index(klass);
section->relocate(dest, metadata_Relocation::spec(index));
JVMCI_event_3("narrowKlass[%d of %d] = %s", index, _oop_recorder->metadata_count(), klass->name()->as_C_string());
guarantee(CompressedKlassPointers::is_in_encoding_range(klass), "klass cannot be compressed: %s", klass->external_name());
guarantee(CompressedKlassPointers::is_encodable(klass), "klass cannot be compressed: %s", klass->external_name());
return CompressedKlassPointers::encode(klass);
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import jdk.vm.ci.meta.Constant;

/**
* Marker interface for hotspot specific constants.
* A value in a space managed by Hotspot (e.g. heap or metaspace).
* Some of these values can be referenced with a compressed pointer
* instead of a full word-sized pointer.
*/
public interface HotSpotConstant extends Constant {

Expand All @@ -42,8 +44,7 @@ public interface HotSpotConstant extends Constant {
/**
* Gets a compressed version of this uncompressed constant.
*
* @throws IllegalArgumentException if this is a compressed constant
* or this constant is not compressible
* @throws IllegalArgumentException if this constant is not compressible
*/
Constant compress();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public boolean isCompressed() {

@Override
public boolean isCompressible() {
if (compressed) {
return false;
}
if (metaspaceObject instanceof HotSpotResolvedJavaType t && !t.isArray()) {
// As of JDK-8338526, interface and abstract types are not stored
// in compressible metaspace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public boolean isCompressed() {

@Override
public boolean isCompressible() {
return true;
return !compressed;
}

@Override
Expand Down