mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 12:40:10 +00:00
Merge branch 'master' into fix-c2-convi2l-8356184
This commit is contained in:
commit
5855b2d897
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,6 +16,7 @@ NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/src/utils/LogCompilation/target/
|
||||
/src/utils/LogCompilation/logc.jar
|
||||
/.project/
|
||||
/.settings/
|
||||
/compile_commands.json
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2026, 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
|
||||
@ -66,7 +66,8 @@ CALLED_SPEC_TARGETS := $(filter-out $(ALL_GLOBAL_TARGETS), $(CALLED_TARGETS))
|
||||
ifeq ($(CALLED_SPEC_TARGETS), )
|
||||
SKIP_SPEC := true
|
||||
endif
|
||||
ifeq ($(findstring p, $(MAKEFLAGS))$(findstring q, $(MAKEFLAGS)), pq)
|
||||
MFLAGS_SINGLE := $(filter-out --%, $(MFLAGS))
|
||||
ifeq ($(findstring p, $(MFLAGS_SINGLE))$(findstring q, $(MFLAGS_SINGLE)), pq)
|
||||
SKIP_SPEC := true
|
||||
endif
|
||||
|
||||
|
||||
@ -267,7 +267,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
|
||||
LIBZ_LIBS=""
|
||||
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then
|
||||
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib"
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx -o "x$OPENJDK_TARGET_OS" = xaix -o "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
LIBZ_CFLAGS="$LIBZ_CFLAGS -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1"
|
||||
fi
|
||||
else
|
||||
|
||||
@ -3403,11 +3403,13 @@ encode %{
|
||||
} else if (rtype == relocInfo::metadata_type) {
|
||||
__ mov_metadata(dst_reg, (Metadata*)con);
|
||||
} else {
|
||||
assert(rtype == relocInfo::none, "unexpected reloc type");
|
||||
assert(rtype == relocInfo::none || rtype == relocInfo::external_word_type, "unexpected reloc type");
|
||||
// load fake address constants using a normal move
|
||||
if (! __ is_valid_AArch64_address(con) ||
|
||||
con < (address)(uintptr_t)os::vm_page_size()) {
|
||||
__ mov(dst_reg, con);
|
||||
} else {
|
||||
// no reloc so just use adrp and add
|
||||
uint64_t offset;
|
||||
__ adrp(dst_reg, con, offset);
|
||||
__ add(dst_reg, dst_reg, offset);
|
||||
@ -4535,6 +4537,18 @@ operand immP_1()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// AOT Runtime Constants Address
|
||||
operand immAOTRuntimeConstantsAddress()
|
||||
%{
|
||||
// Check if the address is in the range of AOT Runtime Constants
|
||||
predicate(AOTRuntimeConstants::contains((address)(n->get_ptr())));
|
||||
match(ConP);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// Float and Double operands
|
||||
// Double Immediate
|
||||
operand immD()
|
||||
@ -6898,6 +6912,20 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
|
||||
ins_pipe(ialu_imm);
|
||||
%}
|
||||
|
||||
instruct loadAOTRCAddress(iRegPNoSp dst, immAOTRuntimeConstantsAddress con)
|
||||
%{
|
||||
match(Set dst con);
|
||||
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "adr $dst, $con\t# AOT Runtime Constants Address" %}
|
||||
|
||||
ins_encode %{
|
||||
__ load_aotrc_address($dst$$Register, (address)$con$$constant);
|
||||
%}
|
||||
|
||||
ins_pipe(ialu_imm);
|
||||
%}
|
||||
|
||||
// Load Narrow Pointer Constant
|
||||
|
||||
instruct loadConN(iRegNNoSp dst, immN con)
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "c1/c1_ValueStack.hpp"
|
||||
#include "ci/ciArrayKlass.hpp"
|
||||
#include "ci/ciInstance.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "code/compiledIC.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
@ -532,6 +533,15 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
|
||||
case T_LONG: {
|
||||
assert(patch_code == lir_patch_none, "no patching handled here");
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
address b = c->as_pointer();
|
||||
if (AOTRuntimeConstants::contains(b)) {
|
||||
__ load_aotrc_address(dest->as_register_lo(), b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
__ mov(dest->as_register_lo(), (intptr_t)c->as_jlong());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "gc/g1/g1BarrierSet.hpp"
|
||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||
@ -243,9 +244,25 @@ static void generate_post_barrier(MacroAssembler* masm,
|
||||
assert_different_registers(store_addr, new_val, thread, tmp1, tmp2, noreg, rscratch1);
|
||||
|
||||
// Does store cross heap regions?
|
||||
__ eor(tmp1, store_addr, new_val); // tmp1 := store address ^ new value
|
||||
__ lsr(tmp1, tmp1, G1HeapRegion::LogOfHRGrainBytes); // tmp1 := ((store address ^ new value) >> LogOfHRGrainBytes)
|
||||
__ cbz(tmp1, done);
|
||||
#if INCLUDE_CDS
|
||||
// AOT code needs to load the barrier grain shift from the aot
|
||||
// runtime constants area in the code cache otherwise we can compile
|
||||
// it as an immediate operand
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
address grain_shift_address = (address)AOTRuntimeConstants::grain_shift_address();
|
||||
__ eor(tmp1, store_addr, new_val);
|
||||
__ lea(tmp2, ExternalAddress(grain_shift_address));
|
||||
__ ldrb(tmp2, tmp2);
|
||||
__ lsrv(tmp1, tmp1, tmp2);
|
||||
__ cbz(tmp1, done);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__ eor(tmp1, store_addr, new_val); // tmp1 := store address ^ new value
|
||||
__ lsr(tmp1, tmp1, G1HeapRegion::LogOfHRGrainBytes); // tmp1 := ((store address ^ new value) >> LogOfHRGrainBytes)
|
||||
__ cbz(tmp1, done);
|
||||
}
|
||||
|
||||
// Crosses regions, storing null?
|
||||
if (new_val_may_be_null) {
|
||||
__ cbz(new_val, done);
|
||||
|
||||
@ -5754,6 +5754,14 @@ void MacroAssembler::adrp(Register reg1, const Address &dest, uint64_t &byte_off
|
||||
}
|
||||
|
||||
void MacroAssembler::load_byte_map_base(Register reg) {
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
address byte_map_base_adr = AOTRuntimeConstants::card_table_base_address();
|
||||
lea(reg, ExternalAddress(byte_map_base_adr));
|
||||
ldr(reg, Address(reg));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
CardTableBarrierSet* ctbs = CardTableBarrierSet::barrier_set();
|
||||
|
||||
// Strictly speaking the card table base isn't an address at all, and it might
|
||||
@ -5761,6 +5769,20 @@ void MacroAssembler::load_byte_map_base(Register reg) {
|
||||
mov(reg, (uint64_t)ctbs->card_table_base_const());
|
||||
}
|
||||
|
||||
void MacroAssembler::load_aotrc_address(Register reg, address a) {
|
||||
#if INCLUDE_CDS
|
||||
assert(AOTRuntimeConstants::contains(a), "address out of range for data area");
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
// all aotrc field addresses should be registered in the AOTCodeCache address table
|
||||
lea(reg, ExternalAddress(a));
|
||||
} else {
|
||||
mov(reg, (uint64_t)a);
|
||||
}
|
||||
#else
|
||||
ShouldNotReachHere();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MacroAssembler::build_frame(int framesize) {
|
||||
assert(framesize >= 2 * wordSize, "framesize must include space for FP/LR");
|
||||
assert(framesize % (2*wordSize) == 0, "must preserve 2*wordSize alignment");
|
||||
|
||||
@ -1476,6 +1476,9 @@ public:
|
||||
// Load the base of the cardtable byte map into reg.
|
||||
void load_byte_map_base(Register reg);
|
||||
|
||||
// Load a constant address in the AOT Runtime Constants area
|
||||
void load_aotrc_address(Register reg, address a);
|
||||
|
||||
// Prolog generator routines to support switch between x86 code and
|
||||
// generated ARM code
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "c1/c1_ValueStack.hpp"
|
||||
#include "ci/ciArrayKlass.hpp"
|
||||
#include "ci/ciInstance.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "compiler/oopMap.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
@ -535,6 +536,15 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
|
||||
|
||||
case T_LONG: {
|
||||
assert(patch_code == lir_patch_none, "no patching handled here");
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
address b = c->as_pointer();
|
||||
if (AOTRuntimeConstants::contains(b)) {
|
||||
__ load_aotrc_address(dest->as_register_lo(), b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
__ movptr(dest->as_register_lo(), (intptr_t)c->as_jlong());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "gc/g1/g1BarrierSet.hpp"
|
||||
#include "gc/g1/g1BarrierSetAssembler.hpp"
|
||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||
@ -268,6 +269,16 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
|
||||
__ bind(done);
|
||||
}
|
||||
|
||||
#if INCLUDE_CDS
|
||||
// return a register that differs from reg1, reg2, reg3 and reg4
|
||||
|
||||
static Register pick_different_reg(Register reg1, Register reg2 = noreg, Register reg3= noreg, Register reg4 = noreg) {
|
||||
RegSet available = (RegSet::of(rscratch1, rscratch2, rax, rbx) + rdx -
|
||||
RegSet::of(reg1, reg2, reg3, reg4));
|
||||
return *(available.begin());
|
||||
}
|
||||
#endif // INCLUDE_CDS
|
||||
|
||||
static void generate_post_barrier(MacroAssembler* masm,
|
||||
const Register store_addr,
|
||||
const Register new_val,
|
||||
@ -280,10 +291,32 @@ static void generate_post_barrier(MacroAssembler* masm,
|
||||
|
||||
Label L_done;
|
||||
// Does store cross heap regions?
|
||||
__ movptr(tmp1, store_addr); // tmp1 := store address
|
||||
__ xorptr(tmp1, new_val); // tmp1 := store address ^ new value
|
||||
__ shrptr(tmp1, G1HeapRegion::LogOfHRGrainBytes); // ((store address ^ new value) >> LogOfHRGrainBytes) == 0?
|
||||
__ jccb(Assembler::equal, L_done);
|
||||
#if INCLUDE_CDS
|
||||
// AOT code needs to load the barrier grain shift from the aot
|
||||
// runtime constants area in the code cache otherwise we can compile
|
||||
// it as an immediate operand
|
||||
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
address grain_shift_addr = AOTRuntimeConstants::grain_shift_address();
|
||||
Register save = pick_different_reg(rcx, tmp1, new_val, store_addr);
|
||||
__ push(save);
|
||||
__ movptr(save, store_addr);
|
||||
__ xorptr(save, new_val);
|
||||
__ push(rcx);
|
||||
__ lea(rcx, ExternalAddress(grain_shift_addr));
|
||||
__ movl(rcx, Address(rcx, 0));
|
||||
__ shrptr(save);
|
||||
__ pop(rcx);
|
||||
__ pop(save);
|
||||
__ jcc(Assembler::equal, L_done);
|
||||
} else
|
||||
#endif // INCLUDE_CDS
|
||||
{
|
||||
__ movptr(tmp1, store_addr); // tmp1 := store address
|
||||
__ xorptr(tmp1, new_val); // tmp1 := store address ^ new value
|
||||
__ shrptr(tmp1, G1HeapRegion::LogOfHRGrainBytes); // ((store address ^ new value) >> LogOfHRGrainBytes) == 0?
|
||||
__ jccb(Assembler::equal, L_done);
|
||||
}
|
||||
|
||||
// Crosses regions, storing null?
|
||||
if (new_val_may_be_null) {
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "gc/shared/barrierSet.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
@ -111,7 +112,15 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
__ shrptr(end, CardTable::card_shift());
|
||||
__ subptr(end, addr); // end --> cards count
|
||||
|
||||
__ mov64(tmp, (intptr_t)ctbs->card_table_base_const());
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
__ lea(tmp, ExternalAddress(AOTRuntimeConstants::card_table_base_address()));
|
||||
__ movq(tmp, Address(tmp, 0));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
__ mov64(tmp, (intptr_t)ctbs->card_table_base_const());
|
||||
}
|
||||
__ addptr(addr, tmp);
|
||||
__ BIND(L_loop);
|
||||
__ movb(Address(addr, count, Address::times_1), 0);
|
||||
@ -121,7 +130,7 @@ __ BIND(L_loop);
|
||||
__ BIND(L_done);
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register obj, Address dst) {
|
||||
void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register obj, Address dst, Register rscratch) {
|
||||
// Does a store check for the oop in register obj. The content of
|
||||
// register obj is destroyed afterwards.
|
||||
CardTableBarrierSet* ctbs = CardTableBarrierSet::barrier_set();
|
||||
@ -136,6 +145,13 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register ob
|
||||
// never need to be relocated. On 64bit however the value may be too
|
||||
// large for a 32bit displacement.
|
||||
intptr_t byte_map_base = (intptr_t)ctbs->card_table_base_const();
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
__ lea(rscratch, ExternalAddress(AOTRuntimeConstants::card_table_base_address()));
|
||||
__ movq(rscratch, Address(rscratch, 0));
|
||||
card_addr = Address(rscratch, obj, Address::times_1, 0);
|
||||
} else
|
||||
#endif
|
||||
if (__ is_simm32(byte_map_base)) {
|
||||
card_addr = Address(noreg, obj, Address::times_1, byte_map_base);
|
||||
} else {
|
||||
@ -174,10 +190,10 @@ void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorS
|
||||
if (needs_post_barrier) {
|
||||
// flatten object address if needed
|
||||
if (!precise || (dst.index() == noreg && dst.disp() == 0)) {
|
||||
store_check(masm, dst.base(), dst);
|
||||
store_check(masm, dst.base(), dst, tmp2);
|
||||
} else {
|
||||
__ lea(tmp1, dst);
|
||||
store_check(masm, tmp1, dst);
|
||||
store_check(masm, tmp1, dst, tmp2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ protected:
|
||||
virtual void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register addr, Register count) {}
|
||||
|
||||
void store_check(MacroAssembler* masm, Register obj, Address dst);
|
||||
void store_check(MacroAssembler* masm, Register obj, Address dst, Register rscratch);
|
||||
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators, Register addr, Register count, Register tmp);
|
||||
|
||||
|
||||
@ -10034,6 +10034,20 @@ void MacroAssembler::restore_legacy_gprs() {
|
||||
addq(rsp, 16 * wordSize);
|
||||
}
|
||||
|
||||
void MacroAssembler::load_aotrc_address(Register reg, address a) {
|
||||
#if INCLUDE_CDS
|
||||
assert(AOTRuntimeConstants::contains(a), "address out of range for data area");
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
// all aotrc field addresses should be registered in the AOTCodeCache address table
|
||||
lea(reg, ExternalAddress(a));
|
||||
} else {
|
||||
mov64(reg, (uint64_t)a);
|
||||
}
|
||||
#else
|
||||
ShouldNotReachHere();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MacroAssembler::setcc(Assembler::Condition comparison, Register dst) {
|
||||
if (VM_Version::supports_apx_f()) {
|
||||
esetzucc(comparison, dst);
|
||||
|
||||
@ -2070,6 +2070,7 @@ public:
|
||||
|
||||
void save_legacy_gprs();
|
||||
void restore_legacy_gprs();
|
||||
void load_aotrc_address(Register reg, address a);
|
||||
void setcc(Assembler::Condition comparison, Register dst);
|
||||
};
|
||||
|
||||
|
||||
@ -5187,6 +5187,18 @@ operand immL_65535()
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
// AOT Runtime Constants Address
|
||||
operand immAOTRuntimeConstantsAddress()
|
||||
%{
|
||||
// Check if the address is in the range of AOT Runtime Constants
|
||||
predicate(AOTRuntimeConstants::contains((address)(n->get_ptr())));
|
||||
match(ConP);
|
||||
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(CONST_INTER);
|
||||
%}
|
||||
|
||||
operand kReg()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(vectmask_reg));
|
||||
@ -7332,6 +7344,19 @@ instruct loadD(regD dst, memory mem)
|
||||
ins_pipe(pipe_slow); // XXX
|
||||
%}
|
||||
|
||||
instruct loadAOTRCAddress(rRegP dst, immAOTRuntimeConstantsAddress con)
|
||||
%{
|
||||
match(Set dst con);
|
||||
|
||||
format %{ "leaq $dst, $con\t# AOT Runtime Constants Address" %}
|
||||
|
||||
ins_encode %{
|
||||
__ load_aotrc_address($dst$$Register, (address)$con$$constant);
|
||||
%}
|
||||
|
||||
ins_pipe(ialu_reg_fat);
|
||||
%}
|
||||
|
||||
// max = java.lang.Math.max(float a, float b)
|
||||
instruct maxF_reg_avx10_2(regF dst, regF a, regF b) %{
|
||||
predicate(VM_Version::supports_avx10_2());
|
||||
|
||||
@ -27,22 +27,30 @@
|
||||
#include "runtime/vm_version.hpp"
|
||||
|
||||
int VM_Version::get_current_sve_vector_length() {
|
||||
assert(_features & CPU_SVE, "should not call this");
|
||||
assert(VM_Version::supports_sve(), "should not call this");
|
||||
ShouldNotReachHere();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int VM_Version::set_and_get_current_sve_vector_length(int length) {
|
||||
assert(_features & CPU_SVE, "should not call this");
|
||||
assert(VM_Version::supports_sve(), "should not call this");
|
||||
ShouldNotReachHere();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void VM_Version::get_os_cpu_info() {
|
||||
|
||||
if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) _features |= CPU_CRC32;
|
||||
if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) _features |= CPU_AES | CPU_SHA1 | CPU_SHA2;
|
||||
if (IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)) _features |= CPU_ASIMD;
|
||||
if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) {
|
||||
set_feature(CPU_CRC32);
|
||||
}
|
||||
if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) {
|
||||
set_feature(CPU_AES);
|
||||
set_feature(CPU_SHA1);
|
||||
set_feature(CPU_SHA2);
|
||||
}
|
||||
if (IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)) {
|
||||
set_feature(CPU_ASIMD);
|
||||
}
|
||||
// No check for CPU_PMULL, CPU_SVE, CPU_SVE2
|
||||
|
||||
__int64 dczid_el0 = _ReadStatusReg(0x5807 /* ARM64_DCZID_EL0 */);
|
||||
|
||||
@ -213,6 +213,7 @@ int main(int argc, char *argv[])
|
||||
AD.addInclude(AD._CPP_file, "adfiles", get_basename(AD._VM_file._name));
|
||||
AD.addInclude(AD._CPP_file, "adfiles", get_basename(AD._HPP_file._name));
|
||||
AD.addInclude(AD._CPP_file, "memory/allocation.inline.hpp");
|
||||
AD.addInclude(AD._CPP_file, "code/aotCodeCache.hpp");
|
||||
AD.addInclude(AD._CPP_file, "code/codeCache.hpp");
|
||||
AD.addInclude(AD._CPP_file, "code/compiledIC.hpp");
|
||||
AD.addInclude(AD._CPP_file, "code/nativeInst.hpp");
|
||||
@ -257,6 +258,7 @@ int main(int argc, char *argv[])
|
||||
AD.addInclude(AD._CPP_PEEPHOLE_file, "adfiles", get_basename(AD._HPP_file._name));
|
||||
AD.addInclude(AD._CPP_PIPELINE_file, "adfiles", get_basename(AD._HPP_file._name));
|
||||
AD.addInclude(AD._DFA_file, "adfiles", get_basename(AD._HPP_file._name));
|
||||
AD.addInclude(AD._DFA_file, "code/aotCodeCache.hpp");
|
||||
AD.addInclude(AD._DFA_file, "oops/compressedOops.hpp");
|
||||
AD.addInclude(AD._DFA_file, "opto/cfgnode.hpp"); // Use PROB_MAX in predicate.
|
||||
AD.addInclude(AD._DFA_file, "opto/intrinsicnode.hpp");
|
||||
|
||||
@ -1029,7 +1029,7 @@ class methodHandle;
|
||||
do_intrinsic(_VectorUnaryLibOp, jdk_internal_vm_vector_VectorSupport, vector_unary_lib_op_name, vector_unary_lib_op_sig, F_S) \
|
||||
do_signature(vector_unary_lib_op_sig,"(J" \
|
||||
"Ljava/lang/Class;" \
|
||||
"Ljava/lang/Class;" \
|
||||
"I" \
|
||||
"I" \
|
||||
"Ljava/lang/String;" \
|
||||
"Ljdk/internal/vm/vector/VectorSupport$Vector;" \
|
||||
@ -1040,7 +1040,7 @@ class methodHandle;
|
||||
do_intrinsic(_VectorBinaryLibOp, jdk_internal_vm_vector_VectorSupport, vector_binary_lib_op_name, vector_binary_lib_op_sig, F_S) \
|
||||
do_signature(vector_binary_lib_op_sig,"(J" \
|
||||
"Ljava/lang/Class;" \
|
||||
"Ljava/lang/Class;" \
|
||||
"I" \
|
||||
"I" \
|
||||
"Ljava/lang/String;" \
|
||||
"Ljdk/internal/vm/vector/VectorSupport$VectorPayload;" \
|
||||
|
||||
@ -29,9 +29,11 @@
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/cdsConfig.hpp"
|
||||
#include "cds/heapShared.hpp"
|
||||
#include "ci/ciUtilities.hpp"
|
||||
#include "classfile/javaAssertions.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
#include "gc/shared/gcConfig.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/memoryReserver.hpp"
|
||||
@ -53,6 +55,7 @@
|
||||
#endif
|
||||
#if INCLUDE_G1GC
|
||||
#include "gc/g1/g1BarrierSetRuntime.hpp"
|
||||
#include "gc/g1/g1HeapRegion.hpp"
|
||||
#endif
|
||||
#if INCLUDE_SHENANDOAHGC
|
||||
#include "gc/shenandoah/shenandoahRuntime.hpp"
|
||||
@ -258,6 +261,9 @@ void AOTCodeCache::init2() {
|
||||
return;
|
||||
}
|
||||
|
||||
// initialize aot runtime constants as appropriate to this runtime
|
||||
AOTRuntimeConstants::initialize_from_runtime();
|
||||
|
||||
// initialize the table of external routines so we can save
|
||||
// generated code blobs that reference them
|
||||
AOTCodeAddressTable* table = opened_cache->_table;
|
||||
@ -1447,6 +1453,12 @@ void AOTCodeAddressTable::init_extrs() {
|
||||
#endif
|
||||
#endif // ZERO
|
||||
|
||||
// addresses of fields in AOT runtime constants area
|
||||
address* p = AOTRuntimeConstants::field_addresses_list();
|
||||
while (*p != nullptr) {
|
||||
SET_ADDRESS(_extrs, *p++);
|
||||
}
|
||||
|
||||
_extrs_complete = true;
|
||||
log_debug(aot, codecache, init)("External addresses recorded");
|
||||
}
|
||||
@ -1729,6 +1741,11 @@ int AOTCodeAddressTable::id_for_address(address addr, RelocIterator reloc, CodeB
|
||||
if (addr == (address)-1) { // Static call stub has jump to itself
|
||||
return id;
|
||||
}
|
||||
// Check card_table_base address first since it can point to any address
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
bool is_const_card_table_base = !UseG1GC && !UseShenandoahGC && bs->is_a(BarrierSet::CardTableBarrierSet);
|
||||
guarantee(!is_const_card_table_base || addr != ci_card_table_address_const(), "sanity");
|
||||
|
||||
// Seach for C string
|
||||
id = id_for_C_string(addr);
|
||||
if (id >= 0) {
|
||||
@ -1798,6 +1815,44 @@ int AOTCodeAddressTable::id_for_address(address addr, RelocIterator reloc, CodeB
|
||||
return id;
|
||||
}
|
||||
|
||||
AOTRuntimeConstants AOTRuntimeConstants::_aot_runtime_constants;
|
||||
|
||||
void AOTRuntimeConstants::initialize_from_runtime() {
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
address card_table_base = nullptr;
|
||||
uint grain_shift = 0;
|
||||
#if INCLUDE_G1GC
|
||||
if (bs->is_a(BarrierSet::G1BarrierSet)) {
|
||||
grain_shift = G1HeapRegion::LogOfHRGrainBytes;
|
||||
} else
|
||||
#endif
|
||||
#if INCLUDE_SHENANDOAHGC
|
||||
if (bs->is_a(BarrierSet::ShenandoahBarrierSet)) {
|
||||
grain_shift = 0;
|
||||
} else
|
||||
#endif
|
||||
if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
|
||||
CardTable::CardValue* base = ci_card_table_address_const();
|
||||
assert(base != nullptr, "unexpected byte_map_base");
|
||||
card_table_base = base;
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
grain_shift = ctbs->grain_shift();
|
||||
}
|
||||
_aot_runtime_constants._card_table_base = card_table_base;
|
||||
_aot_runtime_constants._grain_shift = grain_shift;
|
||||
}
|
||||
|
||||
address AOTRuntimeConstants::_field_addresses_list[] = {
|
||||
((address)&_aot_runtime_constants._card_table_base),
|
||||
((address)&_aot_runtime_constants._grain_shift),
|
||||
nullptr
|
||||
};
|
||||
|
||||
address AOTRuntimeConstants::card_table_base_address() {
|
||||
assert(UseSerialGC || UseParallelGC, "Only these GCs have constant card table base");
|
||||
return (address)&_aot_runtime_constants._card_table_base;
|
||||
}
|
||||
|
||||
// This is called after initialize() but before init2()
|
||||
// and _cache is not set yet.
|
||||
void AOTCodeCache::print_on(outputStream* st) {
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_CODE_AOTCODECACHE_HPP
|
||||
#define SHARE_CODE_AOTCODECACHE_HPP
|
||||
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
#include "runtime/stubInfo.hpp"
|
||||
|
||||
/*
|
||||
@ -422,4 +423,36 @@ public:
|
||||
#endif // PRODUCT
|
||||
};
|
||||
|
||||
// code cache internal runtime constants area used by AOT code
|
||||
class AOTRuntimeConstants {
|
||||
friend class AOTCodeCache;
|
||||
private:
|
||||
address _card_table_base;
|
||||
uint _grain_shift;
|
||||
static address _field_addresses_list[];
|
||||
static AOTRuntimeConstants _aot_runtime_constants;
|
||||
// private constructor for unique singleton
|
||||
AOTRuntimeConstants() { }
|
||||
// private for use by friend class AOTCodeCache
|
||||
static void initialize_from_runtime();
|
||||
public:
|
||||
#if INCLUDE_CDS
|
||||
static bool contains(address adr) {
|
||||
address base = (address)&_aot_runtime_constants;
|
||||
address hi = base + sizeof(AOTRuntimeConstants);
|
||||
return (base <= adr && adr < hi);
|
||||
}
|
||||
static address card_table_base_address();
|
||||
static address grain_shift_address() { return (address)&_aot_runtime_constants._grain_shift; }
|
||||
static address* field_addresses_list() {
|
||||
return _field_addresses_list;
|
||||
}
|
||||
#else
|
||||
static bool contains(address adr) { return false; }
|
||||
static address card_table_base_address() { return nullptr; }
|
||||
static address grain_shift_address() { return nullptr; }
|
||||
static address* field_addresses_list() { return nullptr; }
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // SHARE_CODE_AOTCODECACHE_HPP
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_GC_G1_G1BARRIERSET_HPP
|
||||
#define SHARE_GC_G1_G1BARRIERSET_HPP
|
||||
|
||||
#include "gc/g1/g1HeapRegion.hpp"
|
||||
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
||||
#include "gc/shared/bufferNode.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
@ -116,6 +117,8 @@ class G1BarrierSet: public CardTableBarrierSet {
|
||||
|
||||
virtual void print_on(outputStream* st) const;
|
||||
|
||||
virtual uint grain_shift() { return G1HeapRegion::LogOfHRGrainBytes; }
|
||||
|
||||
// Callbacks for runtime accesses.
|
||||
template <DecoratorSet decorators, typename BarrierSetT = G1BarrierSet>
|
||||
class AccessBarrier: public CardTableBarrierSet::AccessBarrier<decorators, BarrierSetT> {
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "gc/shared/c1/cardTableBarrierSetC1.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
@ -123,6 +124,7 @@ void CardTableBarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Op
|
||||
assert(addr->is_register(), "must be a register at this point");
|
||||
|
||||
#ifdef CARDTABLEBARRIERSET_POST_BARRIER_HELPER
|
||||
assert(!AOTCodeCache::is_on(), "this path is not implemented");
|
||||
gen->CardTableBarrierSet_post_barrier_helper(addr, card_table_base);
|
||||
#else
|
||||
LIR_Opr tmp = gen->new_pointer_register();
|
||||
@ -135,6 +137,17 @@ void CardTableBarrierSetC1::post_barrier(LIRAccess& access, LIR_Opr addr, LIR_Op
|
||||
}
|
||||
|
||||
LIR_Address* card_addr;
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
// load the card table address from the AOT Runtime Constants area
|
||||
LIR_Opr byte_map_base_adr = LIR_OprFact::intptrConst(AOTRuntimeConstants::card_table_base_address());
|
||||
LIR_Opr byte_map_base_reg = gen->new_pointer_register();
|
||||
__ move(byte_map_base_adr, byte_map_base_reg);
|
||||
LIR_Address* byte_map_base_indirect = new LIR_Address(byte_map_base_reg, 0, T_LONG);
|
||||
__ move(byte_map_base_indirect, byte_map_base_reg);
|
||||
card_addr = new LIR_Address(tmp, byte_map_base_reg, T_BYTE);
|
||||
} else
|
||||
#endif
|
||||
if (gen->can_inline_as_constant(card_table_base)) {
|
||||
card_addr = new LIR_Address(tmp, card_table_base->as_jint(), T_BYTE);
|
||||
} else {
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "ci/ciUtilities.hpp"
|
||||
#include "code/aotCodeCache.hpp"
|
||||
#include "gc/shared/c2/cardTableBarrierSetC2.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
@ -114,13 +115,20 @@ Node* CardTableBarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access
|
||||
return result;
|
||||
}
|
||||
|
||||
Node* CardTableBarrierSetC2::byte_map_base_node(GraphKit* kit) const {
|
||||
Node* CardTableBarrierSetC2::byte_map_base_node(IdealKit* kit) const {
|
||||
// Get base of card map
|
||||
#if INCLUDE_CDS
|
||||
if (AOTCodeCache::is_on_for_dump()) {
|
||||
// load the card table address from the AOT Runtime Constants area
|
||||
Node* byte_map_base_adr = kit->makecon(TypeRawPtr::make(AOTRuntimeConstants::card_table_base_address()));
|
||||
return kit->load_aot_const(byte_map_base_adr, TypeRawPtr::NOTNULL);
|
||||
}
|
||||
#endif
|
||||
CardTable::CardValue* card_table_base = ci_card_table_address_const();
|
||||
if (card_table_base != nullptr) {
|
||||
return kit->makecon(TypeRawPtr::make((address)card_table_base));
|
||||
} else {
|
||||
return kit->null();
|
||||
return kit->makecon(Type::get_zero_type(T_ADDRESS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +176,7 @@ void CardTableBarrierSetC2::post_barrier(GraphKit* kit,
|
||||
Node* card_offset = __ URShiftX(cast, __ ConI(CardTable::card_shift()));
|
||||
|
||||
// Combine card table base and card offset
|
||||
Node* card_adr = __ AddP(__ top(), byte_map_base_node(kit), card_offset);
|
||||
Node* card_adr = __ AddP(__ top(), byte_map_base_node(&ideal), card_offset);
|
||||
|
||||
// Get the alias_index for raw card-mark memory
|
||||
int adr_type = Compile::AliasIdxRaw;
|
||||
|
||||
@ -43,7 +43,7 @@ protected:
|
||||
Node* new_val, const Type* value_type) const;
|
||||
virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
|
||||
|
||||
Node* byte_map_base_node(GraphKit* kit) const;
|
||||
Node* byte_map_base_node(IdealKit* kit) const;
|
||||
|
||||
public:
|
||||
virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
|
||||
|
||||
@ -103,6 +103,10 @@ public:
|
||||
|
||||
virtual void print_on(outputStream* st) const;
|
||||
|
||||
// The AOT code cache manager needs to know the region grain size
|
||||
// shift for some barrier sets.
|
||||
virtual uint grain_shift() { return 0; }
|
||||
|
||||
template <DecoratorSet decorators, typename BarrierSetT = CardTableBarrierSet>
|
||||
class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
|
||||
typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
|
||||
|
||||
@ -51,7 +51,7 @@ void ContiguousSpace::initialize(MemRegion mr,
|
||||
set_bottom(bottom);
|
||||
set_end(end);
|
||||
if (clear_space) {
|
||||
clear(SpaceDecorator::DontMangle);
|
||||
set_top(bottom);
|
||||
}
|
||||
if (ZapUnusedHeapArea) {
|
||||
mangle_unused_area();
|
||||
|
||||
@ -41,9 +41,9 @@ bool ShenandoahBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* lock = ShenandoahNMethod::lock_for_nmethod(nm);
|
||||
ShenandoahNMethodLock* lock = ShenandoahNMethod::lock_for_nmethod(nm);
|
||||
assert(lock != nullptr, "Must be");
|
||||
ShenandoahReentrantLocker locker(lock);
|
||||
ShenandoahNMethodLocker locker(lock);
|
||||
|
||||
if (!is_armed(nm)) {
|
||||
// Some other thread managed to complete while we were
|
||||
|
||||
@ -136,13 +136,13 @@ public:
|
||||
assert(!nm_data->is_unregistered(), "Should not see unregistered entry");
|
||||
|
||||
if (nm->is_unloading()) {
|
||||
ShenandoahReentrantLocker locker(nm_data->lock());
|
||||
ShenandoahNMethodLocker locker(nm_data->lock());
|
||||
nm->unlink();
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
ShenandoahReentrantLocker locker(nm_data->lock());
|
||||
ShenandoahNMethodLocker locker(nm_data->lock());
|
||||
|
||||
// Heal oops
|
||||
if (_bs->is_armed(nm)) {
|
||||
@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
|
||||
// Clear compiled ICs and exception caches
|
||||
ShenandoahReentrantLocker locker(nm_data->ic_lock());
|
||||
ShenandoahNMethodLocker locker(nm_data->ic_lock());
|
||||
nm->unload_nmethod_caches(_unloading_occurred);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1023,7 +1023,7 @@ public:
|
||||
|
||||
void do_nmethod(nmethod* n) {
|
||||
ShenandoahNMethod* data = ShenandoahNMethod::gc_data(n);
|
||||
ShenandoahReentrantLocker locker(data->lock());
|
||||
ShenandoahNMethodLocker locker(data->lock());
|
||||
// Setup EvacOOM scope below reentrant lock to avoid deadlock with
|
||||
// nmethod_entry_barrier
|
||||
ShenandoahEvacOOMScope oom;
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#include "gc/shenandoah/shenandoahSimpleBitMap.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
|
||||
typedef ShenandoahLock ShenandoahRebuildLock;
|
||||
typedef ShenandoahLocker ShenandoahRebuildLocker;
|
||||
typedef ShenandoahLock ShenandoahRebuildLock;
|
||||
typedef ShenandoahLocker<ShenandoahRebuildLock> ShenandoahRebuildLocker;
|
||||
|
||||
// Each ShenandoahHeapRegion is associated with a ShenandoahFreeSetPartitionId.
|
||||
enum class ShenandoahFreeSetPartitionId : uint8_t {
|
||||
|
||||
@ -605,7 +605,8 @@ void ShenandoahGenerationalHeap::compute_old_generation_balance(size_t mutator_x
|
||||
ShenandoahOldGeneration* old_gen = old_generation();
|
||||
size_t old_capacity = old_gen->max_capacity();
|
||||
size_t old_usage = old_gen->used(); // includes humongous waste
|
||||
size_t old_available = ((old_capacity >= old_usage)? old_capacity - old_usage: 0) + old_trashed_regions * region_size_bytes;
|
||||
size_t old_currently_available =
|
||||
((old_capacity >= old_usage)? old_capacity - old_usage: 0) + old_trashed_regions * region_size_bytes;
|
||||
|
||||
ShenandoahYoungGeneration* young_gen = young_generation();
|
||||
size_t young_capacity = young_gen->max_capacity();
|
||||
@ -621,7 +622,8 @@ void ShenandoahGenerationalHeap::compute_old_generation_balance(size_t mutator_x
|
||||
size_t young_reserve = (young_generation()->max_capacity() * ShenandoahEvacReserve) / 100;
|
||||
|
||||
// If ShenandoahOldEvacPercent equals 100, max_old_reserve is limited only by mutator_xfer_limit and young_reserve
|
||||
const size_t bound_on_old_reserve = ((old_available + mutator_xfer_limit + young_reserve) * ShenandoahOldEvacPercent) / 100;
|
||||
const size_t bound_on_old_reserve =
|
||||
((old_currently_available + mutator_xfer_limit + young_reserve) * ShenandoahOldEvacPercent) / 100;
|
||||
size_t proposed_max_old = ((ShenandoahOldEvacPercent == 100)?
|
||||
bound_on_old_reserve:
|
||||
MIN2((young_reserve * ShenandoahOldEvacPercent) / (100 - ShenandoahOldEvacPercent),
|
||||
@ -631,68 +633,105 @@ void ShenandoahGenerationalHeap::compute_old_generation_balance(size_t mutator_x
|
||||
}
|
||||
|
||||
// Decide how much old space we should reserve for a mixed collection
|
||||
size_t reserve_for_mixed = 0;
|
||||
size_t proposed_reserve_for_mixed = 0;
|
||||
const size_t old_fragmented_available =
|
||||
old_available - (old_generation()->free_unaffiliated_regions() + old_trashed_regions) * region_size_bytes;
|
||||
old_currently_available - (old_generation()->free_unaffiliated_regions() + old_trashed_regions) * region_size_bytes;
|
||||
|
||||
if (old_fragmented_available > proposed_max_old) {
|
||||
// After we've promoted regions in place, there may be an abundance of old-fragmented available memory,
|
||||
// even more than the desired percentage for old reserve. We cannot transfer these fragmented regions back
|
||||
// to young. Instead we make the best of the situation by using this fragmented memory for both promotions
|
||||
// and evacuations.
|
||||
// In this case, the old_fragmented_available is greater than the desired amount of evacuation to old.
|
||||
// We'll use all of this memory to hold results of old evacuation, and we'll give back to the young generation
|
||||
// any old regions that are not fragmented.
|
||||
//
|
||||
// This scenario may happen after we have promoted many regions in place, and each of these regions had non-zero
|
||||
// unused memory, so there is now an abundance of old-fragmented available memory, even more than the desired
|
||||
// percentage for old reserve. We cannot transfer these fragmented regions back to young. Instead we make the
|
||||
// best of the situation by using this fragmented memory for both promotions and evacuations.
|
||||
|
||||
proposed_max_old = old_fragmented_available;
|
||||
}
|
||||
size_t reserve_for_promo = old_fragmented_available;
|
||||
// Otherwise: old_fragmented_available <= proposed_max_old. Do not shrink proposed_max_old from the original computation.
|
||||
|
||||
// Though we initially set proposed_reserve_for_promo to equal the entirety of old fragmented available, we have the
|
||||
// opportunity below to shift some of this memory into the proposed_reserve_for_mixed.
|
||||
size_t proposed_reserve_for_promo = old_fragmented_available;
|
||||
const size_t max_old_reserve = proposed_max_old;
|
||||
|
||||
const size_t mixed_candidate_live_memory = old_generation()->unprocessed_collection_candidates_live_memory();
|
||||
const bool doing_mixed = (mixed_candidate_live_memory > 0);
|
||||
if (doing_mixed) {
|
||||
// We want this much memory to be unfragmented in order to reliably evacuate old. This is conservative because we
|
||||
// may not evacuate the entirety of unprocessed candidates in a single mixed evacuation.
|
||||
// In the ideal, all of the memory reserved for mixed evacuation would be unfragmented, but we don't enforce
|
||||
// this. Note that the initial value of max_evac_need is conservative because we may not evacuate all of the
|
||||
// remaining mixed evacuation candidates in a single cycle.
|
||||
const size_t max_evac_need = (size_t) (mixed_candidate_live_memory * ShenandoahOldEvacWaste);
|
||||
assert(old_available >= old_generation()->free_unaffiliated_regions() * region_size_bytes,
|
||||
assert(old_currently_available >= old_generation()->free_unaffiliated_regions() * region_size_bytes,
|
||||
"Unaffiliated available must be less than total available");
|
||||
|
||||
// We prefer to evacuate all of mixed into unfragmented memory, and will expand old in order to do so, unless
|
||||
// we already have too much fragmented available memory in old.
|
||||
reserve_for_mixed = max_evac_need;
|
||||
if (reserve_for_mixed + reserve_for_promo > max_old_reserve) {
|
||||
// In this case, we'll allow old-evac to target some of the fragmented old memory.
|
||||
size_t excess_reserves = (reserve_for_mixed + reserve_for_promo) - max_old_reserve;
|
||||
if (reserve_for_promo > excess_reserves) {
|
||||
reserve_for_promo -= excess_reserves;
|
||||
proposed_reserve_for_mixed = max_evac_need;
|
||||
if (proposed_reserve_for_mixed + proposed_reserve_for_promo > max_old_reserve) {
|
||||
// We're trying to reserve more memory than is available. So we need to shrink our reserves.
|
||||
size_t excess_reserves = (proposed_reserve_for_mixed + proposed_reserve_for_promo) - max_old_reserve;
|
||||
// We need to shrink reserves by excess_reserves. We prefer to shrink by reducing promotion, giving priority to mixed
|
||||
// evacuation. If the promotion reserve is larger than the amount we need to shrink by, do all the shrinkage there.
|
||||
if (proposed_reserve_for_promo > excess_reserves) {
|
||||
proposed_reserve_for_promo -= excess_reserves;
|
||||
} else {
|
||||
excess_reserves -= reserve_for_promo;
|
||||
reserve_for_promo = 0;
|
||||
reserve_for_mixed -= excess_reserves;
|
||||
// Otherwise, we'll shrink promotion reserve to zero and we'll shrink the mixed-evac reserve by the remaining excess.
|
||||
excess_reserves -= proposed_reserve_for_promo;
|
||||
proposed_reserve_for_promo = 0;
|
||||
proposed_reserve_for_mixed -= excess_reserves;
|
||||
}
|
||||
}
|
||||
}
|
||||
assert(proposed_reserve_for_mixed + proposed_reserve_for_promo <= max_old_reserve,
|
||||
"Reserve for mixed (%zu) plus reserve for promotions (%zu) must be less than maximum old reserve (%zu)",
|
||||
proposed_reserve_for_mixed, proposed_reserve_for_promo, max_old_reserve);
|
||||
|
||||
// Decide how much additional space we should reserve for promotions from young. We give priority to mixed evacations
|
||||
// over promotions.
|
||||
const size_t promo_load = old_generation()->get_promotion_potential();
|
||||
const bool doing_promotions = promo_load > 0;
|
||||
if (doing_promotions) {
|
||||
// We've already set aside all of the fragmented available memory within old-gen to represent old objects
|
||||
// to be promoted from young generation. promo_load represents the memory that we anticipate to be promoted
|
||||
// from regions that have reached tenure age. In the ideal, we will always use fragmented old-gen memory
|
||||
// to hold individually promoted objects and will use unfragmented old-gen memory to represent the old-gen
|
||||
// evacuation workloa.
|
||||
|
||||
// We're promoting and have an estimate of memory to be promoted from aged regions
|
||||
assert(max_old_reserve >= (reserve_for_mixed + reserve_for_promo), "Sanity");
|
||||
const size_t available_for_additional_promotions = max_old_reserve - (reserve_for_mixed + reserve_for_promo);
|
||||
size_t promo_need = (size_t)(promo_load * ShenandoahPromoEvacWaste);
|
||||
if (promo_need > reserve_for_promo) {
|
||||
reserve_for_promo += MIN2(promo_need - reserve_for_promo, available_for_additional_promotions);
|
||||
// promo_load represents the combined total of live memory within regions that have reached tenure age. The true
|
||||
// promotion potential is larger than this, because individual objects within regions that have not yet reached tenure
|
||||
// age may be promotable. On the other hand, some of the objects that we intend to promote in the next GC cycle may
|
||||
// die before they are next marked. In the future, the promo_load will include the total size of tenurable objects
|
||||
// residing in regions that have not yet reached tenure age.
|
||||
|
||||
if (doing_promotions) {
|
||||
// We are always doing promotions, even when old_generation->get_promotion_potential() returns 0. As currently implemented,
|
||||
// get_promotion_potential() only knows the total live memory contained within young-generation regions whose age is
|
||||
// tenurable. It does not know whether that memory will still be live at the end of the next mark cycle, and it doesn't
|
||||
// know how much memory is contained within objects whose individual ages are tenurable, which reside in regions with
|
||||
// non-tenurable age. We use this, as adjusted by ShenandoahPromoEvacWaste, as an approximation of the total amount of
|
||||
// memory to be promoted. In the near future, we expect to implement a change that will allow get_promotion_potential()
|
||||
// to account also for the total memory contained within individual objects that are tenure-ready even when they do
|
||||
// not reside in aged regions. This will represent a conservative over approximation of promotable memory because
|
||||
// some of these objects may die before the next GC cycle executes.
|
||||
|
||||
// Be careful not to ask for too much promotion reserves. We have observed jtreg test failures under which a greedy
|
||||
// promotion reserve causes a humongous allocation which is awaiting a full GC to fail (specifically
|
||||
// gc/TestAllocHumongousFragment.java). This happens if too much of the memory reclaimed by the full GC
|
||||
// is immediately reserved so that it cannot be allocated by the waiting mutator. It's not clear that this
|
||||
// particular test is representative of the needs of typical GenShen users. It is really a test of high frequency
|
||||
// Full GCs under heap fragmentation stress.
|
||||
|
||||
size_t promo_need = (size_t) (promo_load * ShenandoahPromoEvacWaste);
|
||||
if (promo_need > proposed_reserve_for_promo) {
|
||||
const size_t available_for_additional_promotions =
|
||||
max_old_reserve - (proposed_reserve_for_mixed + proposed_reserve_for_promo);
|
||||
if (proposed_reserve_for_promo + available_for_additional_promotions >= promo_need) {
|
||||
proposed_reserve_for_promo = promo_need;
|
||||
} else {
|
||||
proposed_reserve_for_promo += available_for_additional_promotions;
|
||||
}
|
||||
}
|
||||
// We've already reserved all the memory required for the promo_load, and possibly more. The excess
|
||||
// can be consumed by objects promoted from regions that have not yet reached tenure age.
|
||||
}
|
||||
// else, leave proposed_reserve_for_promo as is. By default, it is initialized to represent old_fragmented_available.
|
||||
|
||||
// This is the total old we want to reserve (initialized to the ideal reserve)
|
||||
size_t old_reserve = reserve_for_mixed + reserve_for_promo;
|
||||
size_t proposed_old_reserve = proposed_reserve_for_mixed + proposed_reserve_for_promo;
|
||||
|
||||
// We now check if the old generation is running a surplus or a deficit.
|
||||
size_t old_region_deficit = 0;
|
||||
@ -702,68 +741,70 @@ void ShenandoahGenerationalHeap::compute_old_generation_balance(size_t mutator_x
|
||||
// align the mutator_xfer_limit on region size
|
||||
mutator_xfer_limit = mutator_region_xfer_limit * region_size_bytes;
|
||||
|
||||
if (old_available >= old_reserve) {
|
||||
if (old_currently_available >= proposed_old_reserve) {
|
||||
// We are running a surplus, so the old region surplus can go to young
|
||||
const size_t old_surplus = old_available - old_reserve;
|
||||
const size_t old_surplus = old_currently_available - proposed_old_reserve;
|
||||
old_region_surplus = old_surplus / region_size_bytes;
|
||||
const size_t unaffiliated_old_regions = old_generation()->free_unaffiliated_regions() + old_trashed_regions;
|
||||
old_region_surplus = MIN2(old_region_surplus, unaffiliated_old_regions);
|
||||
old_generation()->set_region_balance(checked_cast<ssize_t>(old_region_surplus));
|
||||
} else if (old_available + mutator_xfer_limit >= old_reserve) {
|
||||
// Mutator's xfer limit is sufficient to satisfy our need: transfer all memory from there
|
||||
size_t old_deficit = old_reserve - old_available;
|
||||
old_currently_available -= old_region_surplus * region_size_bytes;
|
||||
young_available += old_region_surplus * region_size_bytes;
|
||||
} else if (old_currently_available + mutator_xfer_limit >= proposed_old_reserve) {
|
||||
// We know that old_currently_available < proposed_old_reserve because above test failed. Expand old_currently_available.
|
||||
// Mutator's xfer limit is sufficient to satisfy our need: transfer all memory from there.
|
||||
size_t old_deficit = proposed_old_reserve - old_currently_available;
|
||||
old_region_deficit = (old_deficit + region_size_bytes - 1) / region_size_bytes;
|
||||
old_generation()->set_region_balance(0 - checked_cast<ssize_t>(old_region_deficit));
|
||||
old_currently_available += old_region_deficit * region_size_bytes;
|
||||
young_available -= old_region_deficit * region_size_bytes;
|
||||
} else {
|
||||
// We'll try to xfer from both mutator excess and from young collector reserve
|
||||
size_t available_reserves = old_available + young_reserve + mutator_xfer_limit;
|
||||
size_t old_entitlement = (available_reserves * ShenandoahOldEvacPercent) / 100;
|
||||
// We know that (old_currently_available < proposed_old_reserve) and
|
||||
// (old_currently_available + mutator_xfer_limit < proposed_old_reserve) because above tests failed.
|
||||
// We need to shrink proposed_old_reserves.
|
||||
|
||||
// Round old_entitlement down to nearest multiple of regions to be transferred to old
|
||||
size_t entitled_xfer = old_entitlement - old_available;
|
||||
entitled_xfer = region_size_bytes * (entitled_xfer / region_size_bytes);
|
||||
size_t unaffiliated_young_regions = young_generation()->free_unaffiliated_regions();
|
||||
size_t unaffiliated_young_memory = unaffiliated_young_regions * region_size_bytes;
|
||||
if (entitled_xfer > unaffiliated_young_memory) {
|
||||
entitled_xfer = unaffiliated_young_memory;
|
||||
}
|
||||
old_entitlement = old_available + entitled_xfer;
|
||||
if (old_entitlement < old_reserve) {
|
||||
// There's not enough memory to satisfy our desire. Scale back our old-gen intentions.
|
||||
size_t budget_overrun = old_reserve - old_entitlement;;
|
||||
if (reserve_for_promo > budget_overrun) {
|
||||
reserve_for_promo -= budget_overrun;
|
||||
old_reserve -= budget_overrun;
|
||||
} else {
|
||||
budget_overrun -= reserve_for_promo;
|
||||
reserve_for_promo = 0;
|
||||
reserve_for_mixed = (reserve_for_mixed > budget_overrun)? reserve_for_mixed - budget_overrun: 0;
|
||||
old_reserve = reserve_for_promo + reserve_for_mixed;
|
||||
}
|
||||
}
|
||||
// We could potentially shrink young_reserves in order to further expand proposed_old_reserves. Let's not bother. The
|
||||
// important thing is that we keep a total amount of memory in reserve in preparation for the next GC cycle. At
|
||||
// the time we choose the next collection set, we'll have an opportunity to shift some of these young reserves
|
||||
// into old reserves if that makes sense.
|
||||
|
||||
// Because of adjustments above, old_reserve may be smaller now than it was when we tested the branch
|
||||
// condition above: "(old_available + mutator_xfer_limit >= old_reserve)
|
||||
// Therefore, we do NOT know that: mutator_xfer_limit < old_reserve - old_available
|
||||
|
||||
size_t old_deficit = old_reserve - old_available;
|
||||
old_region_deficit = (old_deficit + region_size_bytes - 1) / region_size_bytes;
|
||||
|
||||
// Shrink young_reserve to account for loan to old reserve
|
||||
const size_t reserve_xfer_regions = old_region_deficit - mutator_region_xfer_limit;
|
||||
young_reserve -= reserve_xfer_regions * region_size_bytes;
|
||||
// Start by taking all of mutator_xfer_limit into old_currently_available.
|
||||
size_t old_region_deficit = mutator_region_xfer_limit;
|
||||
old_generation()->set_region_balance(0 - checked_cast<ssize_t>(old_region_deficit));
|
||||
old_currently_available += old_region_deficit * region_size_bytes;
|
||||
young_available -= old_region_deficit * region_size_bytes;
|
||||
|
||||
assert(old_currently_available < proposed_old_reserve,
|
||||
"Old currently available (%zu) must be less than old reserve (%zu)", old_currently_available, proposed_old_reserve);
|
||||
|
||||
// There's not enough memory to satisfy our desire. Scale back our old-gen intentions. We prefer to satisfy
|
||||
// the budget_overrun entirely from the promotion reserve, if that is large enough. Otherwise, we'll satisfy
|
||||
// the overrun from a combination of promotion and mixed-evacuation reserves.
|
||||
size_t budget_overrun = proposed_old_reserve - old_currently_available;
|
||||
if (proposed_reserve_for_promo > budget_overrun) {
|
||||
proposed_reserve_for_promo -= budget_overrun;
|
||||
// Dead code:
|
||||
// proposed_old_reserve -= budget_overrun;
|
||||
} else {
|
||||
budget_overrun -= proposed_reserve_for_promo;
|
||||
proposed_reserve_for_promo = 0;
|
||||
proposed_reserve_for_mixed = (proposed_reserve_for_mixed > budget_overrun)? proposed_reserve_for_mixed - budget_overrun: 0;
|
||||
// Dead code:
|
||||
// Note: proposed_reserve_for_promo is 0 and proposed_reserve_for_mixed may equal 0.
|
||||
// proposed_old_reserve = proposed_reserve_for_mixed;
|
||||
}
|
||||
}
|
||||
|
||||
assert(old_region_deficit == 0 || old_region_surplus == 0, "Only surplus or deficit, never both");
|
||||
assert(young_reserve + reserve_for_mixed + reserve_for_promo <= old_available + young_available,
|
||||
assert(old_region_deficit == 0 || old_region_surplus == 0,
|
||||
"Only surplus (%zu) or deficit (%zu), never both", old_region_surplus, old_region_deficit);
|
||||
assert(young_reserve + proposed_reserve_for_mixed + proposed_reserve_for_promo <= old_currently_available + young_available,
|
||||
"Cannot reserve more memory than is available: %zu + %zu + %zu <= %zu + %zu",
|
||||
young_reserve, reserve_for_mixed, reserve_for_promo, old_available, young_available);
|
||||
young_reserve, proposed_reserve_for_mixed, proposed_reserve_for_promo, old_currently_available, young_available);
|
||||
|
||||
// deficit/surplus adjustments to generation sizes will precede rebuild
|
||||
young_generation()->set_evacuation_reserve(young_reserve);
|
||||
old_generation()->set_evacuation_reserve(reserve_for_mixed);
|
||||
old_generation()->set_promoted_reserve(reserve_for_promo);
|
||||
old_generation()->set_evacuation_reserve(proposed_reserve_for_mixed);
|
||||
old_generation()->set_promoted_reserve(proposed_reserve_for_promo);
|
||||
}
|
||||
|
||||
void ShenandoahGenerationalHeap::coalesce_and_fill_old_regions(bool concurrent) {
|
||||
|
||||
@ -2834,3 +2834,13 @@ void ShenandoahHeap::log_heap_status(const char* msg) const {
|
||||
global_generation()->log_status(msg);
|
||||
}
|
||||
}
|
||||
|
||||
ShenandoahHeapLocker::ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint) : _lock(lock) {
|
||||
#ifdef ASSERT
|
||||
ShenandoahFreeSet* free_set = ShenandoahHeap::heap()->free_set();
|
||||
// free_set is nullptr only at pre-initialized state
|
||||
assert(free_set == nullptr || !free_set->rebuild_lock()->owned_by_self(), "Dead lock, can't acquire heap lock while holding free-set rebuild lock");
|
||||
assert(_lock != nullptr, "Must not");
|
||||
#endif
|
||||
_lock->lock(allow_block_for_safepoint);
|
||||
}
|
||||
|
||||
@ -117,9 +117,23 @@ public:
|
||||
virtual bool is_thread_safe() { return false; }
|
||||
};
|
||||
|
||||
typedef ShenandoahLock ShenandoahHeapLock;
|
||||
typedef ShenandoahLocker ShenandoahHeapLocker;
|
||||
typedef Stack<oop, mtGC> ShenandoahScanObjectStack;
|
||||
typedef ShenandoahLock ShenandoahHeapLock;
|
||||
// ShenandoahHeapLocker implements locker to assure mutually exclusive access to the global heap data structures.
|
||||
// Asserts in the implementation detect potential deadlock usage with regards the rebuild lock that is present
|
||||
// in ShenandoahFreeSet. Whenever both locks are acquired, this lock should be acquired before the
|
||||
// ShenandoahFreeSet rebuild lock.
|
||||
class ShenandoahHeapLocker : public StackObj {
|
||||
private:
|
||||
ShenandoahHeapLock* _lock;
|
||||
public:
|
||||
ShenandoahHeapLocker(ShenandoahHeapLock* lock, bool allow_block_for_safepoint = false);
|
||||
|
||||
~ShenandoahHeapLocker() {
|
||||
_lock->unlock();
|
||||
}
|
||||
};
|
||||
|
||||
typedef Stack<oop, mtGC> ShenandoahScanObjectStack;
|
||||
|
||||
// Shenandoah GC is low-pause concurrent GC that uses a load reference barrier
|
||||
// for concurent evacuation and a snapshot-at-the-beginning write barrier for
|
||||
|
||||
@ -93,7 +93,7 @@ ShenandoahSimpleLock::ShenandoahSimpleLock() {
|
||||
assert(os::mutex_init_done(), "Too early!");
|
||||
}
|
||||
|
||||
void ShenandoahSimpleLock::lock() {
|
||||
void ShenandoahSimpleLock::lock(bool allow_block_for_safepoint) {
|
||||
_lock.lock();
|
||||
}
|
||||
|
||||
@ -101,28 +101,31 @@ void ShenandoahSimpleLock::unlock() {
|
||||
_lock.unlock();
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock::ShenandoahReentrantLock() :
|
||||
ShenandoahSimpleLock(), _owner(nullptr), _count(0) {
|
||||
assert(os::mutex_init_done(), "Too early!");
|
||||
template<typename Lock>
|
||||
ShenandoahReentrantLock<Lock>::ShenandoahReentrantLock() :
|
||||
Lock(), _owner(nullptr), _count(0) {
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock::~ShenandoahReentrantLock() {
|
||||
template<typename Lock>
|
||||
ShenandoahReentrantLock<Lock>::~ShenandoahReentrantLock() {
|
||||
assert(_count == 0, "Unbalance");
|
||||
}
|
||||
|
||||
void ShenandoahReentrantLock::lock() {
|
||||
template<typename Lock>
|
||||
void ShenandoahReentrantLock<Lock>::lock(bool allow_block_for_safepoint) {
|
||||
Thread* const thread = Thread::current();
|
||||
Thread* const owner = _owner.load_relaxed();
|
||||
|
||||
if (owner != thread) {
|
||||
ShenandoahSimpleLock::lock();
|
||||
Lock::lock(allow_block_for_safepoint);
|
||||
_owner.store_relaxed(thread);
|
||||
}
|
||||
|
||||
_count++;
|
||||
}
|
||||
|
||||
void ShenandoahReentrantLock::unlock() {
|
||||
template<typename Lock>
|
||||
void ShenandoahReentrantLock<Lock>::unlock() {
|
||||
assert(owned_by_self(), "Invalid owner");
|
||||
assert(_count > 0, "Invalid count");
|
||||
|
||||
@ -130,12 +133,17 @@ void ShenandoahReentrantLock::unlock() {
|
||||
|
||||
if (_count == 0) {
|
||||
_owner.store_relaxed((Thread*)nullptr);
|
||||
ShenandoahSimpleLock::unlock();
|
||||
Lock::unlock();
|
||||
}
|
||||
}
|
||||
|
||||
bool ShenandoahReentrantLock::owned_by_self() const {
|
||||
template<typename Lock>
|
||||
bool ShenandoahReentrantLock<Lock>::owned_by_self() const {
|
||||
Thread* const thread = Thread::current();
|
||||
Thread* const owner = _owner.load_relaxed();
|
||||
return owner == thread;
|
||||
}
|
||||
|
||||
// Explicit template instantiation
|
||||
template class ShenandoahReentrantLock<ShenandoahSimpleLock>;
|
||||
template class ShenandoahReentrantLock<ShenandoahLock>;
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include "runtime/javaThread.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
|
||||
class ShenandoahLock {
|
||||
class ShenandoahLock {
|
||||
private:
|
||||
enum LockState { unlocked = 0, locked = 1 };
|
||||
|
||||
@ -48,7 +48,7 @@ private:
|
||||
public:
|
||||
ShenandoahLock() : _state(unlocked), _owner(nullptr) {};
|
||||
|
||||
void lock(bool allow_block_for_safepoint) {
|
||||
void lock(bool allow_block_for_safepoint = false) {
|
||||
assert(_owner.load_relaxed() != Thread::current(), "reentrant locking attempt, would deadlock");
|
||||
|
||||
if ((allow_block_for_safepoint && SafepointSynchronize::is_synchronizing()) ||
|
||||
@ -83,34 +83,19 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class ShenandoahLocker : public StackObj {
|
||||
private:
|
||||
ShenandoahLock* const _lock;
|
||||
public:
|
||||
ShenandoahLocker(ShenandoahLock* lock, bool allow_block_for_safepoint = false) : _lock(lock) {
|
||||
if (_lock != nullptr) {
|
||||
_lock->lock(allow_block_for_safepoint);
|
||||
}
|
||||
}
|
||||
|
||||
~ShenandoahLocker() {
|
||||
if (_lock != nullptr) {
|
||||
_lock->unlock();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Simple lock using PlatformMonitor
|
||||
class ShenandoahSimpleLock {
|
||||
private:
|
||||
PlatformMonitor _lock; // native lock
|
||||
public:
|
||||
ShenandoahSimpleLock();
|
||||
|
||||
virtual void lock();
|
||||
virtual void unlock();
|
||||
void lock(bool allow_block_for_safepoint = false);
|
||||
void unlock();
|
||||
};
|
||||
|
||||
class ShenandoahReentrantLock : public ShenandoahSimpleLock {
|
||||
// templated reentrant lock
|
||||
template<typename Lock>
|
||||
class ShenandoahReentrantLock : public Lock {
|
||||
private:
|
||||
Atomic<Thread*> _owner;
|
||||
uint64_t _count;
|
||||
@ -119,30 +104,25 @@ public:
|
||||
ShenandoahReentrantLock();
|
||||
~ShenandoahReentrantLock();
|
||||
|
||||
virtual void lock();
|
||||
virtual void unlock();
|
||||
void lock(bool allow_block_for_safepoint = false);
|
||||
void unlock();
|
||||
|
||||
// If the lock already owned by this thread
|
||||
bool owned_by_self() const ;
|
||||
};
|
||||
|
||||
class ShenandoahReentrantLocker : public StackObj {
|
||||
private:
|
||||
ShenandoahReentrantLock* const _lock;
|
||||
|
||||
// template based ShenandoahLocker
|
||||
template<typename Lock>
|
||||
class ShenandoahLocker : public StackObj {
|
||||
Lock* const _lock;
|
||||
public:
|
||||
ShenandoahReentrantLocker(ShenandoahReentrantLock* lock) :
|
||||
_lock(lock) {
|
||||
if (_lock != nullptr) {
|
||||
_lock->lock();
|
||||
}
|
||||
ShenandoahLocker(Lock* lock, bool allow_block_for_safepoint = false) : _lock(lock) {
|
||||
assert(_lock != nullptr, "Must not");
|
||||
_lock->lock(allow_block_for_safepoint);
|
||||
}
|
||||
|
||||
~ShenandoahReentrantLocker() {
|
||||
if (_lock != nullptr) {
|
||||
assert(_lock->owned_by_self(), "Must be owner");
|
||||
_lock->unlock();
|
||||
}
|
||||
~ShenandoahLocker() {
|
||||
_lock->unlock();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ void ShenandoahNMethodTable::register_nmethod(nmethod* nm) {
|
||||
assert(nm == data->nm(), "Must be same nmethod");
|
||||
// Prevent updating a nmethod while concurrent iteration is in progress.
|
||||
wait_until_concurrent_iteration_done();
|
||||
ShenandoahReentrantLocker data_locker(data->lock());
|
||||
ShenandoahNMethodLocker data_locker(data->lock());
|
||||
data->update();
|
||||
} else {
|
||||
// For a new nmethod, we can safely append it to the list, because
|
||||
|
||||
@ -33,6 +33,10 @@
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
|
||||
// Use ShenandoahReentrantLock as ShenandoahNMethodLock
|
||||
typedef ShenandoahReentrantLock<ShenandoahSimpleLock> ShenandoahNMethodLock;
|
||||
typedef ShenandoahLocker<ShenandoahNMethodLock> ShenandoahNMethodLocker;
|
||||
|
||||
// ShenandoahNMethod tuple records the internal locations of oop slots within reclocation stream in
|
||||
// the nmethod. This allows us to quickly scan the oops without doing the nmethod-internal scans,
|
||||
// that sometimes involves parsing the machine code. Note it does not record the oops themselves,
|
||||
@ -44,16 +48,16 @@ private:
|
||||
int _oops_count;
|
||||
bool _has_non_immed_oops;
|
||||
bool _unregistered;
|
||||
ShenandoahReentrantLock _lock;
|
||||
ShenandoahReentrantLock _ic_lock;
|
||||
ShenandoahNMethodLock _lock;
|
||||
ShenandoahNMethodLock _ic_lock;
|
||||
|
||||
public:
|
||||
ShenandoahNMethod(nmethod *nm, GrowableArray<oop*>& oops, bool has_non_immed_oops);
|
||||
~ShenandoahNMethod();
|
||||
|
||||
inline nmethod* nm() const;
|
||||
inline ShenandoahReentrantLock* lock();
|
||||
inline ShenandoahReentrantLock* ic_lock();
|
||||
inline ShenandoahNMethodLock* lock();
|
||||
inline ShenandoahNMethodLock* ic_lock();
|
||||
inline void oops_do(OopClosure* oops, bool fix_relocations = false);
|
||||
// Update oops when the nmethod is re-registered
|
||||
void update();
|
||||
@ -61,8 +65,8 @@ public:
|
||||
inline bool is_unregistered() const;
|
||||
|
||||
static ShenandoahNMethod* for_nmethod(nmethod* nm);
|
||||
static inline ShenandoahReentrantLock* lock_for_nmethod(nmethod* nm);
|
||||
static inline ShenandoahReentrantLock* ic_lock_for_nmethod(nmethod* nm);
|
||||
static inline ShenandoahNMethodLock* lock_for_nmethod(nmethod* nm);
|
||||
static inline ShenandoahNMethodLock* ic_lock_for_nmethod(nmethod* nm);
|
||||
|
||||
static void heal_nmethod(nmethod* nm);
|
||||
static inline void heal_nmethod_metadata(ShenandoahNMethod* nmethod_data);
|
||||
|
||||
@ -35,11 +35,11 @@ nmethod* ShenandoahNMethod::nm() const {
|
||||
return _nm;
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* ShenandoahNMethod::lock() {
|
||||
ShenandoahNMethodLock* ShenandoahNMethod::lock() {
|
||||
return &_lock;
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* ShenandoahNMethod::ic_lock() {
|
||||
ShenandoahNMethodLock* ShenandoahNMethod::ic_lock() {
|
||||
return &_ic_lock;
|
||||
}
|
||||
|
||||
@ -85,11 +85,11 @@ void ShenandoahNMethod::attach_gc_data(nmethod* nm, ShenandoahNMethod* gc_data)
|
||||
nm->set_gc_data<ShenandoahNMethod>(gc_data);
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* ShenandoahNMethod::lock_for_nmethod(nmethod* nm) {
|
||||
ShenandoahNMethodLock* ShenandoahNMethod::lock_for_nmethod(nmethod* nm) {
|
||||
return gc_data(nm)->lock();
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* ShenandoahNMethod::ic_lock_for_nmethod(nmethod* nm) {
|
||||
ShenandoahNMethodLock* ShenandoahNMethod::ic_lock_for_nmethod(nmethod* nm) {
|
||||
return gc_data(nm)->ic_lock();
|
||||
}
|
||||
|
||||
|
||||
@ -504,7 +504,7 @@ void ShenandoahReferenceProcessor::process_references(ShenandoahRefProcThreadLoc
|
||||
if (!CompressedOops::is_null(*list)) {
|
||||
oop head = lrb(CompressedOops::decode_not_null(*list));
|
||||
shenandoah_assert_not_in_cset_except(&head, head, ShenandoahHeap::heap()->cancelled_gc() || !ShenandoahLoadRefBarrier);
|
||||
oop prev = AtomicAccess::xchg(&_pending_list, head);
|
||||
oop prev = _pending_list.exchange(head);
|
||||
set_oop_field(p, prev);
|
||||
if (prev == nullptr) {
|
||||
// First to prepend to list, record tail
|
||||
@ -519,14 +519,14 @@ void ShenandoahReferenceProcessor::process_references(ShenandoahRefProcThreadLoc
|
||||
void ShenandoahReferenceProcessor::work() {
|
||||
// Process discovered references
|
||||
uint max_workers = ShenandoahHeap::heap()->max_workers();
|
||||
uint worker_id = AtomicAccess::add(&_iterate_discovered_list_id, 1U, memory_order_relaxed) - 1;
|
||||
uint worker_id = _iterate_discovered_list_id.fetch_then_add(1U, memory_order_relaxed);
|
||||
while (worker_id < max_workers) {
|
||||
if (UseCompressedOops) {
|
||||
process_references<narrowOop>(_ref_proc_thread_locals[worker_id], worker_id);
|
||||
} else {
|
||||
process_references<oop>(_ref_proc_thread_locals[worker_id], worker_id);
|
||||
}
|
||||
worker_id = AtomicAccess::add(&_iterate_discovered_list_id, 1U, memory_order_relaxed) - 1;
|
||||
worker_id = _iterate_discovered_list_id.fetch_then_add(1U, memory_order_relaxed);
|
||||
}
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ public:
|
||||
|
||||
void ShenandoahReferenceProcessor::process_references(ShenandoahPhaseTimings::Phase phase, WorkerThreads* workers, bool concurrent) {
|
||||
|
||||
AtomicAccess::release_store_fence(&_iterate_discovered_list_id, 0U);
|
||||
_iterate_discovered_list_id.release_store_fence(0U);
|
||||
|
||||
// Process discovered lists
|
||||
ShenandoahReferenceProcessorTask task(phase, concurrent, this);
|
||||
@ -576,7 +576,7 @@ void ShenandoahReferenceProcessor::process_references(ShenandoahPhaseTimings::Ph
|
||||
|
||||
void ShenandoahReferenceProcessor::enqueue_references_locked() {
|
||||
// Prepend internal pending list to external pending list
|
||||
shenandoah_assert_not_in_cset_except(&_pending_list, _pending_list, ShenandoahHeap::heap()->cancelled_gc() || !ShenandoahLoadRefBarrier);
|
||||
shenandoah_assert_not_in_cset_except(&_pending_list, _pending_list.load_relaxed(), ShenandoahHeap::heap()->cancelled_gc() || !ShenandoahLoadRefBarrier);
|
||||
|
||||
// During reference processing, we maintain a local list of references that are identified by
|
||||
// _pending_list and _pending_list_tail. _pending_list_tail points to the next field of the last Reference object on
|
||||
@ -589,7 +589,7 @@ void ShenandoahReferenceProcessor::enqueue_references_locked() {
|
||||
// 2. Overwriting the next field of the last Reference on my local list to point at the previous head of the
|
||||
// global Universe::_reference_pending_list
|
||||
|
||||
oop former_head_of_global_list = Universe::swap_reference_pending_list(_pending_list);
|
||||
oop former_head_of_global_list = Universe::swap_reference_pending_list(_pending_list.load_relaxed());
|
||||
if (UseCompressedOops) {
|
||||
set_oop_field<narrowOop>(reinterpret_cast<narrowOop*>(_pending_list_tail), former_head_of_global_list);
|
||||
} else {
|
||||
@ -598,7 +598,7 @@ void ShenandoahReferenceProcessor::enqueue_references_locked() {
|
||||
}
|
||||
|
||||
void ShenandoahReferenceProcessor::enqueue_references(bool concurrent) {
|
||||
if (_pending_list == nullptr) {
|
||||
if (_pending_list.load_relaxed() == nullptr) {
|
||||
// Nothing to enqueue
|
||||
return;
|
||||
}
|
||||
@ -616,7 +616,7 @@ void ShenandoahReferenceProcessor::enqueue_references(bool concurrent) {
|
||||
}
|
||||
|
||||
// Reset internal pending list
|
||||
_pending_list = nullptr;
|
||||
_pending_list.store_relaxed(nullptr);
|
||||
_pending_list_tail = &_pending_list;
|
||||
}
|
||||
|
||||
@ -640,9 +640,9 @@ void ShenandoahReferenceProcessor::abandon_partial_discovery() {
|
||||
clean_discovered_list<oop>(_ref_proc_thread_locals[index].discovered_list_addr<oop>());
|
||||
}
|
||||
}
|
||||
if (_pending_list != nullptr) {
|
||||
oop pending = _pending_list;
|
||||
_pending_list = nullptr;
|
||||
if (_pending_list.load_relaxed() != nullptr) {
|
||||
oop pending = _pending_list.load_relaxed();
|
||||
_pending_list.store_relaxed(nullptr);
|
||||
if (UseCompressedOops) {
|
||||
narrowOop* list = reference_discovered_addr<narrowOop>(pending);
|
||||
clean_discovered_list<narrowOop>(list);
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
#include "gc/shared/referenceProcessorStats.hpp"
|
||||
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
|
||||
class ShenandoahMarkRefsSuperClosure;
|
||||
class WorkerThreads;
|
||||
@ -133,10 +134,10 @@ private:
|
||||
|
||||
ShenandoahRefProcThreadLocal* _ref_proc_thread_locals;
|
||||
|
||||
oop _pending_list;
|
||||
Atomic<oop> _pending_list;
|
||||
void* _pending_list_tail; // T*
|
||||
|
||||
volatile uint _iterate_discovered_list_id;
|
||||
Atomic<uint> _iterate_discovered_list_id;
|
||||
|
||||
ReferenceProcessorStats _stats;
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ public:
|
||||
virtual bool has_dead_oop(nmethod* nm) const {
|
||||
assert(ShenandoahHeap::heap()->is_concurrent_weak_root_in_progress(), "Only for this phase");
|
||||
ShenandoahNMethod* data = ShenandoahNMethod::gc_data(nm);
|
||||
ShenandoahReentrantLocker locker(data->lock());
|
||||
ShenandoahNMethodLocker locker(data->lock());
|
||||
ShenandoahIsUnloadingOopClosure cl;
|
||||
data->oops_do(&cl);
|
||||
return cl.is_unloading();
|
||||
@ -90,14 +90,14 @@ public:
|
||||
class ShenandoahCompiledICProtectionBehaviour : public CompiledICProtectionBehaviour {
|
||||
public:
|
||||
virtual bool lock(nmethod* nm) {
|
||||
ShenandoahReentrantLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
ShenandoahNMethodLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
assert(lock != nullptr, "Not yet registered?");
|
||||
lock->lock();
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void unlock(nmethod* nm) {
|
||||
ShenandoahReentrantLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
ShenandoahNMethodLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
assert(lock != nullptr, "Not yet registered?");
|
||||
lock->unlock();
|
||||
}
|
||||
@ -107,7 +107,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
ShenandoahReentrantLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
ShenandoahNMethodLock* const lock = ShenandoahNMethod::ic_lock_for_nmethod(nm);
|
||||
assert(lock != nullptr, "Not yet registered?");
|
||||
return lock->owned_by_self();
|
||||
}
|
||||
|
||||
@ -711,9 +711,7 @@ void InterpreterRuntime::resolve_get_put(Bytecodes::Code bytecode, int field_ind
|
||||
}
|
||||
|
||||
ResolvedFieldEntry* entry = pool->resolved_field_entry_at(field_index);
|
||||
entry->set_flags(info.access_flags().is_final(), info.access_flags().is_volatile());
|
||||
entry->fill_in(info.field_holder(), info.offset(),
|
||||
checked_cast<u2>(info.index()), checked_cast<u1>(state),
|
||||
entry->fill_in(info, checked_cast<u1>(state),
|
||||
static_cast<u1>(get_code), static_cast<u1>(put_code));
|
||||
}
|
||||
|
||||
@ -1189,10 +1187,9 @@ JRT_LEAF(void, InterpreterRuntime::at_unwind(JavaThread* current))
|
||||
JRT_END
|
||||
|
||||
JRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread* current, oopDesc* obj,
|
||||
ResolvedFieldEntry *entry))
|
||||
ResolvedFieldEntry* entry))
|
||||
|
||||
// check the access_flags for the field in the klass
|
||||
|
||||
InstanceKlass* ik = entry->field_holder();
|
||||
int index = entry->field_index();
|
||||
if (!ik->field_status(index).is_access_watched()) return;
|
||||
@ -1212,11 +1209,10 @@ JRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread* current, oopDe
|
||||
JRT_END
|
||||
|
||||
JRT_ENTRY(void, InterpreterRuntime::post_field_modification(JavaThread* current, oopDesc* obj,
|
||||
ResolvedFieldEntry *entry, jvalue *value))
|
||||
|
||||
InstanceKlass* ik = entry->field_holder();
|
||||
ResolvedFieldEntry* entry, jvalue* value))
|
||||
|
||||
// check the access_flags for the field in the klass
|
||||
InstanceKlass* ik = entry->field_holder();
|
||||
int index = entry->field_index();
|
||||
// bail out if field modifications are not watched
|
||||
if (!ik->field_status(index).is_modification_watched()) return;
|
||||
|
||||
@ -196,7 +196,7 @@ class ConstantPoolCache: public MetaspaceObj {
|
||||
#endif
|
||||
|
||||
public:
|
||||
static int size() { return align_metadata_size(sizeof(ConstantPoolCache) / wordSize); }
|
||||
static int size() { return align_metadata_size(sizeof_auto(ConstantPoolCache) / wordSize); }
|
||||
|
||||
private:
|
||||
// Helpers
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2026, 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
|
||||
@ -24,7 +24,12 @@
|
||||
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cppstdlib/type_traits.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/instanceOop.hpp"
|
||||
#include "oops/resolvedFieldEntry.hpp"
|
||||
#include "runtime/fieldDescriptor.inline.hpp"
|
||||
#include "utilities/checkedCast.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
static_assert(std::is_trivially_copyable_v<ResolvedFieldEntry>);
|
||||
|
||||
@ -34,6 +39,19 @@ class ResolvedFieldEntryWithExtra : public ResolvedFieldEntry {
|
||||
};
|
||||
static_assert(sizeof(ResolvedFieldEntryWithExtra) > sizeof(ResolvedFieldEntry));
|
||||
|
||||
void ResolvedFieldEntry::fill_in(const fieldDescriptor& info, u1 tos_state, u1 get_code, u1 put_code) {
|
||||
set_flags(info.access_flags().is_final(), info.access_flags().is_volatile());
|
||||
_field_holder = info.field_holder();
|
||||
_field_offset = info.offset();
|
||||
_field_index = checked_cast<u2>(info.index());
|
||||
_tos_state = tos_state;
|
||||
|
||||
// These must be set after the other fields
|
||||
set_bytecode(&_get_code, get_code);
|
||||
set_bytecode(&_put_code, put_code);
|
||||
assert_is_valid();
|
||||
}
|
||||
|
||||
void ResolvedFieldEntry::print_on(outputStream* st) const {
|
||||
st->print_cr("Field Entry:");
|
||||
|
||||
@ -52,6 +70,20 @@ void ResolvedFieldEntry::print_on(outputStream* st) const {
|
||||
st->print_cr(" - Put Bytecode: %s", Bytecodes::name((Bytecodes::Code)put_code()));
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
void ResolvedFieldEntry::assert_is_valid() const {
|
||||
assert(field_holder()->is_instance_klass(), "should be instanceKlass");
|
||||
assert(field_offset() >= instanceOopDesc::base_offset_in_bytes(),
|
||||
"field offset out of range %d >= %d", field_offset(), instanceOopDesc::base_offset_in_bytes());
|
||||
assert(as_BasicType((TosState)tos_state()) != T_ILLEGAL, "tos_state is ILLEGAL");
|
||||
assert(_flags < (1 << (max_flag_shift + 1)), "flags are too large %d", _flags);
|
||||
assert((get_code() == 0 || get_code() == Bytecodes::_getstatic || get_code() == Bytecodes::_getfield),
|
||||
"invalid get bytecode %d", get_code());
|
||||
assert((put_code() == 0 || put_code() == Bytecodes::_putstatic || put_code() == Bytecodes::_putfield),
|
||||
"invalid put bytecode %d", put_code());
|
||||
}
|
||||
#endif
|
||||
|
||||
#if INCLUDE_CDS
|
||||
void ResolvedFieldEntry::remove_unshareable_info() {
|
||||
*this = ResolvedFieldEntry(_cpool_index);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2026, 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
|
||||
@ -26,7 +26,6 @@
|
||||
#define SHARE_OOPS_RESOLVEDFIELDENTRY_HPP
|
||||
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "runtime/atomicAccess.hpp"
|
||||
#include "utilities/checkedCast.hpp"
|
||||
#include "utilities/sizes.hpp"
|
||||
@ -46,7 +45,8 @@
|
||||
// The explicit paddings are necessary for generating deterministic CDS archives. They prevent
|
||||
// the C++ compiler from potentially inserting random values in unused gaps.
|
||||
|
||||
//class InstanceKlass;
|
||||
class InstanceKlass;
|
||||
|
||||
class ResolvedFieldEntry {
|
||||
friend class VMStructs;
|
||||
|
||||
@ -84,6 +84,7 @@ public:
|
||||
enum {
|
||||
is_volatile_shift = 0,
|
||||
is_final_shift = 1, // unused
|
||||
max_flag_shift = is_final_shift
|
||||
};
|
||||
|
||||
// Getters
|
||||
@ -113,6 +114,7 @@ public:
|
||||
// Printing
|
||||
void print_on(outputStream* st) const;
|
||||
|
||||
private:
|
||||
void set_flags(bool is_final_flag, bool is_volatile_flag) {
|
||||
int new_flags = (is_final_flag << is_final_shift) | static_cast<int>(is_volatile_flag);
|
||||
_flags = checked_cast<u1>(new_flags);
|
||||
@ -129,17 +131,12 @@ public:
|
||||
AtomicAccess::release_store(code, new_code);
|
||||
}
|
||||
|
||||
// Populate the strucutre with resolution information
|
||||
void fill_in(InstanceKlass* klass, int offset, u2 index, u1 tos_state, u1 b1, u1 b2) {
|
||||
_field_holder = klass;
|
||||
_field_offset = offset;
|
||||
_field_index = index;
|
||||
_tos_state = tos_state;
|
||||
// Debug help
|
||||
void assert_is_valid() const NOT_DEBUG_RETURN;
|
||||
|
||||
// These must be set after the other fields
|
||||
set_bytecode(&_get_code, b1);
|
||||
set_bytecode(&_put_code, b2);
|
||||
}
|
||||
public:
|
||||
// Populate the strucutre with resolution information
|
||||
void fill_in(const fieldDescriptor& info, u1 tos_state, u1 get_code, u1 put_code);
|
||||
|
||||
// CDS
|
||||
#if INCLUDE_CDS
|
||||
@ -155,7 +152,6 @@ public:
|
||||
static ByteSize put_code_offset() { return byte_offset_of(ResolvedFieldEntry, _put_code); }
|
||||
static ByteSize type_offset() { return byte_offset_of(ResolvedFieldEntry, _tos_state); }
|
||||
static ByteSize flags_offset() { return byte_offset_of(ResolvedFieldEntry, _flags); }
|
||||
|
||||
};
|
||||
|
||||
#endif //SHARE_OOPS_RESOLVEDFIELDENTRY_HPP
|
||||
|
||||
@ -360,6 +360,17 @@ Node* IdealKit::load(Node* ctl,
|
||||
return transform(ld);
|
||||
}
|
||||
|
||||
// Load AOT runtime constant
|
||||
Node* IdealKit::load_aot_const(Node* adr, const Type* t) {
|
||||
BasicType bt = t->basic_type();
|
||||
const TypePtr* adr_type = nullptr; // debug-mode-only argument
|
||||
DEBUG_ONLY(adr_type = C->get_adr_type(Compile::AliasIdxRaw));
|
||||
Node* ctl = (Node*)C->root(); // Raw memory access needs control
|
||||
Node* ld = LoadNode::make(_gvn, ctl, C->immutable_memory(), adr, adr_type, t, bt, MemNode::unordered,
|
||||
LoadNode::DependsOnlyOnTest, false, false, false, false, 0);
|
||||
return transform(ld);
|
||||
}
|
||||
|
||||
Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
|
||||
int adr_idx,
|
||||
MemNode::MemOrd mo, bool require_atomic_access,
|
||||
|
||||
@ -224,6 +224,9 @@ class IdealKit: public StackObj {
|
||||
MemNode::MemOrd mo = MemNode::unordered,
|
||||
LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest);
|
||||
|
||||
// Load AOT runtime constant
|
||||
Node* load_aot_const(Node* adr, const Type* t);
|
||||
|
||||
// Return the new StoreXNode
|
||||
Node* store(Node* ctl,
|
||||
Node* adr,
|
||||
|
||||
@ -97,7 +97,7 @@ const Type::TypeInfo Type::_type_info[Type::lastype] = {
|
||||
{ Bad, T_ILLEGAL, "vectorz:", false, Op_VecZ, relocInfo::none }, // VectorZ
|
||||
#endif
|
||||
{ Bad, T_ADDRESS, "anyptr:", false, Op_RegP, relocInfo::none }, // AnyPtr
|
||||
{ Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::none }, // RawPtr
|
||||
{ Bad, T_ADDRESS, "rawptr:", false, Op_RegP, relocInfo::external_word_type }, // RawPtr
|
||||
{ Bad, T_OBJECT, "oop:", true, Op_RegP, relocInfo::oop_type }, // OopPtr
|
||||
{ Bad, T_OBJECT, "inst:", true, Op_RegP, relocInfo::oop_type }, // InstPtr
|
||||
{ Bad, T_OBJECT, "ary:", true, Op_RegP, relocInfo::oop_type }, // AryPtr
|
||||
|
||||
@ -3641,7 +3641,9 @@ JVM_ENTRY(jobjectArray, JVM_GetVmArguments(JNIEnv *env))
|
||||
|
||||
int index = 0;
|
||||
for (int j = 0; j < num_flags; j++, index++) {
|
||||
Handle h = java_lang_String::create_from_platform_dependent_str(vm_flags[j], CHECK_NULL);
|
||||
stringStream prefixed;
|
||||
prefixed.print("-XX:%s", vm_flags[j]);
|
||||
Handle h = java_lang_String::create_from_platform_dependent_str(prefixed.base(), CHECK_NULL);
|
||||
result_h->obj_at_put(index, h());
|
||||
}
|
||||
for (int i = 0; i < num_args; i++, index++) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -2491,7 +2491,7 @@ SetOrClearFramePopClosure::do_thread(Thread *target) {
|
||||
_result = JVMTI_ERROR_NO_MORE_FRAMES;
|
||||
return;
|
||||
}
|
||||
assert(_state->get_thread_or_saved() == java_thread, "Must be");
|
||||
assert(_state->get_thread() == java_thread, "Must be");
|
||||
|
||||
RegisterMap reg_map(java_thread,
|
||||
RegisterMap::UpdateMap::include,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -151,11 +151,6 @@ bool JvmtiEnvThreadState::is_virtual() {
|
||||
return _state->is_virtual();
|
||||
}
|
||||
|
||||
// Use _thread_saved if cthread is detached from JavaThread (_thread == nullptr).
|
||||
JavaThread* JvmtiEnvThreadState::get_thread_or_saved() {
|
||||
return _state->get_thread_or_saved();
|
||||
}
|
||||
|
||||
JavaThread* JvmtiEnvThreadState::get_thread() {
|
||||
return _state->get_thread();
|
||||
}
|
||||
@ -344,7 +339,7 @@ void JvmtiEnvThreadState::reset_current_location(jvmtiEvent event_type, bool ena
|
||||
if (enabled) {
|
||||
// If enabling breakpoint, no need to reset.
|
||||
// Can't do anything if empty stack.
|
||||
JavaThread* thread = get_thread_or_saved();
|
||||
JavaThread* thread = get_thread();
|
||||
|
||||
if (event_type == JVMTI_EVENT_SINGLE_STEP &&
|
||||
((thread == nullptr && is_virtual()) || thread->has_last_Java_frame())) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -170,8 +170,6 @@ public:
|
||||
|
||||
inline JvmtiThreadState* jvmti_thread_state() { return _state; }
|
||||
|
||||
// use _thread_saved if cthread is detached from JavaThread
|
||||
JavaThread *get_thread_or_saved();
|
||||
JavaThread *get_thread();
|
||||
inline JvmtiEnv *get_env() { return _env; }
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -217,6 +217,10 @@ class EnterInterpOnlyModeClosure : public HandshakeClosure {
|
||||
|
||||
assert(state != nullptr, "sanity check");
|
||||
assert(state->get_thread() == jt, "handshake unsafe conditions");
|
||||
assert(jt->jvmti_thread_state() == state, "sanity check");
|
||||
assert(!jt->is_interp_only_mode(), "sanity check");
|
||||
assert(!state->is_interp_only_mode(), "sanity check");
|
||||
|
||||
if (!state->is_pending_interp_only_mode()) {
|
||||
_completed = true;
|
||||
return; // The pending flag has been already cleared, so bail out.
|
||||
@ -361,7 +365,8 @@ void VM_ChangeSingleStep::doit() {
|
||||
|
||||
void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state) {
|
||||
EC_TRACE(("[%s] # Entering interpreter only mode",
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread_or_saved())));
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread())));
|
||||
|
||||
JavaThread *target = state->get_thread();
|
||||
Thread *current = Thread::current();
|
||||
|
||||
@ -371,8 +376,13 @@ void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state
|
||||
}
|
||||
// This flag will be cleared in EnterInterpOnlyModeClosure handshake.
|
||||
state->set_pending_interp_only_mode(true);
|
||||
if (target == nullptr) { // an unmounted virtual thread
|
||||
return; // EnterInterpOnlyModeClosure will be executed right after mount.
|
||||
|
||||
// There are two cases when entering interp_only_mode is postponed:
|
||||
// 1. Unmounted virtual thread - EnterInterpOnlyModeClosure::do_thread will be executed at mount;
|
||||
// 2. Carrier thread with mounted virtual thread - EnterInterpOnlyModeClosure::do_thread will be executed at unmount.
|
||||
if (target == nullptr || // an unmounted virtual thread
|
||||
JvmtiEnvBase::is_thread_carrying_vthread(target, state->get_thread_oop())) { // a vthread carrying thread
|
||||
return; // EnterInterpOnlyModeClosure will be executed right after mount or unmount.
|
||||
}
|
||||
EnterInterpOnlyModeClosure hs(state);
|
||||
if (target->is_handshake_safe_for(current)) {
|
||||
@ -388,7 +398,8 @@ void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state
|
||||
void
|
||||
JvmtiEventControllerPrivate::leave_interp_only_mode(JvmtiThreadState *state) {
|
||||
EC_TRACE(("[%s] # Leaving interpreter only mode",
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread_or_saved())));
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread())));
|
||||
|
||||
if (state->is_pending_interp_only_mode()) {
|
||||
state->set_pending_interp_only_mode(false); // Just clear the pending flag.
|
||||
assert(!state->is_interp_only_mode(), "sanity check");
|
||||
@ -409,7 +420,7 @@ JvmtiEventControllerPrivate::trace_changed(JvmtiThreadState *state, jlong now_en
|
||||
if (changed & bit) {
|
||||
// it changed, print it
|
||||
log_trace(jvmti)("[%s] # %s event %s",
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread_or_saved()),
|
||||
JvmtiTrace::safe_get_thread_name(state->get_thread()),
|
||||
(now_enabled & bit)? "Enabling" : "Disabling", JvmtiTrace::event_name((jvmtiEvent)ei));
|
||||
}
|
||||
}
|
||||
@ -932,7 +943,7 @@ JvmtiEventControllerPrivate::set_user_enabled(JvmtiEnvBase *env, JavaThread *thr
|
||||
void
|
||||
JvmtiEventControllerPrivate::set_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
|
||||
EC_TRACE(("[%s] # set frame pop - frame=%d",
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread_or_saved()),
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
|
||||
fpop.frame_number() ));
|
||||
|
||||
ets->get_frame_pops()->set(fpop);
|
||||
@ -943,7 +954,7 @@ JvmtiEventControllerPrivate::set_frame_pop(JvmtiEnvThreadState *ets, JvmtiFrameP
|
||||
void
|
||||
JvmtiEventControllerPrivate::clear_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
|
||||
EC_TRACE(("[%s] # clear frame pop - frame=%d",
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread_or_saved()),
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
|
||||
fpop.frame_number() ));
|
||||
|
||||
ets->get_frame_pops()->clear(fpop);
|
||||
@ -953,7 +964,7 @@ JvmtiEventControllerPrivate::clear_frame_pop(JvmtiEnvThreadState *ets, JvmtiFram
|
||||
void
|
||||
JvmtiEventControllerPrivate::clear_all_frame_pops(JvmtiEnvThreadState *ets) {
|
||||
EC_TRACE(("[%s] # clear all frame pops",
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread_or_saved())
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread())
|
||||
));
|
||||
|
||||
ets->get_frame_pops()->clear_all();
|
||||
@ -965,7 +976,7 @@ JvmtiEventControllerPrivate::clear_to_frame_pop(JvmtiEnvThreadState *ets, JvmtiF
|
||||
int cleared_cnt = ets->get_frame_pops()->clear_to(fpop);
|
||||
|
||||
EC_TRACE(("[%s] # clear to frame pop - frame=%d, count=%d",
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread_or_saved()),
|
||||
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
|
||||
fpop.frame_number(),
|
||||
cleared_cnt ));
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -57,7 +57,6 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread, oop thread_oop)
|
||||
: _thread_event_enable() {
|
||||
assert(JvmtiThreadState_lock->is_locked(), "sanity check");
|
||||
_thread = thread;
|
||||
_thread_saved = nullptr;
|
||||
_exception_state = ES_CLEARED;
|
||||
_hide_single_stepping = false;
|
||||
_pending_interp_only_mode = false;
|
||||
@ -118,11 +117,11 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread, oop thread_oop)
|
||||
|
||||
if (thread != nullptr) {
|
||||
if (thread_oop == nullptr || thread->jvmti_vthread() == nullptr || thread->jvmti_vthread() == thread_oop) {
|
||||
// The JavaThread for carrier or mounted virtual thread case.
|
||||
// The JavaThread for an active carrier or a mounted virtual thread case.
|
||||
// Set this only if thread_oop is current thread->jvmti_vthread().
|
||||
thread->set_jvmti_thread_state(this);
|
||||
assert(!thread->is_interp_only_mode(), "sanity check");
|
||||
}
|
||||
thread->set_interp_only_mode(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +134,10 @@ JvmtiThreadState::~JvmtiThreadState() {
|
||||
}
|
||||
|
||||
// clear this as the state for the thread
|
||||
assert(get_thread() != nullptr, "sanity check");
|
||||
assert(get_thread()->jvmti_thread_state() == this, "sanity check");
|
||||
get_thread()->set_jvmti_thread_state(nullptr);
|
||||
get_thread()->set_interp_only_mode(false);
|
||||
|
||||
// zap our env thread states
|
||||
{
|
||||
@ -323,6 +325,9 @@ void JvmtiThreadState::enter_interp_only_mode() {
|
||||
assert(_thread != nullptr, "sanity check");
|
||||
assert(JvmtiThreadState_lock->is_locked(), "sanity check");
|
||||
assert(!is_interp_only_mode(), "entering interp only when in interp only mode");
|
||||
assert(_thread->jvmti_vthread() == nullptr || _thread->jvmti_vthread() == get_thread_oop(), "sanity check");
|
||||
assert(_thread->jvmti_thread_state() == this, "sanity check");
|
||||
_saved_interp_only_mode = true;
|
||||
_thread->set_interp_only_mode(true);
|
||||
invalidate_cur_stack_depth();
|
||||
}
|
||||
@ -330,10 +335,9 @@ void JvmtiThreadState::enter_interp_only_mode() {
|
||||
void JvmtiThreadState::leave_interp_only_mode() {
|
||||
assert(JvmtiThreadState_lock->is_locked(), "sanity check");
|
||||
assert(is_interp_only_mode(), "leaving interp only when not in interp only mode");
|
||||
if (_thread == nullptr) {
|
||||
// Unmounted virtual thread updates the saved value.
|
||||
_saved_interp_only_mode = false;
|
||||
} else {
|
||||
_saved_interp_only_mode = false;
|
||||
if (_thread != nullptr && _thread->jvmti_thread_state() == this) {
|
||||
assert(_thread->jvmti_vthread() == nullptr || _thread->jvmti_vthread() == get_thread_oop(), "sanity check");
|
||||
_thread->set_interp_only_mode(false);
|
||||
}
|
||||
}
|
||||
@ -341,7 +345,7 @@ void JvmtiThreadState::leave_interp_only_mode() {
|
||||
|
||||
// Helper routine used in several places
|
||||
int JvmtiThreadState::count_frames() {
|
||||
JavaThread* thread = get_thread_or_saved();
|
||||
JavaThread* thread = get_thread();
|
||||
javaVFrame *jvf;
|
||||
ResourceMark rm;
|
||||
if (thread == nullptr) {
|
||||
@ -578,11 +582,8 @@ void JvmtiThreadState::update_thread_oop_during_vm_start() {
|
||||
}
|
||||
}
|
||||
|
||||
// For virtual threads only.
|
||||
void JvmtiThreadState::set_thread(JavaThread* thread) {
|
||||
_thread_saved = nullptr; // Common case.
|
||||
if (!_is_virtual && thread == nullptr) {
|
||||
// Save JavaThread* if carrier thread is being detached.
|
||||
_thread_saved = _thread;
|
||||
}
|
||||
assert(is_virtual(), "sanity check");
|
||||
_thread = thread;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -123,8 +123,11 @@ class JvmtiVTSuspender : AllStatic {
|
||||
class JvmtiThreadState : public CHeapObj<mtInternal> {
|
||||
private:
|
||||
friend class JvmtiEnv;
|
||||
// The _thread field is a link to the JavaThread associated with JvmtiThreadState.
|
||||
// A platform (including carrier) thread should always have a stable link to its JavaThread.
|
||||
// The _thread field of a virtual thread should point to the JavaThread when
|
||||
// virtual thread is mounted. It should be set to null when it is unmounted.
|
||||
JavaThread *_thread;
|
||||
JavaThread *_thread_saved;
|
||||
OopHandle _thread_oop_h;
|
||||
// Jvmti Events that cannot be posted in their current context.
|
||||
JvmtiDeferredEventQueue* _jvmti_event_queue;
|
||||
@ -219,7 +222,7 @@ class JvmtiThreadState : public CHeapObj<mtInternal> {
|
||||
|
||||
// Used by the interpreter for fullspeed debugging support
|
||||
bool is_interp_only_mode() {
|
||||
return _thread == nullptr ? _saved_interp_only_mode : _thread->is_interp_only_mode();
|
||||
return _saved_interp_only_mode;
|
||||
}
|
||||
void enter_interp_only_mode();
|
||||
void leave_interp_only_mode();
|
||||
@ -248,8 +251,10 @@ class JvmtiThreadState : public CHeapObj<mtInternal> {
|
||||
|
||||
int count_frames();
|
||||
|
||||
inline JavaThread *get_thread() { return _thread; }
|
||||
inline JavaThread *get_thread_or_saved(); // return _thread_saved if _thread is null
|
||||
inline JavaThread *get_thread() {
|
||||
assert(is_virtual() || _thread != nullptr, "sanity check");
|
||||
return _thread;
|
||||
}
|
||||
|
||||
// Needed for virtual threads as they can migrate to different JavaThread's.
|
||||
// Also used for carrier threads to clear/restore _thread.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2026, 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
|
||||
@ -130,22 +130,21 @@ inline JvmtiThreadState* JvmtiThreadState::state_for(JavaThread *thread, Handle
|
||||
return state;
|
||||
}
|
||||
|
||||
inline JavaThread* JvmtiThreadState::get_thread_or_saved() {
|
||||
// Use _thread_saved if cthread is detached from JavaThread (_thread == null).
|
||||
return (_thread == nullptr && !is_virtual()) ? _thread_saved : _thread;
|
||||
}
|
||||
|
||||
inline void JvmtiThreadState::set_should_post_on_exceptions(bool val) {
|
||||
get_thread_or_saved()->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE);
|
||||
get_thread()->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE);
|
||||
}
|
||||
|
||||
inline void JvmtiThreadState::unbind_from(JvmtiThreadState* state, JavaThread* thread) {
|
||||
if (state == nullptr) {
|
||||
assert(!thread->is_interp_only_mode(), "sanity check");
|
||||
return;
|
||||
}
|
||||
// Save thread's interp_only_mode.
|
||||
state->_saved_interp_only_mode = thread->is_interp_only_mode();
|
||||
state->set_thread(nullptr); // Make sure stale _thread value is never used.
|
||||
assert(thread->jvmti_thread_state() == state, "sanity check");
|
||||
assert(state->get_thread() == thread, "sanity check");
|
||||
assert(thread->is_interp_only_mode() == state->_saved_interp_only_mode, "sanity check");
|
||||
if (state->is_virtual()) { // clean _thread link for virtual threads only
|
||||
state->set_thread(nullptr); // make sure stale _thread value is never used
|
||||
}
|
||||
}
|
||||
|
||||
inline void JvmtiThreadState::bind_to(JvmtiThreadState* state, JavaThread* thread) {
|
||||
@ -158,7 +157,7 @@ inline void JvmtiThreadState::bind_to(JvmtiThreadState* state, JavaThread* threa
|
||||
// Bind JavaThread to JvmtiThreadState.
|
||||
thread->set_jvmti_thread_state(state);
|
||||
|
||||
if (state != nullptr) {
|
||||
if (state != nullptr && state->is_virtual()) {
|
||||
// Bind to JavaThread.
|
||||
state->set_thread(thread);
|
||||
}
|
||||
|
||||
@ -168,6 +168,29 @@ class oopDesc;
|
||||
#define SIZE_FORMAT_X_0 "0x%08" PRIxPTR
|
||||
#endif // _LP64
|
||||
|
||||
|
||||
template<size_t N>
|
||||
constexpr auto sizeof_auto_impl() {
|
||||
if constexpr (N <= std::numeric_limits<uint8_t>::max()) return uint8_t(N);
|
||||
else if constexpr (N <= std::numeric_limits<uint16_t>::max()) return uint16_t(N);
|
||||
else if constexpr (N <= std::numeric_limits<uint32_t>::max()) return uint32_t(N);
|
||||
else return uint64_t(N);
|
||||
}
|
||||
|
||||
// Yields the size (in bytes) of the operand, using the smallest
|
||||
// unsigned type that can represent the size value. The operand may be
|
||||
// an expression, which is an unevaluated operand, or it may be a
|
||||
// type. All of the restrictions for sizeof operands apply to the
|
||||
// operand. The result is a constant expression.
|
||||
//
|
||||
// Example of correct usage of sizeof/sizeof_auto:
|
||||
// // this will wrap using sizeof_auto, use sizeof to ensure computation using size_t
|
||||
// size_t size = std::numeric_limits<uint32_t>::max() * sizeof(uint16_t);
|
||||
// // implicit narrowing conversion or compiler warning/error using stricter compiler flags when using sizeof
|
||||
// int count = 42 / sizeof_auto(uint16_t);
|
||||
|
||||
#define sizeof_auto(...) sizeof_auto_impl<sizeof(__VA_ARGS__)>()
|
||||
|
||||
// Convert pointer to intptr_t, for use in printing pointers.
|
||||
inline intptr_t p2i(const volatile void* p) {
|
||||
return (intptr_t) p;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2026, 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
|
||||
@ -11233,7 +11233,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character is an Emoji;
|
||||
* {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isEmoji(int codePoint) {
|
||||
@ -11252,7 +11252,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character has the Emoji Presentation
|
||||
* property; {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isEmojiPresentation(int codePoint) {
|
||||
@ -11271,7 +11271,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character is an Emoji Modifier;
|
||||
* {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isEmojiModifier(int codePoint) {
|
||||
@ -11290,7 +11290,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character is an Emoji Modifier Base;
|
||||
* {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isEmojiModifierBase(int codePoint) {
|
||||
@ -11309,7 +11309,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character is an Emoji Component;
|
||||
* {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isEmojiComponent(int codePoint) {
|
||||
@ -11328,7 +11328,7 @@ class Character implements java.io.Serializable, Comparable<Character>, Constabl
|
||||
* @param codePoint the character (Unicode code point) to be tested.
|
||||
* @return {@code true} if the character is an Extended Pictographic;
|
||||
* {@code false} otherwise.
|
||||
* @spec https://unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @spec https://www.unicode.org/reports/tr51/ Unicode Emoji
|
||||
* @since 21
|
||||
*/
|
||||
public static boolean isExtendedPictographic(int codePoint) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2026, 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
|
||||
@ -55,11 +55,10 @@ class Shutdown {
|
||||
private static int currentRunningHook = -1;
|
||||
|
||||
/* The preceding static fields are protected by this lock */
|
||||
private static class Lock { };
|
||||
private static Object lock = new Lock();
|
||||
private static final Object lock = new Object();
|
||||
|
||||
/* Lock object for the native halt method */
|
||||
private static Object haltLock = new Lock();
|
||||
private static final Object haltLock = new Object();
|
||||
|
||||
/**
|
||||
* Add a new system shutdown hook. Checks the shutdown state and
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, 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
|
||||
@ -746,15 +746,7 @@ abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesDat
|
||||
new Consumer<>() {
|
||||
@Override
|
||||
public void accept(CodeBuilder cob) {
|
||||
cob.aload(0); // this
|
||||
|
||||
final List<Var> ctorArgs = AFTER_THIS.fromTypes(superCtorType.parameterList());
|
||||
for (Var ca : ctorArgs) {
|
||||
ca.emitLoadInstruction(cob);
|
||||
}
|
||||
|
||||
// super(ca...)
|
||||
cob.invokespecial(superClassDesc, INIT_NAME, methodDesc(superCtorType));
|
||||
|
||||
// store down fields
|
||||
Var lastFV = AFTER_THIS.lastOf(ctorArgs);
|
||||
@ -766,6 +758,12 @@ abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesDat
|
||||
cob.putfield(classDesc, f.name, f.desc);
|
||||
}
|
||||
|
||||
// super(ca...)
|
||||
cob.aload(0); // this
|
||||
for (Var ca : ctorArgs) {
|
||||
ca.emitLoadInstruction(cob);
|
||||
}
|
||||
cob.invokespecial(superClassDesc, INIT_NAME, methodDesc(superCtorType));
|
||||
cob.return_();
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2026, 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
|
||||
@ -391,15 +391,15 @@ import sun.invoke.util.Wrapper;
|
||||
new Consumer<>() {
|
||||
@Override
|
||||
public void accept(CodeBuilder cob) {
|
||||
cob.aload(0)
|
||||
.invokespecial(CD_Object, INIT_NAME, MTD_void);
|
||||
int parameterCount = factoryType.parameterCount();
|
||||
for (int i = 0; i < parameterCount; i++) {
|
||||
cob.aload(0)
|
||||
.loadLocal(TypeKind.from(factoryType.parameterType(i)), cob.parameterSlot(i))
|
||||
.putfield(pool.fieldRefEntry(lambdaClassEntry, pool.nameAndTypeEntry(argName(i), argDescs[i])));
|
||||
}
|
||||
cob.return_();
|
||||
cob.aload(0)
|
||||
.invokespecial(CD_Object, INIT_NAME, MTD_void)
|
||||
.return_();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2026, 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
|
||||
@ -362,10 +362,8 @@ public final class MethodHandleProxies {
|
||||
|
||||
// <init>(Lookup, MethodHandle target, MethodHandle callerBoundTarget)
|
||||
clb.withMethodBody(INIT_NAME, MTD_void_Lookup_MethodHandle_MethodHandle, 0, cob -> {
|
||||
cob.aload(0)
|
||||
.invokespecial(CD_Object, INIT_NAME, MTD_void)
|
||||
// call ensureOriginalLookup to verify the given Lookup has access
|
||||
.aload(1)
|
||||
// call ensureOriginalLookup to verify the given Lookup has access
|
||||
cob.aload(1)
|
||||
.invokestatic(proxyDesc, ENSURE_ORIGINAL_LOOKUP, MTD_void_Lookup)
|
||||
// this.target = target;
|
||||
.aload(0)
|
||||
@ -383,7 +381,9 @@ public final class MethodHandleProxies {
|
||||
}
|
||||
|
||||
// complete
|
||||
cob.return_();
|
||||
cob.aload(0)
|
||||
.invokespecial(CD_Object, INIT_NAME, MTD_void)
|
||||
.return_();
|
||||
});
|
||||
|
||||
// private static void ensureOriginalLookup(Lookup) checks if the given Lookup
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2026, 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
|
||||
@ -60,8 +60,7 @@ public class ReferenceQueue<@jdk.internal.RequiresIdentity T> {
|
||||
private volatile Reference<? extends T> head;
|
||||
private long queueLength = 0;
|
||||
|
||||
private static class Lock { };
|
||||
private final Lock lock = new Lock();
|
||||
private final Object lock = new Object();
|
||||
|
||||
/**
|
||||
* Constructs a new reference-object queue.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2026, 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
|
||||
@ -363,9 +363,9 @@ public final class ObjectMethods {
|
||||
* @return the method handle
|
||||
*/
|
||||
private static MethodHandle makeToString(MethodHandles.Lookup lookup,
|
||||
Class<?> receiverClass,
|
||||
MethodHandle[] getters,
|
||||
List<String> names) {
|
||||
Class<?> receiverClass,
|
||||
MethodHandle[] getters,
|
||||
List<String> names) {
|
||||
assert getters.length == names.size();
|
||||
if (getters.length == 0) {
|
||||
// special case
|
||||
@ -516,8 +516,8 @@ public final class ObjectMethods {
|
||||
requireNonNull(type);
|
||||
requireNonNull(recordClass);
|
||||
requireNonNull(names);
|
||||
requireNonNull(getters);
|
||||
Arrays.stream(getters).forEach(Objects::requireNonNull);
|
||||
List<MethodHandle> getterList = List.of(getters); // deep null check
|
||||
|
||||
MethodType methodType;
|
||||
if (type instanceof MethodType mt)
|
||||
methodType = mt;
|
||||
@ -526,7 +526,14 @@ public final class ObjectMethods {
|
||||
if (!MethodHandle.class.equals(type))
|
||||
throw new IllegalArgumentException(type.toString());
|
||||
}
|
||||
List<MethodHandle> getterList = List.of(getters);
|
||||
|
||||
for (MethodHandle getter : getterList) {
|
||||
var getterType = getter.type();
|
||||
if (getterType.parameterCount() != 1 || getterType.returnType() == void.class || getterType.parameterType(0) != recordClass) {
|
||||
throw new IllegalArgumentException("Illegal getter type %s for recordClass %s".formatted(getterType, recordClass.getTypeName()));
|
||||
}
|
||||
}
|
||||
|
||||
MethodHandle handle = switch (methodName) {
|
||||
case "equals" -> {
|
||||
if (methodType != null && !methodType.equals(MethodType.methodType(boolean.class, recordClass, Object.class)))
|
||||
@ -541,7 +548,7 @@ public final class ObjectMethods {
|
||||
case "toString" -> {
|
||||
if (methodType != null && !methodType.equals(MethodType.methodType(String.class, recordClass)))
|
||||
throw new IllegalArgumentException("Bad method type: " + methodType);
|
||||
List<String> nameList = "".equals(names) ? List.of() : List.of(names.split(";"));
|
||||
List<String> nameList = names.isEmpty() ? List.of() : List.of(names.split(";"));
|
||||
if (nameList.size() != getterList.size())
|
||||
throw new IllegalArgumentException("Name list and accessor list do not match");
|
||||
yield makeToString(lookup, recordClass, getters, nameList);
|
||||
|
||||
@ -1719,8 +1719,10 @@ public class ZipFile implements ZipConstants, Closeable {
|
||||
this.cen = null;
|
||||
return; // only END header present
|
||||
}
|
||||
if (end.cenlen > end.endpos)
|
||||
// Validate END header
|
||||
if (end.cenlen > end.endpos) {
|
||||
zerror("invalid END header (bad central directory size)");
|
||||
}
|
||||
long cenpos = end.endpos - end.cenlen; // position of CEN table
|
||||
// Get position of first local file (LOC) header, taking into
|
||||
// account that there may be a stub prefixed to the ZIP file.
|
||||
@ -1728,18 +1730,22 @@ public class ZipFile implements ZipConstants, Closeable {
|
||||
if (locpos < 0) {
|
||||
zerror("invalid END header (bad central directory offset)");
|
||||
}
|
||||
// read in the CEN
|
||||
if (end.cenlen > MAX_CEN_SIZE) {
|
||||
zerror("invalid END header (central directory size too large)");
|
||||
}
|
||||
if (end.centot < 0 || end.centot > end.cenlen / CENHDR) {
|
||||
zerror("invalid END header (total entries count too large)");
|
||||
}
|
||||
cen = this.cen = new byte[(int)end.cenlen];
|
||||
if (readFullyAt(cen, 0, cen.length, cenpos) != end.cenlen) {
|
||||
// Validation ensures these are <= Integer.MAX_VALUE
|
||||
int cenlen = Math.toIntExact(end.cenlen);
|
||||
int centot = Math.toIntExact(end.centot);
|
||||
|
||||
// read in the CEN
|
||||
cen = this.cen = new byte[cenlen];
|
||||
if (readFullyAt(cen, 0, cen.length, cenpos) != cenlen) {
|
||||
zerror("read CEN tables failed");
|
||||
}
|
||||
this.total = Math.toIntExact(end.centot);
|
||||
this.total = centot;
|
||||
} else {
|
||||
cen = this.cen;
|
||||
this.total = knownTotal;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2026, 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
|
||||
@ -599,8 +599,8 @@ public class ArraysSupport {
|
||||
if (length > 3) {
|
||||
if (a[aFromIndex] != b[bFromIndex])
|
||||
return 0;
|
||||
long aOffset = Unsafe.ARRAY_CHAR_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_CHAR_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_CHAR_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_CHAR_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_CHAR_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_CHAR_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_CHAR_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_CHAR_INDEX_SCALE);
|
||||
i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
@ -648,8 +648,8 @@ public class ArraysSupport {
|
||||
if (length > 3) {
|
||||
if (a[aFromIndex] != b[bFromIndex])
|
||||
return 0;
|
||||
long aOffset = Unsafe.ARRAY_SHORT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_SHORT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_SHORT_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_SHORT_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_SHORT_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_SHORT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_SHORT_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_SHORT_INDEX_SCALE);
|
||||
i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
@ -697,8 +697,8 @@ public class ArraysSupport {
|
||||
if (length > 1) {
|
||||
if (a[aFromIndex] != b[bFromIndex])
|
||||
return 0;
|
||||
long aOffset = Unsafe.ARRAY_INT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_INT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_INT_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_INT_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_INT_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_INT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_INT_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_INT_INDEX_SCALE);
|
||||
i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
@ -729,8 +729,8 @@ public class ArraysSupport {
|
||||
int i = 0;
|
||||
if (length > 1) {
|
||||
if (Float.floatToRawIntBits(a[aFromIndex]) == Float.floatToRawIntBits(b[bFromIndex])) {
|
||||
long aOffset = Unsafe.ARRAY_FLOAT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_FLOAT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_FLOAT_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_FLOAT_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_FLOAT_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_FLOAT_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_FLOAT_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_FLOAT_INDEX_SCALE);
|
||||
i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
@ -787,8 +787,8 @@ public class ArraysSupport {
|
||||
}
|
||||
if (a[aFromIndex] != b[bFromIndex])
|
||||
return 0;
|
||||
long aOffset = Unsafe.ARRAY_LONG_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_LONG_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_LONG_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_LONG_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_LONG_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_LONG_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_LONG_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_LONG_INDEX_SCALE);
|
||||
int i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
@ -813,8 +813,8 @@ public class ArraysSupport {
|
||||
}
|
||||
int i = 0;
|
||||
if (Double.doubleToRawLongBits(a[aFromIndex]) == Double.doubleToRawLongBits(b[bFromIndex])) {
|
||||
long aOffset = Unsafe.ARRAY_DOUBLE_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_DOUBLE_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_DOUBLE_BASE_OFFSET + (bFromIndex << LOG2_ARRAY_DOUBLE_INDEX_SCALE);
|
||||
long aOffset = Unsafe.ARRAY_DOUBLE_BASE_OFFSET + ((long) aFromIndex << LOG2_ARRAY_DOUBLE_INDEX_SCALE);
|
||||
long bOffset = Unsafe.ARRAY_DOUBLE_BASE_OFFSET + ((long) bFromIndex << LOG2_ARRAY_DOUBLE_INDEX_SCALE);
|
||||
i = vectorizedMismatch(
|
||||
a, aOffset,
|
||||
b, bOffset,
|
||||
|
||||
@ -336,7 +336,7 @@ public class VectorSupport {
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<V extends Vector<E>, E>
|
||||
V libraryUnaryOp(long addr, Class<? extends V> vClass, Class<E> eClass, int length, String debugName,
|
||||
V libraryUnaryOp(long addr, Class<? extends V> vClass, int laneType, int length, String debugName,
|
||||
V v,
|
||||
UnaryOperation<V,?> defaultImpl) {
|
||||
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
|
||||
@ -374,7 +374,7 @@ public class VectorSupport {
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<V extends VectorPayload, E>
|
||||
V libraryBinaryOp(long addr, Class<? extends V> vClass, Class<E> eClass, int length, String debugName,
|
||||
V libraryBinaryOp(long addr, Class<? extends V> vClass, int laneType, int length, String debugName,
|
||||
V v1, V v2,
|
||||
BinaryOperation<V,?> defaultImpl) {
|
||||
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2026, 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
|
||||
@ -174,7 +174,19 @@ public final class CStrike extends PhysicalStrike {
|
||||
|
||||
@Override
|
||||
Point2D.Float getGlyphMetrics(final int glyphCode) {
|
||||
return new Point2D.Float(getGlyphAdvance(glyphCode), 0.0f);
|
||||
Point2D.Float metrics = new Point2D.Float();
|
||||
long glyphPtr = getGlyphImagePtr(glyphCode);
|
||||
if (glyphPtr != 0L) {
|
||||
metrics.x = StrikeCache.getGlyphXAdvance(glyphPtr);
|
||||
metrics.y = StrikeCache.getGlyphYAdvance(glyphPtr);
|
||||
/* advance is currently in device space, need to convert back
|
||||
* into user space.
|
||||
* This must not include the translation component. */
|
||||
if (invDevTx != null) {
|
||||
invDevTx.deltaTransform(metrics, metrics);
|
||||
}
|
||||
}
|
||||
return metrics;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2026, 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
|
||||
@ -270,7 +270,7 @@ JNI_COCOA_ENTER(env);
|
||||
NSRect fromRect = NSMakeRect(0, 0, sw, sh);
|
||||
NSRect toRect = NSMakeRect(0, 0, dw, dh);
|
||||
CImage_CopyNSImageIntoArray(img, dst, fromRect, toRect);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, buffer, dst, JNI_ABORT);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, buffer, dst, 0);
|
||||
}
|
||||
|
||||
JNI_COCOA_EXIT(env);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2026, 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
|
||||
@ -26,8 +26,6 @@ package java.awt;
|
||||
|
||||
import java.awt.event.*;
|
||||
|
||||
import sun.awt.AppContext;
|
||||
|
||||
abstract class ModalEventFilter implements EventFilter {
|
||||
|
||||
protected Dialog modalDialog;
|
||||
@ -129,20 +127,14 @@ abstract class ModalEventFilter implements EventFilter {
|
||||
|
||||
private static class ToolkitModalEventFilter extends ModalEventFilter {
|
||||
|
||||
private AppContext appContext;
|
||||
|
||||
ToolkitModalEventFilter(Dialog modalDialog) {
|
||||
super(modalDialog);
|
||||
appContext = modalDialog.appContext;
|
||||
}
|
||||
|
||||
protected FilterAction acceptWindow(Window w) {
|
||||
if (w.isModalExcluded(Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
|
||||
return FilterAction.ACCEPT;
|
||||
}
|
||||
if (w.appContext != appContext) {
|
||||
return FilterAction.REJECT;
|
||||
}
|
||||
while (w != null) {
|
||||
if (w == modalDialog) {
|
||||
return FilterAction.ACCEPT_IMMEDIATELY;
|
||||
@ -155,27 +147,21 @@ abstract class ModalEventFilter implements EventFilter {
|
||||
|
||||
private static class ApplicationModalEventFilter extends ModalEventFilter {
|
||||
|
||||
private AppContext appContext;
|
||||
|
||||
ApplicationModalEventFilter(Dialog modalDialog) {
|
||||
super(modalDialog);
|
||||
appContext = modalDialog.appContext;
|
||||
}
|
||||
|
||||
protected FilterAction acceptWindow(Window w) {
|
||||
if (w.isModalExcluded(Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
|
||||
return FilterAction.ACCEPT;
|
||||
}
|
||||
if (w.appContext == appContext) {
|
||||
while (w != null) {
|
||||
if (w == modalDialog) {
|
||||
return FilterAction.ACCEPT_IMMEDIATELY;
|
||||
}
|
||||
w = w.getOwner();
|
||||
while (w != null) {
|
||||
if (w == modalDialog) {
|
||||
return FilterAction.ACCEPT_IMMEDIATELY;
|
||||
}
|
||||
return FilterAction.REJECT;
|
||||
w = w.getOwner();
|
||||
}
|
||||
return FilterAction.ACCEPT;
|
||||
return FilterAction.REJECT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -114,6 +114,7 @@ public final class Chromaticity extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code Chromaticity}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable;
|
||||
}
|
||||
@ -121,6 +122,7 @@ public final class Chromaticity extends EnumSyntax
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code Chromaticity}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return myEnumValueTable;
|
||||
}
|
||||
@ -135,6 +137,7 @@ public final class Chromaticity extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Chromaticity.class;
|
||||
}
|
||||
@ -148,6 +151,7 @@ public final class Chromaticity extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "chromaticity";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -104,6 +104,7 @@ public final class ColorSupported extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code ColorSupported}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable;
|
||||
}
|
||||
@ -111,6 +112,7 @@ public final class ColorSupported extends EnumSyntax
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code ColorSupported}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return myEnumValueTable;
|
||||
}
|
||||
@ -125,6 +127,7 @@ public final class ColorSupported extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return ColorSupported.class;
|
||||
}
|
||||
@ -138,6 +141,7 @@ public final class ColorSupported extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "color-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -106,6 +106,7 @@ public class Compression extends EnumSyntax implements DocAttribute {
|
||||
/**
|
||||
* Returns the string table for class {@code Compression}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable.clone();
|
||||
}
|
||||
@ -113,6 +114,7 @@ public class Compression extends EnumSyntax implements DocAttribute {
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code Compression}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return (EnumSyntax[])myEnumValueTable.clone();
|
||||
}
|
||||
@ -127,6 +129,7 @@ public class Compression extends EnumSyntax implements DocAttribute {
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Compression.class;
|
||||
}
|
||||
@ -140,6 +143,7 @@ public class Compression extends EnumSyntax implements DocAttribute {
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "compression";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -97,6 +97,7 @@ public final class Copies extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this copies
|
||||
* attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals (object) && object instanceof Copies;
|
||||
}
|
||||
@ -110,6 +111,7 @@ public final class Copies extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Copies.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class Copies extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "copies";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -105,6 +105,7 @@ public final class CopiesSupported extends SetOfIntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this copies
|
||||
* supported attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals (object) && object instanceof CopiesSupported;
|
||||
}
|
||||
@ -119,6 +120,7 @@ public final class CopiesSupported extends SetOfIntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return CopiesSupported.class;
|
||||
}
|
||||
@ -132,6 +134,7 @@ public final class CopiesSupported extends SetOfIntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "copies-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -88,6 +88,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this date-time at
|
||||
* completed attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return(super.equals (object) &&
|
||||
object instanceof DateTimeAtCompleted);
|
||||
@ -105,6 +106,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DateTimeAtCompleted.class;
|
||||
}
|
||||
@ -118,6 +120,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "date-time-at-completed";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -88,6 +88,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this date-time at
|
||||
* creation attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return(super.equals (object) &&
|
||||
object instanceof DateTimeAtCreation);
|
||||
@ -103,6 +104,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DateTimeAtCreation.class;
|
||||
}
|
||||
@ -116,6 +118,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "date-time-at-creation";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -89,6 +89,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this date-time at
|
||||
* processing attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return(super.equals (object) &&
|
||||
object instanceof DateTimeAtProcessing);
|
||||
@ -104,6 +105,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DateTimeAtProcessing.class;
|
||||
}
|
||||
@ -117,6 +119,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "date-time-at-processing";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -89,6 +89,7 @@ public final class Destination extends URISyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this destination
|
||||
* attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals(object) &&
|
||||
object instanceof Destination);
|
||||
@ -104,6 +105,7 @@ public final class Destination extends URISyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Destination.class;
|
||||
}
|
||||
@ -117,6 +119,7 @@ public final class Destination extends URISyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "spool-data-destination";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2026, 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
|
||||
@ -50,6 +50,7 @@ public final class DialogOwner implements PrintRequestAttribute {
|
||||
|
||||
private static class Accessor extends DialogOwnerAccessor {
|
||||
|
||||
@Override
|
||||
public long getOwnerID(DialogOwner owner) {
|
||||
return owner.getID();
|
||||
}
|
||||
@ -133,6 +134,7 @@ public final class DialogOwner implements PrintRequestAttribute {
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DialogOwner.class;
|
||||
}
|
||||
@ -145,6 +147,7 @@ public final class DialogOwner implements PrintRequestAttribute {
|
||||
* {@code "dialog-owner"}.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "dialog-owner";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2026, 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
|
||||
@ -98,6 +98,7 @@ public final class DialogTypeSelection extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code DialogTypeSelection}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable;
|
||||
}
|
||||
@ -106,6 +107,7 @@ public final class DialogTypeSelection extends EnumSyntax
|
||||
* Returns the enumeration value table for class
|
||||
* {@code DialogTypeSelection}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return myEnumValueTable;
|
||||
}
|
||||
@ -120,6 +122,7 @@ public final class DialogTypeSelection extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DialogTypeSelection.class;
|
||||
}
|
||||
@ -133,6 +136,7 @@ public final class DialogTypeSelection extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "dialog-type-selection";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -86,6 +86,7 @@ public final class DocumentName extends TextSyntax implements DocAttribute {
|
||||
* @return {@code true} if {@code object} is equivalent to this document
|
||||
* name attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) && object instanceof DocumentName);
|
||||
}
|
||||
@ -100,6 +101,7 @@ public final class DocumentName extends TextSyntax implements DocAttribute {
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return DocumentName.class;
|
||||
}
|
||||
@ -113,6 +115,7 @@ public final class DocumentName extends TextSyntax implements DocAttribute {
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "document-name";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -101,6 +101,7 @@ public final class Fidelity extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code Fidelity}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable;
|
||||
}
|
||||
@ -108,6 +109,7 @@ public final class Fidelity extends EnumSyntax
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code Fidelity}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return myEnumValueTable;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class Fidelity extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Fidelity.class;
|
||||
}
|
||||
@ -135,6 +138,7 @@ public final class Fidelity extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "ipp-attribute-fidelity";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -344,6 +344,7 @@ public class Finishings extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code Finishings}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable.clone();
|
||||
}
|
||||
@ -351,6 +352,7 @@ public class Finishings extends EnumSyntax
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code Finishings}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return (EnumSyntax[])myEnumValueTable.clone();
|
||||
}
|
||||
@ -358,6 +360,7 @@ public class Finishings extends EnumSyntax
|
||||
/**
|
||||
* Returns the lowest integer value used by class {@code Finishings}.
|
||||
*/
|
||||
@Override
|
||||
protected int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
@ -372,6 +375,7 @@ public class Finishings extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return Finishings.class;
|
||||
}
|
||||
@ -385,6 +389,7 @@ public class Finishings extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "finishings";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -123,6 +123,7 @@ public final class JobHoldUntil extends DateTimeSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job hold
|
||||
* until attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals(object) && object instanceof JobHoldUntil);
|
||||
}
|
||||
@ -137,6 +138,7 @@ public final class JobHoldUntil extends DateTimeSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobHoldUntil.class;
|
||||
}
|
||||
@ -150,6 +152,7 @@ public final class JobHoldUntil extends DateTimeSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-hold-until";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -110,6 +110,7 @@ public final class JobImpressions extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job
|
||||
* impressions attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals (object) && object instanceof JobImpressions;
|
||||
}
|
||||
@ -124,6 +125,7 @@ public final class JobImpressions extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobImpressions.class;
|
||||
}
|
||||
@ -137,6 +139,7 @@ public final class JobImpressions extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-impressions";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobImpressionsCompleted extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job
|
||||
* impressions completed attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return(super.equals (object) &&
|
||||
object instanceof JobImpressionsCompleted);
|
||||
@ -109,6 +110,7 @@ public final class JobImpressionsCompleted extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobImpressionsCompleted.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class JobImpressionsCompleted extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-impressions-completed";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job
|
||||
* impressions supported attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobImpressionsSupported);
|
||||
@ -109,6 +110,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobImpressionsSupported.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-impressions-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -159,6 +159,7 @@ public final class JobKOctets extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job K octets
|
||||
* attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals(object) && object instanceof JobKOctets;
|
||||
}
|
||||
@ -173,6 +174,7 @@ public final class JobKOctets extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobKOctets.class;
|
||||
}
|
||||
@ -186,6 +188,7 @@ public final class JobKOctets extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-k-octets";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -104,6 +104,7 @@ public final class JobKOctetsProcessed extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job K octets
|
||||
* processed attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return(super.equals (object) &&
|
||||
object instanceof JobKOctetsProcessed);
|
||||
@ -119,6 +120,7 @@ public final class JobKOctetsProcessed extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobKOctetsProcessed.class;
|
||||
}
|
||||
@ -132,6 +134,7 @@ public final class JobKOctetsProcessed extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-k-octets-processed";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -93,6 +93,7 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job K octets
|
||||
* supported attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobKOctetsSupported);
|
||||
@ -108,6 +109,7 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobKOctetsSupported.class;
|
||||
}
|
||||
@ -121,6 +123,7 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-k-octets-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -101,6 +101,7 @@ public class JobMediaSheets extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job media
|
||||
* sheets attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return super.equals(object) && object instanceof JobMediaSheets;
|
||||
}
|
||||
@ -115,6 +116,7 @@ public class JobMediaSheets extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobMediaSheets.class;
|
||||
}
|
||||
@ -128,6 +130,7 @@ public class JobMediaSheets extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-media-sheets";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job media
|
||||
* sheets completed attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobMediaSheetsCompleted);
|
||||
@ -109,6 +110,7 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobMediaSheetsCompleted.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-media-sheets-completed";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job media
|
||||
* sheets supported attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobMediaSheetsSupported);
|
||||
@ -109,6 +110,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobMediaSheetsSupported.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-media-sheets-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobMessageFromOperator extends TextSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job message
|
||||
* from operator attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobMessageFromOperator);
|
||||
@ -109,6 +110,7 @@ public final class JobMessageFromOperator extends TextSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobMessageFromOperator.class;
|
||||
}
|
||||
@ -122,6 +124,7 @@ public final class JobMessageFromOperator extends TextSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-message-from-operator";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -92,6 +92,7 @@ public final class JobName extends TextSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job name
|
||||
* attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals(object) && object instanceof JobName);
|
||||
}
|
||||
@ -105,6 +106,7 @@ public final class JobName extends TextSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobName.class;
|
||||
}
|
||||
@ -117,6 +119,7 @@ public final class JobName extends TextSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-name";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -91,6 +91,7 @@ public final class JobOriginatingUserName extends TextSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job
|
||||
* originating user name attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) &&
|
||||
object instanceof JobOriginatingUserName);
|
||||
@ -106,6 +107,7 @@ public final class JobOriginatingUserName extends TextSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobOriginatingUserName.class;
|
||||
}
|
||||
@ -119,6 +121,7 @@ public final class JobOriginatingUserName extends TextSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-originating-user-name";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -94,6 +94,7 @@ public final class JobPriority extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job priority
|
||||
* attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
return (super.equals (object) && object instanceof JobPriority);
|
||||
}
|
||||
@ -108,6 +109,7 @@ public final class JobPriority extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobPriority.class;
|
||||
}
|
||||
@ -121,6 +123,7 @@ public final class JobPriority extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-priority";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -86,6 +86,7 @@ public final class JobPrioritySupported extends IntegerSyntax
|
||||
* @return {@code true} if {@code object} is equivalent to this job priority
|
||||
* supported attribute, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean equals (Object object) {
|
||||
|
||||
return (super.equals(object) &&
|
||||
@ -102,6 +103,7 @@ public final class JobPrioritySupported extends IntegerSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobPrioritySupported.class;
|
||||
}
|
||||
@ -115,6 +117,7 @@ public final class JobPrioritySupported extends IntegerSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-priority-supported";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2026, 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
|
||||
@ -101,6 +101,7 @@ public class JobSheets extends EnumSyntax
|
||||
/**
|
||||
* Returns the string table for class {@code JobSheets}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable.clone();
|
||||
}
|
||||
@ -108,6 +109,7 @@ public class JobSheets extends EnumSyntax
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code JobSheets}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return (EnumSyntax[])myEnumValueTable.clone();
|
||||
}
|
||||
@ -122,6 +124,7 @@ public class JobSheets extends EnumSyntax
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobSheets.class;
|
||||
}
|
||||
@ -135,6 +138,7 @@ public class JobSheets extends EnumSyntax
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-sheets";
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user