mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-19 11:26:43 +00:00
Merge branch 'openjdk:master' into JDK-8368695
This commit is contained in:
commit
5f4e6b3f26
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;
|
||||
|
||||
@ -147,14 +147,14 @@ public:
|
||||
|
||||
// PLAB book-keeping.
|
||||
class PLABStats : public CHeapObj<mtGC> {
|
||||
protected:
|
||||
const char* _description; // Identifying string.
|
||||
|
||||
Atomic<size_t> _allocated; // Total allocated
|
||||
Atomic<size_t> _wasted; // of which wasted (internal fragmentation)
|
||||
Atomic<size_t> _undo_wasted; // of which wasted on undo (is not used for calculation of PLAB size)
|
||||
Atomic<size_t> _unused; // Unused in last buffer
|
||||
|
||||
protected:
|
||||
const char* _description; // Identifying string.
|
||||
|
||||
virtual void reset() {
|
||||
_allocated.store_relaxed(0);
|
||||
_wasted.store_relaxed(0);
|
||||
@ -164,11 +164,11 @@ protected:
|
||||
|
||||
public:
|
||||
PLABStats(const char* description) :
|
||||
_description(description),
|
||||
_allocated(0),
|
||||
_wasted(0),
|
||||
_undo_wasted(0),
|
||||
_unused(0)
|
||||
_unused(0),
|
||||
_description(description)
|
||||
{ }
|
||||
|
||||
virtual ~PLABStats() { }
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -583,7 +583,7 @@ void ShenandoahOldGeneration::handle_failed_evacuation() {
|
||||
|
||||
void ShenandoahOldGeneration::handle_failed_promotion(Thread* thread, size_t size) {
|
||||
_promotion_failure_count.add_then_fetch(1UL);
|
||||
_promotion_failure_words.and_then_fetch(size);
|
||||
_promotion_failure_words.add_then_fetch(size);
|
||||
|
||||
LogTarget(Debug, gc, plab) lt;
|
||||
LogStream ls(lt);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -310,8 +310,9 @@ void ConstantPool::iterate_archivable_resolved_references(Function function) {
|
||||
if (method_entries != nullptr) {
|
||||
for (int i = 0; i < method_entries->length(); i++) {
|
||||
ResolvedMethodEntry* rme = method_entries->adr_at(i);
|
||||
const char* rejection_reason = nullptr;
|
||||
if (rme->is_resolved(Bytecodes::_invokehandle) && rme->has_appendix() &&
|
||||
cache()->can_archive_resolved_method(this, rme)) {
|
||||
cache()->can_archive_resolved_method(this, rme, rejection_reason)) {
|
||||
int rr_index = rme->resolved_references_index();
|
||||
assert(resolved_reference_at(rr_index) != nullptr, "must exist");
|
||||
function(rr_index);
|
||||
|
||||
@ -450,12 +450,15 @@ void ConstantPoolCache::remove_resolved_field_entries_if_non_deterministic() {
|
||||
Symbol* klass_name = cp->klass_name_at(klass_cp_index);
|
||||
Symbol* name = cp->uncached_name_ref_at(cp_index);
|
||||
Symbol* signature = cp->uncached_signature_ref_at(cp_index);
|
||||
log.print("%s field CP entry [%3d]: %s => %s.%s:%s%s",
|
||||
(archived ? "archived" : "reverted"),
|
||||
cp_index,
|
||||
cp->pool_holder()->name()->as_C_string(),
|
||||
klass_name->as_C_string(), name->as_C_string(), signature->as_C_string(),
|
||||
rfi->is_resolved(Bytecodes::_getstatic) || rfi->is_resolved(Bytecodes::_putstatic) ? " *** static" : "");
|
||||
if (resolved) {
|
||||
log.print("%s field CP entry [%3d]: %s => %s.%s:%s%s%s",
|
||||
(archived ? "archived" : "reverted"),
|
||||
cp_index,
|
||||
cp->pool_holder()->name()->as_C_string(),
|
||||
klass_name->as_C_string(), name->as_C_string(), signature->as_C_string(),
|
||||
rfi->is_resolved(Bytecodes::_getstatic) || rfi->is_resolved(Bytecodes::_putstatic) ? " *** static" : "",
|
||||
(archived ? "" : " (resolution is not deterministic)"));
|
||||
}
|
||||
}
|
||||
ArchiveBuilder::alloc_stats()->record_field_cp_entry(archived, resolved && !archived);
|
||||
}
|
||||
@ -474,32 +477,40 @@ void ConstantPoolCache::remove_resolved_method_entries_if_non_deterministic() {
|
||||
rme->is_resolved(Bytecodes::_invokehandle) ||
|
||||
(rme->is_resolved(Bytecodes::_invokestatic) && VM_Version::supports_fast_class_init_checks());
|
||||
|
||||
const char* rejection_reason = nullptr;
|
||||
if (resolved && !CDSConfig::is_dumping_preimage_static_archive()
|
||||
&& can_archive_resolved_method(src_cp, rme)) {
|
||||
&& can_archive_resolved_method(src_cp, rme, rejection_reason)) {
|
||||
rme->mark_and_relocate(src_cp);
|
||||
archived = true;
|
||||
} else {
|
||||
rme->remove_unshareable_info();
|
||||
}
|
||||
LogStreamHandle(Trace, aot, resolve) log;
|
||||
if (log.is_enabled()) {
|
||||
LogTarget(Trace, aot, resolve) lt;
|
||||
if (lt.is_enabled()) {
|
||||
ResourceMark rm;
|
||||
int klass_cp_index = cp->uncached_klass_ref_index_at(cp_index);
|
||||
Symbol* klass_name = cp->klass_name_at(klass_cp_index);
|
||||
Symbol* name = cp->uncached_name_ref_at(cp_index);
|
||||
Symbol* signature = cp->uncached_signature_ref_at(cp_index);
|
||||
log.print("%s%s method CP entry [%3d]: %s %s.%s:%s",
|
||||
LogStream ls(lt);
|
||||
if (resolved) {
|
||||
ls.print("%s%s method CP entry [%3d]: %s %s.%s:%s",
|
||||
(archived ? "archived" : "reverted"),
|
||||
(rme->is_resolved(Bytecodes::_invokeinterface) ? " interface" : ""),
|
||||
cp_index,
|
||||
cp->pool_holder()->name()->as_C_string(),
|
||||
klass_name->as_C_string(), name->as_C_string(), signature->as_C_string());
|
||||
if (rejection_reason != nullptr) {
|
||||
ls.print(" %s", rejection_reason);
|
||||
}
|
||||
}
|
||||
if (archived) {
|
||||
Klass* resolved_klass = cp->resolved_klass_at(klass_cp_index);
|
||||
log.print(" => %s%s",
|
||||
ls.print(" => %s%s",
|
||||
resolved_klass->name()->as_C_string(),
|
||||
(rme->is_resolved(Bytecodes::_invokestatic) ? " *** static" : ""));
|
||||
}
|
||||
ls.cr();
|
||||
}
|
||||
ArchiveBuilder::alloc_stats()->record_method_cp_entry(archived, resolved && !archived);
|
||||
}
|
||||
@ -528,42 +539,50 @@ void ConstantPoolCache::remove_resolved_indy_entries_if_non_deterministic() {
|
||||
Symbol* bsm_name = cp->uncached_name_ref_at(bsm_ref);
|
||||
Symbol* bsm_signature = cp->uncached_signature_ref_at(bsm_ref);
|
||||
Symbol* bsm_klass = cp->klass_name_at(cp->uncached_klass_ref_index_at(bsm_ref));
|
||||
log.print("%s indy CP entry [%3d]: %s (%d)",
|
||||
(archived ? "archived" : "reverted"),
|
||||
cp_index, cp->pool_holder()->name()->as_C_string(), i);
|
||||
log.print(" %s %s.%s:%s", (archived ? "=>" : " "), bsm_klass->as_C_string(),
|
||||
bsm_name->as_C_string(), bsm_signature->as_C_string());
|
||||
if (resolved) {
|
||||
log.print("%s indy CP entry [%3d]: %s (%d)",
|
||||
(archived ? "archived" : "reverted"),
|
||||
cp_index, cp->pool_holder()->name()->as_C_string(), i);
|
||||
log.print(" %s %s.%s:%s%s", (archived ? "=>" : " "), bsm_klass->as_C_string(),
|
||||
bsm_name->as_C_string(), bsm_signature->as_C_string(),
|
||||
(archived ? "" : " (resolution is not deterministic)"));
|
||||
}
|
||||
}
|
||||
ArchiveBuilder::alloc_stats()->record_indy_cp_entry(archived, resolved && !archived);
|
||||
}
|
||||
}
|
||||
|
||||
bool ConstantPoolCache::can_archive_resolved_method(ConstantPool* src_cp, ResolvedMethodEntry* method_entry) {
|
||||
LogStreamHandle(Trace, aot, resolve) log;
|
||||
bool ConstantPoolCache::can_archive_resolved_method(ConstantPool* src_cp, ResolvedMethodEntry* method_entry, const char*& rejection_reason) {
|
||||
InstanceKlass* pool_holder = constant_pool()->pool_holder();
|
||||
if (pool_holder->defined_by_other_loaders()) {
|
||||
// Archiving resolved cp entries for classes from non-builtin loaders
|
||||
// is not yet supported.
|
||||
rejection_reason = "(pool holder comes from a non-builtin loader)";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (CDSConfig::is_dumping_dynamic_archive()) {
|
||||
// InstanceKlass::methods() has been resorted. We need to
|
||||
// update the vtable_index in method_entry (not implemented)
|
||||
rejection_reason = "(InstanceKlass::methods() has been resorted)";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!method_entry->is_resolved(Bytecodes::_invokevirtual)) {
|
||||
if (method_entry->method() == nullptr) {
|
||||
rejection_reason = "(method entry is not resolved)";
|
||||
return false;
|
||||
}
|
||||
if (method_entry->method()->is_continuation_native_intrinsic()) {
|
||||
rejection_reason = "(corresponding stub is generated on demand during method resolution)";
|
||||
return false; // FIXME: corresponding stub is generated on demand during method resolution (see LinkResolver::resolve_static_call).
|
||||
}
|
||||
if (method_entry->is_resolved(Bytecodes::_invokehandle) && !CDSConfig::is_dumping_method_handles()) {
|
||||
rejection_reason = "(not dumping method handles)";
|
||||
return false;
|
||||
}
|
||||
if (method_entry->method()->is_method_handle_intrinsic() && !CDSConfig::is_dumping_method_handles()) {
|
||||
rejection_reason = "(not dumping intrinsic method handles)";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -572,6 +591,7 @@ bool ConstantPoolCache::can_archive_resolved_method(ConstantPool* src_cp, Resolv
|
||||
assert(src_cp->tag_at(cp_index).is_method() || src_cp->tag_at(cp_index).is_interface_method(), "sanity");
|
||||
|
||||
if (!AOTConstantPoolResolver::is_resolution_deterministic(src_cp, cp_index)) {
|
||||
rejection_reason = "(resolution is not deterministic)";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -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
|
||||
@ -226,7 +226,7 @@ class ConstantPoolCache: public MetaspaceObj {
|
||||
void remove_resolved_field_entries_if_non_deterministic();
|
||||
void remove_resolved_indy_entries_if_non_deterministic();
|
||||
void remove_resolved_method_entries_if_non_deterministic();
|
||||
bool can_archive_resolved_method(ConstantPool* src_cp, ResolvedMethodEntry* method_entry);
|
||||
bool can_archive_resolved_method(ConstantPool* src_cp, ResolvedMethodEntry* method_entry, const char*& rejection_reason);
|
||||
#endif
|
||||
|
||||
// RedefineClasses support
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1177,7 +1177,21 @@ bool GraphKit::compute_stack_effects(int& inputs, int& depth) {
|
||||
//------------------------------basic_plus_adr---------------------------------
|
||||
Node* GraphKit::basic_plus_adr(Node* base, Node* ptr, Node* offset) {
|
||||
// short-circuit a common case
|
||||
if (offset == intcon(0)) return ptr;
|
||||
if (offset == MakeConX(0)) {
|
||||
return ptr;
|
||||
}
|
||||
#ifdef ASSERT
|
||||
// Both 32-bit and 64-bit zeros should have been handled by the previous `if`
|
||||
// statement, so if we see either 32-bit or 64-bit zeros here, then we have a
|
||||
// problem.
|
||||
if (offset->is_Con()) {
|
||||
const Type* t = offset->bottom_type();
|
||||
bool is_zero_int = t->isa_int() && t->is_int()->get_con() == 0;
|
||||
bool is_zero_long = t->isa_long() && t->is_long()->get_con() == 0;
|
||||
assert(!is_zero_int && !is_zero_long,
|
||||
"Unexpected zero offset - should have matched MakeConX(0)");
|
||||
}
|
||||
#endif
|
||||
return _gvn.transform( new AddPNode(base, ptr, offset) );
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -564,6 +564,9 @@ public:
|
||||
const Type* bottom_type() const { return Type::HALF_FLOAT; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
private:
|
||||
virtual bool depends_only_on_test_impl() const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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) 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) 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";
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -206,6 +206,7 @@ public class JobState extends EnumSyntax implements PrintJobAttribute {
|
||||
/**
|
||||
* Returns the string table for class {@code JobState}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable;
|
||||
}
|
||||
@ -213,6 +214,7 @@ public class JobState extends EnumSyntax implements PrintJobAttribute {
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code JobState}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return myEnumValueTable;
|
||||
}
|
||||
@ -227,6 +229,7 @@ public class JobState extends EnumSyntax implements PrintJobAttribute {
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobState.class;
|
||||
}
|
||||
@ -240,6 +243,7 @@ public class JobState extends EnumSyntax implements PrintJobAttribute {
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-state";
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
@ -436,6 +436,7 @@ public class JobStateReason extends EnumSyntax implements Attribute {
|
||||
/**
|
||||
* Returns the string table for class {@code JobStateReason}.
|
||||
*/
|
||||
@Override
|
||||
protected String[] getStringTable() {
|
||||
return myStringTable.clone();
|
||||
}
|
||||
@ -443,6 +444,7 @@ public class JobStateReason extends EnumSyntax implements Attribute {
|
||||
/**
|
||||
* Returns the enumeration value table for class {@code JobStateReason}.
|
||||
*/
|
||||
@Override
|
||||
protected EnumSyntax[] getEnumValueTable() {
|
||||
return (EnumSyntax[])myEnumValueTable.clone();
|
||||
}
|
||||
@ -457,6 +459,7 @@ public class JobStateReason extends EnumSyntax implements Attribute {
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobStateReason.class;
|
||||
}
|
||||
@ -470,6 +473,7 @@ public class JobStateReason extends EnumSyntax implements Attribute {
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-state-reason";
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -140,6 +140,7 @@ public final class JobStateReasons
|
||||
* class {@link JobStateReason JobStateReason}
|
||||
* @since 1.5
|
||||
*/
|
||||
@Override
|
||||
public boolean add(JobStateReason o) {
|
||||
if (o == null) {
|
||||
throw new NullPointerException();
|
||||
@ -157,6 +158,7 @@ public final class JobStateReasons
|
||||
* @return printing attribute class (category), an instance of class
|
||||
* {@link Class java.lang.Class}
|
||||
*/
|
||||
@Override
|
||||
public final Class<? extends Attribute> getCategory() {
|
||||
return JobStateReasons.class;
|
||||
}
|
||||
@ -170,6 +172,7 @@ public final class JobStateReasons
|
||||
*
|
||||
* @return attribute category name
|
||||
*/
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "job-state-reasons";
|
||||
}
|
||||
|
||||
@ -53,8 +53,6 @@ import javax.accessibility.AccessibleRole;
|
||||
import javax.accessibility.AccessibleState;
|
||||
import javax.accessibility.AccessibleStateSet;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
|
||||
/**
|
||||
* An implementation of the Icon interface that paints Icons
|
||||
* from Images. Images that are created from a URL, filename or byte array
|
||||
|
||||
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