diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp index 28a0cc2c7d940..7bd4f119e9163 100644 --- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp @@ -183,7 +183,6 @@ class Instruction_aarch64 { inline ~Instruction_aarch64(); - unsigned &get_insn() { return insn; } #ifdef ASSERT unsigned &get_bits() { return bits; } #endif @@ -2998,15 +2997,6 @@ template _xshll(/* is_unsigned */ false, Vd, Ta, Vn, Tb, shift); } - void sshll2(FloatRegister Vd, SIMD_Arrangement Ta, FloatRegister Vn, SIMD_Arrangement Tb, int shift) { - assert(Tb == T16B || Tb == T8H || Tb == T4S, "invalid arrangement"); - _xshll(/* is_unsigned */ false, Vd, Ta, Vn, Tb, shift); - } - - void sxtl(FloatRegister Vd, SIMD_Arrangement Ta, FloatRegister Vn, SIMD_Arrangement Tb) { - sshll(Vd, Ta, Vn, Tb, 0); - } - // Move from general purpose register // mov Vd.T[index], Rn void mov(FloatRegister Vd, SIMD_RegVariant T, int index, Register Xn) { @@ -3044,15 +3034,6 @@ template _pmull(Vd, Ta, Vn, Vm, Tb); } - void uqxtn(FloatRegister Vd, SIMD_Arrangement Tb, FloatRegister Vn, SIMD_Arrangement Ta) { - starti; - int size_b = (int)Tb >> 1; - int size_a = (int)Ta >> 1; - assert(size_b < 3 && size_b == size_a - 1, "Invalid size specifier"); - f(0, 31), f(Tb & 1, 30), f(0b101110, 29, 24), f(size_b, 23, 22); - f(0b100001010010, 21, 10), rf(Vn, 5), rf(Vd, 0); - } - void xtn(FloatRegister Vd, SIMD_Arrangement Tb, FloatRegister Vn, SIMD_Arrangement Ta) { starti; int size_b = (int)Tb >> 1; diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp index 7b7ecf49c8c34..dd1a858334cd4 100644 --- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp @@ -227,7 +227,6 @@ class MacroAssembler: public Assembler { } } - inline void moviw(Register Rd, unsigned imm) { orrw(Rd, zr, imm); } inline void movi(Register Rd, unsigned imm) { orr(Rd, zr, imm); } inline void tstw(Register Rd, Register Rn) { andsw(zr, Rd, Rn); } @@ -243,23 +242,10 @@ class MacroAssembler: public Assembler { bfm(Rd, Rn, ((64 - lsb) & 63), (width - 1)); } - inline void bfxilw(Register Rd, Register Rn, unsigned lsb, unsigned width) { - bfmw(Rd, Rn, lsb, (lsb + width - 1)); - } - inline void bfxil(Register Rd, Register Rn, unsigned lsb, unsigned width) { - bfm(Rd, Rn, lsb , (lsb + width - 1)); - } - - inline void sbfizw(Register Rd, Register Rn, unsigned lsb, unsigned width) { - sbfmw(Rd, Rn, ((32 - lsb) & 31), (width - 1)); - } inline void sbfiz(Register Rd, Register Rn, unsigned lsb, unsigned width) { sbfm(Rd, Rn, ((64 - lsb) & 63), (width - 1)); } - inline void sbfxw(Register Rd, Register Rn, unsigned lsb, unsigned width) { - sbfmw(Rd, Rn, lsb, (lsb + width - 1)); - } inline void sbfx(Register Rd, Register Rn, unsigned lsb, unsigned width) { sbfm(Rd, Rn, lsb , (lsb + width - 1)); } @@ -423,9 +409,6 @@ class MacroAssembler: public Assembler { smaddl(Rd, Rn, Rm, zr); } - inline void umnegl(Register Rd, Register Rn, Register Rm) { - umsubl(Rd, Rn, Rm, zr); - } inline void umull(Register Rd, Register Rn, Register Rm) { umaddl(Rd, Rn, Rm, zr); } @@ -571,11 +554,6 @@ class MacroAssembler: public Assembler { mrs(0b11, 0b0100, 0b0100, 0b001, reg); } - inline void set_fpsr(Register reg) - { - msr(0b011, 0b0100, 0b0100, 0b001, reg); - } - inline void clear_fpsr() { msr(0b011, 0b0100, 0b0100, 0b001, zr); @@ -594,24 +572,6 @@ class MacroAssembler: public Assembler { msr(0b011, 0b0100, 0b0100, 0b000, reg); } - // DCZID_EL0: op1 == 011 - // CRn == 0000 - // CRm == 0000 - // op2 == 111 - inline void get_dczid_el0(Register reg) - { - mrs(0b011, 0b0000, 0b0000, 0b111, reg); - } - - // CTR_EL0: op1 == 011 - // CRn == 0000 - // CRm == 0000 - // op2 == 001 - inline void get_ctr_el0(Register reg) - { - mrs(0b011, 0b0000, 0b0000, 0b001, reg); - } - inline void get_nzcv(Register reg) { mrs(0b011, 0b0100, 0b0010, 0b000, reg); } diff --git a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp index f6cac72804f2c..5c49ab2548706 100644 --- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp @@ -148,9 +148,6 @@ enum Ampere_CPU_Model { static int cpu_family() { return _cpu; } static int cpu_model() { return _model; } - static int cpu_model2() { return _model2; } - static int cpu_variant() { return _variant; } - static int cpu_revision() { return _revision; } static bool model_is(int cpu_model) { return _model == cpu_model || _model2 == cpu_model; diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp b/src/hotspot/cpu/arm/assembler_arm_32.hpp index dd04ad1ab3a3c..c27de0bf01183 100644 --- a/src/hotspot/cpu/arm/assembler_arm_32.hpp +++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp @@ -317,11 +317,6 @@ class Assembler : public AbstractAssembler { rn->encoding() << 12 | rs->encoding() << 8 | 0x9 << 4 | rm->encoding()); } - void mlas(Register rd, Register rm, Register rs, Register rn, AsmCondition cond = al) { - emit_int32(cond << 28 | 1 << 21 | 1 << 20 | rd->encoding() << 16 | - rn->encoding() << 12 | rs->encoding() << 8 | 0x9 << 4 | rm->encoding()); - } - // Loads and stores #define F(mnemonic, l, b) \ @@ -584,11 +579,6 @@ class Assembler : public AbstractAssembler { F(bl, 0xb) #undef F - void udf(int imm_16) { - assert((imm_16 >> 16) == 0, "encoding constraint"); - emit_int32(0xe7f000f0 | (imm_16 & 0xfff0) << 8 | (imm_16 & 0xf)); - } - // ARMv7 instructions #define F(mnemonic, wt) \ diff --git a/src/hotspot/cpu/arm/interp_masm_arm.hpp b/src/hotspot/cpu/arm/interp_masm_arm.hpp index 58eeda6fbbbf2..68afe759215c6 100644 --- a/src/hotspot/cpu/arm/interp_masm_arm.hpp +++ b/src/hotspot/cpu/arm/interp_masm_arm.hpp @@ -66,7 +66,6 @@ class InterpreterMacroAssembler: public MacroAssembler { inline void check_stack_top() {} inline void check_stack_top_on_expansion() {} inline void check_extended_sp(Register tmp) {} - inline void check_no_cached_stack_top(Register tmp) {} void save_bcp() { str(Rbcp, Address(FP, frame::interpreter_frame_bcp_offset * wordSize)); } void restore_bcp() { ldr(Rbcp, Address(FP, frame::interpreter_frame_bcp_offset * wordSize)); } diff --git a/src/hotspot/cpu/arm/macroAssembler_arm.hpp b/src/hotspot/cpu/arm/macroAssembler_arm.hpp index 691c8fa70ee8b..a309634622550 100644 --- a/src/hotspot/cpu/arm/macroAssembler_arm.hpp +++ b/src/hotspot/cpu/arm/macroAssembler_arm.hpp @@ -440,15 +440,6 @@ class MacroAssembler: public Assembler { void should_not_reach_here() { stop("should not reach here"); } static void debug(const char* msg, const intx* registers); - // Create a walkable frame to help tracking down who called this code. - // Returns the frame size in words. - int should_not_call_this() { - raw_push(FP, LR); - should_not_reach_here(); - flush(); - return 2; // frame_size_in_words (FP+LR) - } - int save_all_registers(); void restore_all_registers(); int save_caller_save_registers(); @@ -756,10 +747,6 @@ class MacroAssembler: public Assembler { mov(dst, AsmOperand(src, lsr, shift)); } - void arith_shift_right(Register dst, Register src, int shift) { - mov(dst, AsmOperand(src, asr, shift)); - } - void asr_32(Register dst, Register src, int shift) { mov(dst, AsmOperand(src, asr, shift)); } diff --git a/src/hotspot/cpu/arm/nativeInst_arm_32.hpp b/src/hotspot/cpu/arm/nativeInst_arm_32.hpp index 15b57188730df..64702d4f09bc5 100644 --- a/src/hotspot/cpu/arm/nativeInst_arm_32.hpp +++ b/src/hotspot/cpu/arm/nativeInst_arm_32.hpp @@ -65,14 +65,6 @@ class RawNativeInstruction { // permanently undefined (UDF): 0xe << 28 | 0b1111111 << 20 | 0b1111 << 4 static const int not_entrant_illegal_instruction = 0xe7f000f0; - static int decode_rotated_imm12(int encoding) { - int base = encoding & 0xff; - int right_rotation = (encoding & 0xf00) >> 7; - int left_rotation = 32 - right_rotation; - int val = (base >> right_rotation) | (base << left_rotation); - return val; - } - address addr_at(int offset) const { return (address)this + offset; } address instruction_address() const { return addr_at(0); } address next_raw_instruction_address() const { return addr_at(instruction_size); } @@ -106,17 +98,12 @@ class RawNativeInstruction { bool is_b() const { return (encoding() & 0x0f000000) == 0x0a000000; } bool is_bx() const { return (encoding() & 0x0ffffff0) == 0x012fff10; } bool is_bl() const { return (encoding() & 0x0f000000) == 0x0b000000; } - bool is_blx() const { return (encoding() & 0x0ffffff0) == 0x012fff30; } bool is_fat_call() const { return (is_add_lr() && next_raw()->is_jump()); } - bool is_ldr_call() const { - return (is_add_lr() && next_raw()->is_ldr_pc()); - } bool is_jump() const { return is_b() || is_ldr_pc(); } bool is_call() const { return is_bl() || is_fat_call(); } bool is_branch() const { return is_b() || is_bl(); } - bool is_far_branch() const { return is_movw() || is_ldr_literal(); } bool is_ldr_literal() const { // ldr Rx, [PC, #offset] for positive or negative offsets return (encoding() & 0x0f7f0000) == 0x051f0000; @@ -145,7 +132,6 @@ class RawNativeInstruction { bool is_sub_pc() const { return (encoding() & 0x0fff0000) == 0x024f0000; } bool is_pc_rel() const { return is_add_pc() || is_sub_pc(); } bool is_movw() const { return (encoding() & 0x0ff00000) == 0x03000000; } - bool is_movt() const { return (encoding() & 0x0ff00000) == 0x03400000; } // c2 doesn't use fixed registers for safepoint poll address bool is_safepoint_poll() const { return (encoding() & 0xfff0ffff) == 0xe590c000; } }; diff --git a/src/hotspot/cpu/arm/vm_version_arm.hpp b/src/hotspot/cpu/arm/vm_version_arm.hpp index 11c89da200538..6ef724ab22af4 100644 --- a/src/hotspot/cpu/arm/vm_version_arm.hpp +++ b/src/hotspot/cpu/arm/vm_version_arm.hpp @@ -102,8 +102,6 @@ class VM_Version: public Abstract_VM_Version { static bool simd_math_is_compliant() { return false; } - static bool prefer_moves_over_load_literal() { return supports_movw(); } - friend class VM_Version_StubGenerator; static void initialize_cpu_information(void); diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp index 61a5d6425eec6..b0f6e75a37061 100644 --- a/src/hotspot/cpu/ppc/assembler_ppc.hpp +++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp @@ -1028,11 +1028,6 @@ class Assembler : public AbstractAssembler { "value out of range"); } - static void assert_signed_word_disp_range(intptr_t x, int nbits) { - assert((x & 3) == 0, "not word aligned"); - assert_signed_range(x, nbits + 2); - } - static void assert_unsigned_const(int x, int nbits) { assert(juint(x) < juint(1 << nbits), "unsigned constant out of range"); } @@ -1107,20 +1102,6 @@ class Assembler : public AbstractAssembler { static int inv_bo_field(int x) { return inv_opp_u_field(x, 10, 6); } static int inv_bi_field(int x) { return inv_opp_u_field(x, 15, 11); } - // For extended opcodes (prefixed instructions) introduced with Power 10 - static long inv_r_eo( int x) { return inv_opp_u_field(x, 11, 11); } - static long inv_type( int x) { return inv_opp_u_field(x, 7, 6); } - static long inv_st_x0( int x) { return inv_opp_u_field(x, 8, 8); } - static long inv_st_x1( int x) { return inv_opp_u_field(x, 11, 8); } - - // - 8LS:D/MLS:D Formats - static long inv_d0_eo( long x) { return inv_opp_u_field(x, 31, 14); } - - // - 8RR:XX4/8RR:D Formats - static long inv_imm0_eo(int x) { return inv_opp_u_field(x, 31, 16); } - static long inv_uimm_eo(int x) { return inv_opp_u_field(x, 31, 29); } - static long inv_imm_eo( int x) { return inv_opp_u_field(x, 31, 24); } - #define opp_u_field(x, hi_bit, lo_bit) u_field(x, 31-(lo_bit), 31-(hi_bit)) #define opp_s_field(x, hi_bit, lo_bit) s_field(x, 31-(lo_bit), 31-(hi_bit)) @@ -1142,7 +1123,6 @@ class Assembler : public AbstractAssembler { static int d1( int x) { return opp_s_field(x, 31, 16); } static int ds( int x) { assert((x & 0x3) == 0, "unaligned offset"); return opp_s_field(x, 31, 16); } static int eh( int x) { return opp_u_field(x, 31, 31); } - static int flm( int x) { return opp_u_field(x, 14, 7); } static int fra( FloatRegister r) { return fra(r->encoding());} static int frb( FloatRegister r) { return frb(r->encoding());} static int frc( FloatRegister r) { return frc(r->encoding());} @@ -1245,29 +1225,14 @@ class Assembler : public AbstractAssembler { // For extended opcodes (prefixed instructions) introduced with Power 10 static long r_eo( int x) { return opp_u_field(x, 11, 11); } static long type( int x) { return opp_u_field(x, 7, 6); } - static long st_x0( int x) { return opp_u_field(x, 8, 8); } - static long st_x1( int x) { return opp_u_field(x, 11, 8); } // - 8LS:D/MLS:D Formats static long d0_eo( long x) { return opp_u_field((x >> 16) & 0x3FFFF, 31, 14); } static long d1_eo( long x) { return opp_u_field(x & 0xFFFF, 31, 16); } - static long s0_eo( long x) { return d0_eo(x); } - static long s1_eo( long x) { return d1_eo(x); } // - 8RR:XX4/8RR:D Formats - static long imm0_eo( int x) { return opp_u_field(x >> 16, 31, 16); } - static long imm1_eo( int x) { return opp_u_field(x & 0xFFFF, 31, 16); } - static long uimm_eo( int x) { return opp_u_field(x, 31, 29); } static long imm_eo( int x) { return opp_u_field(x, 31, 24); } - //static int xo1( int x) { return opp_u_field(x, 29, 21); }// is contained in our opcodes - //static int xo2( int x) { return opp_u_field(x, 30, 21); }// is contained in our opcodes - //static int xo3( int x) { return opp_u_field(x, 30, 22); }// is contained in our opcodes - //static int xo4( int x) { return opp_u_field(x, 30, 26); }// is contained in our opcodes - //static int xo5( int x) { return opp_u_field(x, 29, 27); }// is contained in our opcodes - //static int xo6( int x) { return opp_u_field(x, 30, 27); }// is contained in our opcodes - //static int xo7( int x) { return opp_u_field(x, 31, 30); }// is contained in our opcodes - protected: // Compute relative address for branch. static intptr_t disp(intptr_t x, intptr_t off) { @@ -1300,9 +1265,6 @@ class Assembler : public AbstractAssembler { return (short)((int *)a)[instruction_number]; } - static inline int hi16_signed( int x) { return (int)(int16_t)(x >> 16); } - static inline int lo16_unsigned(int x) { return x & 0xffff; } - protected: // Extract the top 32 bits in a 64 bit word. @@ -1475,9 +1437,6 @@ class Assembler : public AbstractAssembler { static bool is_bcxx(int x) { return BCXX_OPCODE == (x & BCXX_OPCODE_MASK); } - static bool is_bxx_or_bcxx(int x) { - return is_bxx(x) || is_bcxx(x); - } static bool is_bctrl(int x) { return x == 0x4e800421; } @@ -1508,24 +1467,12 @@ class Assembler : public AbstractAssembler { static bool is_stdu(int x) { return STDU_OPCODE == (x & STDU_OPCODE_MASK); } - static bool is_stdx(int x) { - return STDX_OPCODE == (x & STDX_OPCODE_MASK); - } static bool is_stdux(int x) { return STDUX_OPCODE == (x & STDUX_OPCODE_MASK); } - static bool is_stwx(int x) { - return STWX_OPCODE == (x & STWX_OPCODE_MASK); - } - static bool is_stwux(int x) { - return STWUX_OPCODE == (x & STWUX_OPCODE_MASK); - } static bool is_stw(int x) { return STW_OPCODE == (x & STW_OPCODE_MASK); } - static bool is_stwu(int x) { - return STWU_OPCODE == (x & STWU_OPCODE_MASK); - } static bool is_ori(int x) { return ORI_OPCODE == (x & ORI_OPCODE_MASK); }; diff --git a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp index ad8b76ba667a4..149293357bd3c 100644 --- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp +++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp @@ -622,93 +622,6 @@ class StubGenerator: public StubCodeGenerator { #undef __ #define __ _masm-> - - // Support for void zero_words_aligned8(HeapWord* to, size_t count) - // - // Arguments: - // to: - // count: - // - // Destroys: - // - address generate_zero_words_aligned8() { - StubCodeMark mark(this, "StubRoutines", "zero_words_aligned8"); - - // Implemented as in ClearArray. - address start = __ function_entry(); - - Register base_ptr_reg = R3_ARG1; // tohw (needs to be 8b aligned) - Register cnt_dwords_reg = R4_ARG2; // count (in dwords) - Register tmp1_reg = R5_ARG3; - Register tmp2_reg = R6_ARG4; - Register zero_reg = R7_ARG5; - - // Procedure for large arrays (uses data cache block zero instruction). - Label dwloop, fast, fastloop, restloop, lastdword, done; - int cl_size = VM_Version::L1_data_cache_line_size(); - int cl_dwords = cl_size >> 3; - int cl_dwordaddr_bits = exact_log2(cl_dwords); - int min_dcbz = 2; // Needs to be positive, apply dcbz only to at least min_dcbz cache lines. - - // Clear up to 128byte boundary if long enough, dword_cnt=(16-(base>>3))%16. - __ dcbtst(base_ptr_reg); // Indicate write access to first cache line ... - __ andi(tmp2_reg, cnt_dwords_reg, 1); // to check if number of dwords is even. - __ srdi_(tmp1_reg, cnt_dwords_reg, 1); // number of double dwords - __ load_const_optimized(zero_reg, 0L); // Use as zero register. - - __ cmpdi(CCR1, tmp2_reg, 0); // cnt_dwords even? - __ beq(CCR0, lastdword); // size <= 1 - __ mtctr(tmp1_reg); // Speculatively preload counter for rest loop (>0). - __ cmpdi(CCR0, cnt_dwords_reg, (min_dcbz+1)*cl_dwords-1); // Big enough to ensure >=min_dcbz cache lines are included? - __ neg(tmp1_reg, base_ptr_reg); // bit 0..58: bogus, bit 57..60: (16-(base>>3))%16, bit 61..63: 000 - - __ blt(CCR0, restloop); // Too small. (<31=(2*cl_dwords)-1 is sufficient, but bigger performs better.) - __ rldicl_(tmp1_reg, tmp1_reg, 64-3, 64-cl_dwordaddr_bits); // Extract number of dwords to 128byte boundary=(16-(base>>3))%16. - - __ beq(CCR0, fast); // already 128byte aligned - __ mtctr(tmp1_reg); // Set ctr to hit 128byte boundary (00 since size>=256-8) - - // Clear in first cache line dword-by-dword if not already 128byte aligned. - __ bind(dwloop); - __ std(zero_reg, 0, base_ptr_reg); // Clear 8byte aligned block. - __ addi(base_ptr_reg, base_ptr_reg, 8); - __ bdnz(dwloop); - - // clear 128byte blocks - __ bind(fast); - __ srdi(tmp1_reg, cnt_dwords_reg, cl_dwordaddr_bits); // loop count for 128byte loop (>0 since size>=256-8) - __ andi(tmp2_reg, cnt_dwords_reg, 1); // to check if rest even - - __ mtctr(tmp1_reg); // load counter - __ cmpdi(CCR1, tmp2_reg, 0); // rest even? - __ rldicl_(tmp1_reg, cnt_dwords_reg, 63, 65-cl_dwordaddr_bits); // rest in double dwords - - __ bind(fastloop); - __ dcbz(base_ptr_reg); // Clear 128byte aligned block. - __ addi(base_ptr_reg, base_ptr_reg, cl_size); - __ bdnz(fastloop); - - //__ dcbtst(base_ptr_reg); // Indicate write access to last cache line. - __ beq(CCR0, lastdword); // rest<=1 - __ mtctr(tmp1_reg); // load counter - - // Clear rest. - __ bind(restloop); - __ std(zero_reg, 0, base_ptr_reg); // Clear 8byte aligned block. - __ std(zero_reg, 8, base_ptr_reg); // Clear 8byte aligned block. - __ addi(base_ptr_reg, base_ptr_reg, 16); - __ bdnz(restloop); - - __ bind(lastdword); - __ beq(CCR1, done); - __ std(zero_reg, 0, base_ptr_reg); - __ bind(done); - __ blr(); // return - - return start; - } - #if !defined(PRODUCT) // Wrapper which calls oopDesc::is_oop_or_null() // Only called by MacroAssembler::verify_oop diff --git a/src/hotspot/cpu/riscv/assembler_riscv.hpp b/src/hotspot/cpu/riscv/assembler_riscv.hpp index 616aee82b996a..e92e405356fb3 100644 --- a/src/hotspot/cpu/riscv/assembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/assembler_riscv.hpp @@ -3111,7 +3111,6 @@ enum Nf { void lh(Register Rd_Rs2, Register Rs1, const int32_t uimm) { lh_c_mux(Rd_Rs2, Rs1, uimm); } // Prerequisites: Zcb - void c_lhu(Register Rd_Rs2, Register Rs1, const int32_t uimm) { c_lh_if(Rd_Rs2, Rs1, uimm); } void lhu(Register Rd_Rs2, Register Rs1, const int32_t uimm) { lh_c_mux(Rd_Rs2, Rs1, uimm); } // Prerequisites: Zcb diff --git a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp index 4e9a41625ad46..993abcad22c56 100644 --- a/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp +++ b/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp @@ -508,14 +508,6 @@ class MacroAssembler: public Assembler { sltu(Rd, x0, Rs); } - inline void sltz(Register Rd, Register Rs) { - slt(Rd, Rs, x0); - } - - inline void sgtz(Register Rd, Register Rs) { - slt(Rd, x0, Rs); - } - // Bit-manipulation extension pseudo instructions // zero extend word inline void zext_w(Register Rd, Register Rs) { @@ -1413,21 +1405,6 @@ class MacroAssembler: public Assembler { vmfle_vv(vd, vs1, vs2, vm); } - inline void vmsltu_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { - guarantee(imm >= 1 && imm <= 16, "imm is invalid"); - vmsleu_vi(Vd, Vs2, imm-1, vm); - } - - inline void vmsgeu_vi(VectorRegister Vd, VectorRegister Vs2, uint32_t imm, VectorMask vm = unmasked) { - guarantee(imm >= 1 && imm <= 16, "imm is invalid"); - vmsgtu_vi(Vd, Vs2, imm-1, vm); - } - - // Copy mask register - inline void vmmv_m(VectorRegister vd, VectorRegister vs) { - vmand_mm(vd, vs, vs); - } - // Clear mask register inline void vmclr_m(VectorRegister vd) { vmxor_mm(vd, vd, vd); @@ -1438,10 +1415,6 @@ class MacroAssembler: public Assembler { vmxnor_mm(vd, vd, vd); } - inline void vnot_v(VectorRegister Vd, VectorRegister Vs, VectorMask vm = unmasked) { - vxor_vi(Vd, Vs, -1, vm); - } - static const int zero_words_block_size; void cast_primitive_type(BasicType type, Register Rt) { diff --git a/src/hotspot/cpu/s390/assembler_s390.hpp b/src/hotspot/cpu/s390/assembler_s390.hpp index cf80d164fafe6..f4a9e4c28eb0f 100644 --- a/src/hotspot/cpu/s390/assembler_s390.hpp +++ b/src/hotspot/cpu/s390/assembler_s390.hpp @@ -401,19 +401,6 @@ class Argument { // Locating register-based arguments: bool is_register() const { return _number < n_register_parameters; } - // Locating Floating Point register-based arguments: - bool is_float_register() const { return _number < n_float_register_parameters; } - - FloatRegister as_float_register() const { - assert(is_float_register(), "must be a register argument"); - return as_FloatRegister((number() *2) + 1); - } - - FloatRegister as_double_register() const { - assert(is_float_register(), "must be a register argument"); - return as_FloatRegister((number() *2)); - } - Register as_register() const { assert(is_register(), "must be a register argument"); return as_Register(number() + Z_ARG1->encoding()); @@ -1534,12 +1521,6 @@ class Assembler : public AbstractAssembler { // Longest instructions are 6 bytes on z/Architecture. static unsigned int instr_maxlen() { return 6; } - // Average instruction is 4 bytes on z/Architecture (just a guess). - static unsigned int instr_avglen() { return 4; } - - // Shortest instructions are 2 bytes on z/Architecture. - static unsigned int instr_minlen() { return 2; } - // Move instruction at pc right-justified into passed long int. // Return instr len in bytes as function result. static unsigned int get_instruction(unsigned char *pc, unsigned long *instr); @@ -1639,7 +1620,6 @@ class Assembler : public AbstractAssembler { // For instructions which use address calculation to derive an input value to the instruction. // Shift instructions are an example of such use. static int64_t rsmaskt_32( int64_t d2, Register b2) { return uimm12(d2, 20, 32) | regt(b2, 16, 32); } - static int64_t rsmaskt_48( int64_t d2, Register b2) { return uimm12(d2, 20, 48) | regt(b2, 16, 48); } static int64_t rsymaskt_48(int64_t d2, Register b2) { return simm20(d2) | regt(b2, 16, 48); } static int64_t rxmaskt_32( int64_t d2, Register x2, Register b2){ return uimm12(d2, 20, 32) | regt(x2, 12, 32) | regt(b2, 16, 32); } static int64_t rxymaskt_48(int64_t d2, Register x2, Register b2){ return simm20(d2) | regt(x2, 12, 48) | regt(b2, 16, 48); } @@ -1647,10 +1627,6 @@ class Assembler : public AbstractAssembler { // Address calculated from d12(vx,b) - vx is vector index register. static int64_t rvmask_48( int64_t d2, VectorRegister x2, Register b2) { return uimm12(d2, 20, 48) | vreg(x2, 12) | regz(b2, 16, 48); } - static int64_t vreg_mask(VectorRegister v, int pos) { - return vreg(v, pos) | v->RXB_mask(pos); - } - // Vector Element Size Control. 4-bit field which indicates the size of the vector elements. static int64_t vesc_mask(int64_t size, int min_size, int max_size, int pos) { // min_size - minimum element size. Not all instructions support element sizes beginning with "byte". @@ -1659,23 +1635,6 @@ class Assembler : public AbstractAssembler { return uimm4(size, pos, 48); } - // Vector Element IndeX. 4-bit field which indexes the target vector element. - static int64_t veix_mask(int64_t ix, int el_size, int pos) { - // el_size - size of the vector element. This is a VRegElemType enum value. - // ix - vector element index. - int max_ix = -1; - switch (el_size) { - case VRET_BYTE: max_ix = 15; break; - case VRET_HW: max_ix = 7; break; - case VRET_FW: max_ix = 3; break; - case VRET_DW: max_ix = 1; break; - case VRET_QW: max_ix = 0; break; - default: guarantee(false, "bad vector element size %d", el_size); break; - } - assert((0 <= ix) && (ix <= max_ix), "element size out of range (0 <= %ld <= %d)", ix, max_ix); - return uimm4(ix, pos, 48); - } - // Vector Operation Result Control. 4-bit field. static int64_t voprc_any(int64_t flags, int pos, int64_t allowed_flags = 0b1111) { assert((flags & allowed_flags) == flags, "Invalid VOPRC_* flag combination: %d", (int)flags); @@ -1699,14 +1658,6 @@ class Assembler : public AbstractAssembler { return RelAddr::pcrel_off32(dest, pc); } - // Extract 20-bit signed displacement. - // Only used in disassembler_s390.cpp for temp enhancements. - static int inv_simm20_xx(address iLoc) { - unsigned long instr = 0; - unsigned long iLen = get_instruction(iLoc, &instr); - return inv_simm20(instr); - } - // unsigned immediate, in low bits, nbits long static long uimm(long x, int nbits) { assert(Immediate::is_uimm(x, nbits), "unsigned immediate " INTPTR_FORMAT " out of range (%d bits)", x, nbits); @@ -1786,14 +1737,6 @@ class Assembler : public AbstractAssembler { return imm; } - static short get_imm16(address a, int instruction_number) { - short imm; - short *p =((short *)a) + 2 * instruction_number + 1; - imm = *p; - return imm; - } - - //-------------------------------------------- // instruction field setter methods //-------------------------------------------- @@ -1804,12 +1747,6 @@ class Assembler : public AbstractAssembler { *p = s; } - static void set_imm16(int* instr, int64_t s) { - assert(Immediate::is_simm16(s) || Immediate::is_uimm16(s), "to big"); - short* p = ((short *)instr) + 1; - *p = s; - } - public: static unsigned int align(unsigned int x, unsigned int a) { return ((x + (a - 1)) & ~(a - 1)); } @@ -3123,68 +3060,21 @@ class Assembler : public AbstractAssembler { static int nop_size() { return 2; } - static int z_brul_size() { return 6; } - static bool is_z_basr(short x) { return (BASR_ZOPC == (x & BASR_MASK)); } - static bool is_z_algr(long x) { - return (ALGR_ZOPC == (x & RRE_MASK)); - } static bool is_z_cfi(long x) { return (CFI_ZOPC == (x & RIL_MASK)); } - static bool is_z_lb(long x) { - return (LB_ZOPC == (x & LB_MASK)); - } - static bool is_z_lh(int x) { - return (LH_ZOPC == (x & LH_MASK)); - } static bool is_z_l(int x) { return (L_ZOPC == (x & L_MASK)); } static bool is_z_lgr(long x) { return (LGR_ZOPC == (x & RRE_MASK)); } - static bool is_z_ly(long x) { - return (LY_ZOPC == (x & LY_MASK)); - } static bool is_z_lg(long x) { return (LG_ZOPC == (x & LG_MASK)); } - static bool is_z_llgh(long x) { - return (LLGH_ZOPC == (x & LLGH_MASK)); - } - static bool is_z_llgf(long x) { - return (LLGF_ZOPC == (x & LLGF_MASK)); - } - static bool is_z_le(int x) { - return (LE_ZOPC == (x & LE_MASK)); - } - static bool is_z_ld(int x) { - return (LD_ZOPC == (x & LD_MASK)); - } - static bool is_z_st(int x) { - return (ST_ZOPC == (x & ST_MASK)); - } - static bool is_z_stc(int x) { - return (STC_ZOPC == (x & STC_MASK)); - } - static bool is_z_stg(long x) { - return (STG_ZOPC == (x & STG_MASK)); - } - static bool is_z_sth(int x) { - return (STH_ZOPC == (x & STH_MASK)); - } - static bool is_z_ste(int x) { - return (STE_ZOPC == (x & STE_MASK)); - } - static bool is_z_std(int x) { - return (STD_ZOPC == (x & STD_MASK)); - } - static bool is_z_slag(long x) { - return (SLAG_ZOPC == (x & SLAG_MASK)); - } static bool is_z_tmy(long x) { return (TMY_ZOPC == (x & TMY_MASK)); } @@ -3203,9 +3093,6 @@ class Assembler : public AbstractAssembler { static bool is_z_br(long x) { return is_z_bcr(x) && ((x & 0x00f0) == 0x00f0); } - static bool is_z_brc(long x, int cond) { - return ((unsigned int)BRC_ZOPC == (x & BRC_MASK)) && ((cond<<20) == (x & 0x00f00000U)); - } // Make use of lightweight sync. static bool is_z_sync_full(long x) { return is_z_bcr(x) && (((x & 0x00f0)>>4)==bcondFullSync) && ((x & 0x000f)==0x0000); @@ -3234,42 +3121,9 @@ class Assembler : public AbstractAssembler { long x = (*((long *)a))>>16; return is_z_lgrl(x); } - - static bool is_z_lghi(unsigned long x) { - return (unsigned int)LGHI_ZOPC == (x & (unsigned int)LGHI_MASK); - } - - static bool is_z_llill(unsigned long x) { - return (unsigned int)LLILL_ZOPC == (x & (unsigned int)LLI_MASK); - } - static bool is_z_llilh(unsigned long x) { - return (unsigned int)LLILH_ZOPC == (x & (unsigned int)LLI_MASK); - } - static bool is_z_llihl(unsigned long x) { - return (unsigned int)LLIHL_ZOPC == (x & (unsigned int)LLI_MASK); - } - static bool is_z_llihh(unsigned long x) { - return (unsigned int)LLIHH_ZOPC == (x & (unsigned int)LLI_MASK); - } static bool is_z_llilf(unsigned long x) { return LLILF_ZOPC == (x & LLIF_MASK); } - static bool is_z_llihf(unsigned long x) { - return LLIHF_ZOPC == (x & LLIF_MASK); - } - - static bool is_z_iill(unsigned long x) { - return (unsigned int)IILL_ZOPC == (x & (unsigned int)II_MASK); - } - static bool is_z_iilh(unsigned long x) { - return (unsigned int)IILH_ZOPC == (x & (unsigned int)II_MASK); - } - static bool is_z_iihl(unsigned long x) { - return (unsigned int)IIHL_ZOPC == (x & (unsigned int)II_MASK); - } - static bool is_z_iihh(unsigned long x) { - return (unsigned int)IIHH_ZOPC == (x & (unsigned int)II_MASK); - } static bool is_z_iilf(unsigned long x) { return IILF_ZOPC == (x & IIF_MASK); } diff --git a/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp b/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp index 4318703ad3869..b077b4e25a508 100644 --- a/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp +++ b/src/hotspot/cpu/s390/jvmciCodeInstaller_s390.cpp @@ -59,10 +59,6 @@ void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset Unimplemented(); } -void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { - Unimplemented(); -} - void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination) { Unimplemented(); } diff --git a/src/hotspot/cpu/s390/macroAssembler_s390.hpp b/src/hotspot/cpu/s390/macroAssembler_s390.hpp index 924583abdf563..c4b3a4d98252c 100644 --- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp +++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp @@ -391,9 +391,6 @@ class MacroAssembler: public Assembler { static inline bool is_load_addr_pcrel(address a); static void patch_target_addr_pcrel(address pc, address con); - static void patch_addr_pcrel(address pc, address con) { - patch_target_addr_pcrel(pc, con); // Just delegate. This is only for nativeInst_s390.cpp. - } //--------------------------------------------------------- // Some macros for more comfortable assembler programming. @@ -602,12 +599,8 @@ class MacroAssembler: public Assembler { // END OF PCrelative TOC access. static int jump_byregister_size() { return 2; } - static int jump_pcrelative_size() { return 4; } - static int jump_far_pcrelative_size() { return 6; } static int call_byregister_size() { return 2; } - static int call_pcrelative_size() { return 4; } static int call_far_pcrelative_size() { return 2 + 6; } // Prepend each BRASL with a nop. - static int call_far_pcrelative_size_raw() { return 6; } // Prepend each BRASL with a nop. // // Java utilities @@ -878,27 +871,15 @@ class MacroAssembler: public Assembler { Register mem_base, const char* msg, int id); public: - inline void asm_assert_mem4_is_zero(int64_t mem_offset, Register mem_base, const char* msg, int id) { - asm_assert_mems_zero(true, true, 4, mem_offset, mem_base, msg, id); - } inline void asm_assert_mem8_is_zero(int64_t mem_offset, Register mem_base, const char* msg, int id) { asm_assert_mems_zero(true, true, 8, mem_offset, mem_base, msg, id); } - inline void asm_assert_mem4_isnot_zero(int64_t mem_offset, Register mem_base, const char* msg, int id) { - asm_assert_mems_zero(false, true, 4, mem_offset, mem_base, msg, id); - } inline void asm_assert_mem8_isnot_zero(int64_t mem_offset, Register mem_base, const char* msg, int id) { asm_assert_mems_zero(false, true, 8, mem_offset, mem_base, msg, id); } - inline void asm_assert_mem4_is_zero_static(int64_t mem_offset, Register mem_base, const char* msg, int id) { - asm_assert_mems_zero(true, false, 4, mem_offset, mem_base, msg, id); - } inline void asm_assert_mem8_is_zero_static(int64_t mem_offset, Register mem_base, const char* msg, int id) { asm_assert_mems_zero(true, false, 8, mem_offset, mem_base, msg, id); } - inline void asm_assert_mem4_isnot_zero_static(int64_t mem_offset, Register mem_base, const char* msg, int id) { - asm_assert_mems_zero(false, false, 4, mem_offset, mem_base, msg, id); - } inline void asm_assert_mem8_isnot_zero_static(int64_t mem_offset, Register mem_base, const char* msg, int id) { asm_assert_mems_zero(false, false, 8, mem_offset, mem_base, msg, id); } @@ -958,9 +939,6 @@ class MacroAssembler: public Assembler { //----------------------------- void trace_basic_block(uint i); void init_basic_block_trace(); - // Number of bytes a basic block gets larger due to the tracing code macro (worst case). - // Currently, worst case is 48 bytes. 64 puts us securely on the safe side. - static int basic_blck_trace_blk_size_incr() { return 64; } // Write pattern 0x0101010101010101 in region [low-before, high+after]. // Low and high may be the same registers. Before and after are diff --git a/src/hotspot/cpu/s390/register_s390.hpp b/src/hotspot/cpu/s390/register_s390.hpp index 931e899257e92..3edecf989ca95 100644 --- a/src/hotspot/cpu/s390/register_s390.hpp +++ b/src/hotspot/cpu/s390/register_s390.hpp @@ -242,21 +242,12 @@ class SingleFloatRegister { number_of_registers = 32 }; const SingleFloatRegister* operator->() const { return this; } - - inline constexpr friend FloatRegister as_SingleFloatRegister(int encoding) { - assert(encoding < number_of_registers, "bad single float register encoding"); - return as_FloatRegister(encoding); - } }; class DoubleFloatRegister { public: const DoubleFloatRegister* operator->() const { return this; } - - inline constexpr friend FloatRegister as_DoubleFloatRegister(int encoding) { - return as_FloatRegister(((encoding & 1) << 5) | (encoding & 0x1e)); - } }; class QuadFloatRegister { @@ -266,11 +257,6 @@ class QuadFloatRegister { }; const QuadFloatRegister* operator->() const { return this; } - - inline constexpr friend FloatRegister as_QuadFloatRegister(int encoding) { - assert(encoding < QuadFloatRegister::number_of_registers && ((encoding & 2) == 0), "bad quad float register encoding"); - return as_FloatRegister(((encoding & 1) << 5) | (encoding & 0x1c)); - } }; diff --git a/src/hotspot/cpu/s390/stubRoutines_s390.hpp b/src/hotspot/cpu/s390/stubRoutines_s390.hpp index 7116d441715ad..698104c4abfcb 100644 --- a/src/hotspot/cpu/s390/stubRoutines_s390.hpp +++ b/src/hotspot/cpu/s390/stubRoutines_s390.hpp @@ -85,12 +85,8 @@ class zarch { // or atomic_increment -- should probably use more locks for more // scalability -- for instance one for each eden space or group of. - // Address of the lock for atomic_compare_and_exchange. - static int* atomic_memory_operation_lock_addr() { return &_atomic_memory_operation_lock; } - // Accessor and mutator for _atomic_memory_operation_lock. static int atomic_memory_operation_lock() { return _atomic_memory_operation_lock; } - static void set_atomic_memory_operation_lock(int value) { _atomic_memory_operation_lock = value; } static address partial_subtype_check() { return _partial_subtype_check; } diff --git a/src/hotspot/cpu/s390/vm_version_s390.hpp b/src/hotspot/cpu/s390/vm_version_s390.hpp index 7ac60a10ae7f8..b3f96eedb4444 100644 --- a/src/hotspot/cpu/s390/vm_version_s390.hpp +++ b/src/hotspot/cpu/s390/vm_version_s390.hpp @@ -513,7 +513,7 @@ class VM_Version: public Abstract_VM_Version { static void set_has_CompareBranch() { _features[0] |= GnrlInstrExtFacilityMask; } static void set_has_CompareTrap() { _features[0] |= GnrlInstrExtFacilityMask; } static void set_has_RelativeLoadStore() { _features[0] |= GnrlInstrExtFacilityMask; } - static void set_has_GnrlInstrExtensions() { _features[0] |= GnrlInstrExtFacilityMask; } + static void set_has_ProcessorAssist() { _features[0] |= ProcessorAssistMask; } static void set_has_CompareSwapStore() { _features[0] |= CompareSwapStoreMask; } static void set_has_HFPMultiplyAndAdd() { _features[0] |= HFPMultiplyAndAddMask; } static void set_has_HFPUnnormalized() { _features[0] |= HFPUnnormalizedMask; } @@ -539,9 +539,9 @@ class VM_Version: public Abstract_VM_Version { static void set_has_MiscInstrExt() { _features[0] |= MiscInstrExtMask; } static void set_has_MiscInstrExt2() { _features[0] |= MiscInstrExt2Mask; } static void set_has_MiscInstrExt3() { _features[0] |= MiscInstrExt3Mask; } - static void set_has_ProcessorAssist() { _features[0] |= ProcessorAssistMask; } static void set_has_InterlockedAccessV2() { _features[0] |= InterlockedAccess2Mask; } static void set_has_LoadAndALUAtomicV2() { _features[0] |= InterlockedAccess2Mask; } + static void set_has_ProcessorAssist() { _features[0] |= ProcessorAssistMask; } static void set_has_TxMem() { _features[0] |= ConstrainedTxExecutionMask; _features[1] |= TransactionalExecutionMask; } static void set_has_LoadStoreConditional2() { _features[0] |= LoadStoreConditional2Mask; } static void set_has_CryptoExt3() { _features[1] |= CryptoExtension3Mask; } diff --git a/src/hotspot/cpu/x86/assembler_x86.hpp b/src/hotspot/cpu/x86/assembler_x86.hpp index 41a639248286e..4d2e3d9dc6378 100644 --- a/src/hotspot/cpu/x86/assembler_x86.hpp +++ b/src/hotspot/cpu/x86/assembler_x86.hpp @@ -3036,9 +3036,6 @@ class InstructionAttr { int get_evex_encoding(void) const { return _evex_encoding; } int get_embedded_opmask_register_specifier(void) const { return _embedded_opmask_register_specifier; } - // Set the vector len manually - void set_vector_len(int vector_len) { _avx_vector_len = vector_len; } - // Set revert rex_vex_w for avx encoding void set_rex_vex_w_reverted(void) { _rex_vex_w_reverted = true; } diff --git a/src/hotspot/cpu/x86/gc/shared/barrierSetNMethod_x86.cpp b/src/hotspot/cpu/x86/gc/shared/barrierSetNMethod_x86.cpp index dfd9d59016f0a..437f8664b3c52 100644 --- a/src/hotspot/cpu/x86/gc/shared/barrierSetNMethod_x86.cpp +++ b/src/hotspot/cpu/x86/gc/shared/barrierSetNMethod_x86.cpp @@ -58,7 +58,6 @@ class NativeNMethodCmpBarrier: public NativeInstruction { #endif address instruction_address() const { return addr_at(0); } - address immediate_address() const { return addr_at(imm_offset); } jint get_immediate() const { return int_at(imm_offset); } void set_immediate(jint imm) { set_int_at(imm_offset, imm); } diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.cpp b/src/hotspot/cpu/x86/macroAssembler_x86.cpp index 851b89a0a060f..f3a35e54e0e37 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp @@ -5362,10 +5362,6 @@ class FPU_Register { int32_t _m1; int16_t _ex; - bool is_indefinite() const { - return _ex == -1 && _m1 == (int32_t)0xC0000000 && _m0 == 0; - } - void print() const { char sign = (_ex < 0) ? '-' : '+'; const char* kind = (_ex == 0x7FFF || _ex == (int16_t)-1) ? "NaN" : " "; diff --git a/src/hotspot/cpu/x86/macroAssembler_x86.hpp b/src/hotspot/cpu/x86/macroAssembler_x86.hpp index fd989c7bd229d..ed6b4dcfdf295 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp @@ -877,10 +877,6 @@ class MacroAssembler: public Assembler { void xchgptr(Register src1, Register src2) { LP64_ONLY(xchgq(src1, src2)) NOT_LP64(xchgl(src1, src2)) ; } void xchgptr(Register src1, Address src2) { LP64_ONLY(xchgq(src1, src2)) NOT_LP64(xchgl(src1, src2)) ; } - void xaddptr(Address src1, Register src2) { LP64_ONLY(xaddq(src1, src2)) NOT_LP64(xaddl(src1, src2)) ; } - - - // Helper functions for statistics gathering. // Conditionally (atomically, on MPs) increments passed counter address, preserving condition codes. void cond_inc32(Condition cond, AddressLiteral counter_addr, Register rscratch = noreg); @@ -898,8 +894,6 @@ class MacroAssembler: public Assembler { void lea(Register dst, AddressLiteral adr); void lea(Address dst, AddressLiteral adr, Register rscratch); - void leal32(Register dst, Address src) { leal(dst, src); } - // Import other testl() methods from the parent class or else // they will be hidden by the following overriding declaration. using Assembler::testl; @@ -959,67 +953,28 @@ class MacroAssembler: public Assembler { void ALWAYSINLINE jo(Label& L, bool maybe_short = true) { jcc(Assembler::overflow, L, maybe_short); } void ALWAYSINLINE jno(Label& L, bool maybe_short = true) { jcc(Assembler::noOverflow, L, maybe_short); } void ALWAYSINLINE js(Label& L, bool maybe_short = true) { jcc(Assembler::negative, L, maybe_short); } - void ALWAYSINLINE jns(Label& L, bool maybe_short = true) { jcc(Assembler::positive, L, maybe_short); } void ALWAYSINLINE je(Label& L, bool maybe_short = true) { jcc(Assembler::equal, L, maybe_short); } void ALWAYSINLINE jz(Label& L, bool maybe_short = true) { jcc(Assembler::zero, L, maybe_short); } void ALWAYSINLINE jne(Label& L, bool maybe_short = true) { jcc(Assembler::notEqual, L, maybe_short); } void ALWAYSINLINE jnz(Label& L, bool maybe_short = true) { jcc(Assembler::notZero, L, maybe_short); } void ALWAYSINLINE jb(Label& L, bool maybe_short = true) { jcc(Assembler::below, L, maybe_short); } - void ALWAYSINLINE jnae(Label& L, bool maybe_short = true) { jcc(Assembler::below, L, maybe_short); } void ALWAYSINLINE jc(Label& L, bool maybe_short = true) { jcc(Assembler::carrySet, L, maybe_short); } void ALWAYSINLINE jnb(Label& L, bool maybe_short = true) { jcc(Assembler::aboveEqual, L, maybe_short); } void ALWAYSINLINE jae(Label& L, bool maybe_short = true) { jcc(Assembler::aboveEqual, L, maybe_short); } - void ALWAYSINLINE jnc(Label& L, bool maybe_short = true) { jcc(Assembler::carryClear, L, maybe_short); } void ALWAYSINLINE jbe(Label& L, bool maybe_short = true) { jcc(Assembler::belowEqual, L, maybe_short); } void ALWAYSINLINE jna(Label& L, bool maybe_short = true) { jcc(Assembler::belowEqual, L, maybe_short); } void ALWAYSINLINE ja(Label& L, bool maybe_short = true) { jcc(Assembler::above, L, maybe_short); } - void ALWAYSINLINE jnbe(Label& L, bool maybe_short = true) { jcc(Assembler::above, L, maybe_short); } void ALWAYSINLINE jl(Label& L, bool maybe_short = true) { jcc(Assembler::less, L, maybe_short); } - void ALWAYSINLINE jnge(Label& L, bool maybe_short = true) { jcc(Assembler::less, L, maybe_short); } void ALWAYSINLINE jge(Label& L, bool maybe_short = true) { jcc(Assembler::greaterEqual, L, maybe_short); } void ALWAYSINLINE jnl(Label& L, bool maybe_short = true) { jcc(Assembler::greaterEqual, L, maybe_short); } void ALWAYSINLINE jle(Label& L, bool maybe_short = true) { jcc(Assembler::lessEqual, L, maybe_short); } void ALWAYSINLINE jng(Label& L, bool maybe_short = true) { jcc(Assembler::lessEqual, L, maybe_short); } void ALWAYSINLINE jg(Label& L, bool maybe_short = true) { jcc(Assembler::greater, L, maybe_short); } - void ALWAYSINLINE jnle(Label& L, bool maybe_short = true) { jcc(Assembler::greater, L, maybe_short); } void ALWAYSINLINE jp(Label& L, bool maybe_short = true) { jcc(Assembler::parity, L, maybe_short); } - void ALWAYSINLINE jpe(Label& L, bool maybe_short = true) { jcc(Assembler::parity, L, maybe_short); } void ALWAYSINLINE jnp(Label& L, bool maybe_short = true) { jcc(Assembler::noParity, L, maybe_short); } - void ALWAYSINLINE jpo(Label& L, bool maybe_short = true) { jcc(Assembler::noParity, L, maybe_short); } // * No condition for this * void ALWAYSINLINE jcxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } // * No condition for this * void ALWAYSINLINE jecxz(Label& L, bool maybe_short = true) { jcc(Assembler::cxz, L, maybe_short); } - // Short versions of the above - void ALWAYSINLINE jo_b(Label& L) { jccb(Assembler::overflow, L); } - void ALWAYSINLINE jno_b(Label& L) { jccb(Assembler::noOverflow, L); } - void ALWAYSINLINE js_b(Label& L) { jccb(Assembler::negative, L); } - void ALWAYSINLINE jns_b(Label& L) { jccb(Assembler::positive, L); } - void ALWAYSINLINE je_b(Label& L) { jccb(Assembler::equal, L); } - void ALWAYSINLINE jz_b(Label& L) { jccb(Assembler::zero, L); } - void ALWAYSINLINE jne_b(Label& L) { jccb(Assembler::notEqual, L); } - void ALWAYSINLINE jnz_b(Label& L) { jccb(Assembler::notZero, L); } - void ALWAYSINLINE jb_b(Label& L) { jccb(Assembler::below, L); } - void ALWAYSINLINE jnae_b(Label& L) { jccb(Assembler::below, L); } - void ALWAYSINLINE jc_b(Label& L) { jccb(Assembler::carrySet, L); } - void ALWAYSINLINE jnb_b(Label& L) { jccb(Assembler::aboveEqual, L); } - void ALWAYSINLINE jae_b(Label& L) { jccb(Assembler::aboveEqual, L); } - void ALWAYSINLINE jnc_b(Label& L) { jccb(Assembler::carryClear, L); } - void ALWAYSINLINE jbe_b(Label& L) { jccb(Assembler::belowEqual, L); } - void ALWAYSINLINE jna_b(Label& L) { jccb(Assembler::belowEqual, L); } - void ALWAYSINLINE ja_b(Label& L) { jccb(Assembler::above, L); } - void ALWAYSINLINE jnbe_b(Label& L) { jccb(Assembler::above, L); } - void ALWAYSINLINE jl_b(Label& L) { jccb(Assembler::less, L); } - void ALWAYSINLINE jnge_b(Label& L) { jccb(Assembler::less, L); } - void ALWAYSINLINE jge_b(Label& L) { jccb(Assembler::greaterEqual, L); } - void ALWAYSINLINE jnl_b(Label& L) { jccb(Assembler::greaterEqual, L); } - void ALWAYSINLINE jle_b(Label& L) { jccb(Assembler::lessEqual, L); } - void ALWAYSINLINE jng_b(Label& L) { jccb(Assembler::lessEqual, L); } - void ALWAYSINLINE jg_b(Label& L) { jccb(Assembler::greater, L); } - void ALWAYSINLINE jnle_b(Label& L) { jccb(Assembler::greater, L); } - void ALWAYSINLINE jp_b(Label& L) { jccb(Assembler::parity, L); } - void ALWAYSINLINE jpe_b(Label& L) { jccb(Assembler::parity, L); } - void ALWAYSINLINE jnp_b(Label& L) { jccb(Assembler::noParity, L); } - void ALWAYSINLINE jpo_b(Label& L) { jccb(Assembler::noParity, L); } // * No condition for this * void ALWAYSINLINE jcxz_b(Label& L) { jccb(Assembler::cxz, L); } // * No condition for this * void ALWAYSINLINE jecxz_b(Label& L) { jccb(Assembler::cxz, L); } @@ -1769,9 +1724,6 @@ class MacroAssembler: public Assembler { } // 256bit copy to/from high 256 bits of 512bit (ZMM) vector registers - void vinserti64x4_high(XMMRegister dst, XMMRegister src) { - Assembler::vinserti64x4(dst, dst, src, 1); - } void vinsertf64x4_high(XMMRegister dst, XMMRegister src) { Assembler::vinsertf64x4(dst, dst, src, 1); } @@ -1835,15 +1787,9 @@ class MacroAssembler: public Assembler { } // 256bit copy to/from low 256 bits of 512bit (ZMM) vector registers - void vinserti64x4_low(XMMRegister dst, XMMRegister src) { - Assembler::vinserti64x4(dst, dst, src, 0); - } void vinsertf64x4_low(XMMRegister dst, XMMRegister src) { Assembler::vinsertf64x4(dst, dst, src, 0); } - void vextracti64x4_low(XMMRegister dst, XMMRegister src) { - Assembler::vextracti64x4(dst, src, 0); - } void vextractf64x4_low(XMMRegister dst, XMMRegister src) { Assembler::vextractf64x4(dst, src, 0); } @@ -1872,15 +1818,6 @@ class MacroAssembler: public Assembler { Assembler::vpclmulqdq(dst, nds, src, 0x01); } - void evpclmulldq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) { - // 0x00 - multiply lower 64 bits [0:63] - Assembler::evpclmulqdq(dst, nds, src, 0x00, vector_len); - } - void evpclmulhdq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) { - // 0x11 - multiply upper 64 bits [64:127] - Assembler::evpclmulqdq(dst, nds, src, 0x11, vector_len); - } - // AVX-512 mask operations. void kand(BasicType etype, KRegister dst, KRegister src1, KRegister src2); void kor(BasicType type, KRegister dst, KRegister src1, KRegister src2); diff --git a/src/hotspot/cpu/x86/nativeInst_x86.hpp b/src/hotspot/cpu/x86/nativeInst_x86.hpp index f8cbf70f18961..8aa00b53fbad4 100644 --- a/src/hotspot/cpu/x86/nativeInst_x86.hpp +++ b/src/hotspot/cpu/x86/nativeInst_x86.hpp @@ -414,15 +414,6 @@ class NativeLoadAddress: public NativeMovRegMem { void verify(); void print (); - - private: - friend NativeLoadAddress* nativeLoadAddress_at (address address) { - NativeLoadAddress* test = (NativeLoadAddress*)(address - instruction_offset); - #ifdef ASSERT - test->verify(); - #endif - return test; - } }; // destination is rbx or rax diff --git a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp index febc1b2c3b143..da69e6ca69a10 100644 --- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp +++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp @@ -113,7 +113,6 @@ class RegisterSaver { static int raxOffset(void) { return rax_off; } static int rdxOffset(void) { return rdx_off; } - static int rbxOffset(void) { return rbx_off; } static int xmm0Offset(void) { return xmm0_off; } // This really returns a slot in the fp save area, which one is not important static int fpResultOffset(void) { return st0_off; } diff --git a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp index d8067a39177f1..ae73973caf95d 100644 --- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp +++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp @@ -2313,13 +2313,6 @@ class StubGenerator: public StubCodeGenerator { __ aesenc(xmmdst, xmmtmp); } - // aesdec using specified key+offset - // can optionally specify that the shuffle mask is already in an xmmregister - void aes_dec_key(XMMRegister xmmdst, XMMRegister xmmtmp, Register key, int offset, XMMRegister xmm_shuf_mask = xnoreg) { - load_key(xmmtmp, key, offset, xmm_shuf_mask); - __ aesdec(xmmdst, xmmtmp); - } - // Utility routine for increase 128bit counter (iv in CTR mode) // XMM_128bit, D3, D2, D1, D0 void inc_counter(Register reg, XMMRegister xmmdst, int inc_delta, Label& next_block) { diff --git a/src/hotspot/cpu/x86/vm_version_x86.hpp b/src/hotspot/cpu/x86/vm_version_x86.hpp index 18b272ab58b0b..969c0192d572b 100644 --- a/src/hotspot/cpu/x86/vm_version_x86.hpp +++ b/src/hotspot/cpu/x86/vm_version_x86.hpp @@ -663,9 +663,7 @@ class VM_Version : public Abstract_VM_Version { // // Feature identification which can be affected by VM settings // - static bool supports_cpuid() { return _features != 0; } static bool supports_cmov() { return (_features & CPU_CMOV) != 0; } - static bool supports_fxsr() { return (_features & CPU_FXSR) != 0; } static bool supports_ht() { return (_features & CPU_HT) != 0; } static bool supports_mmx() { return (_features & CPU_MMX) != 0; } static bool supports_sse() { return (_features & CPU_SSE) != 0; } @@ -678,11 +676,8 @@ class VM_Version : public Abstract_VM_Version { static bool supports_avx() { return (_features & CPU_AVX) != 0; } static bool supports_avx2() { return (_features & CPU_AVX2) != 0; } static bool supports_tsc() { return (_features & CPU_TSC) != 0; } - static bool supports_rdtscp() { return (_features & CPU_RDTSCP) != 0; } - static bool supports_rdpid() { return (_features & CPU_RDPID) != 0; } static bool supports_aes() { return (_features & CPU_AES) != 0; } static bool supports_erms() { return (_features & CPU_ERMS) != 0; } - static bool supports_fsrm() { return (_features & CPU_FSRM) != 0; } static bool supports_clmul() { return (_features & CPU_CLMUL) != 0; } static bool supports_rtm() { return (_features & CPU_RTM) != 0; } static bool supports_bmi1() { return (_features & CPU_BMI1) != 0; } @@ -692,20 +687,14 @@ class VM_Version : public Abstract_VM_Version { static bool supports_avx512dq() { return (_features & CPU_AVX512DQ) != 0; } static bool supports_avx512ifma() { return (_features & CPU_AVX512_IFMA) != 0; } static bool supports_avxifma() { return (_features & CPU_AVX_IFMA) != 0; } - static bool supports_avx512pf() { return (_features & CPU_AVX512PF) != 0; } - static bool supports_avx512er() { return (_features & CPU_AVX512ER) != 0; } static bool supports_avx512cd() { return (_features & CPU_AVX512CD) != 0; } static bool supports_avx512bw() { return (_features & CPU_AVX512BW) != 0; } static bool supports_avx512vl() { return (_features & CPU_AVX512VL) != 0; } static bool supports_avx512vlbw() { return (supports_evex() && supports_avx512bw() && supports_avx512vl()); } - static bool supports_avx512bwdq() { return (supports_evex() && supports_avx512bw() && supports_avx512dq()); } static bool supports_avx512vldq() { return (supports_evex() && supports_avx512dq() && supports_avx512vl()); } static bool supports_avx512vlbwdq() { return (supports_evex() && supports_avx512vl() && supports_avx512bw() && supports_avx512dq()); } static bool supports_avx512novl() { return (supports_evex() && !supports_avx512vl()); } - static bool supports_avx512nobw() { return (supports_evex() && !supports_avx512bw()); } - static bool supports_avx256only() { return (supports_avx2() && !supports_evex()); } - static bool supports_avxonly() { return ((supports_avx2() || supports_avx()) && !supports_evex()); } static bool supports_sha() { return (_features & CPU_SHA) != 0; } static bool supports_fma() { return (_features & CPU_FMA) != 0 && supports_avx(); } static bool supports_vzeroupper() { return (_features & CPU_VZEROUPPER) != 0; } @@ -720,10 +709,6 @@ class VM_Version : public Abstract_VM_Version { static bool supports_hv() { return (_features & CPU_HV) != 0; } static bool supports_serialize() { return (_features & CPU_SERIALIZE) != 0; } static bool supports_f16c() { return (_features & CPU_F16C) != 0; } - static bool supports_pku() { return (_features & CPU_PKU) != 0; } - static bool supports_ospke() { return (_features & CPU_OSPKE) != 0; } - static bool supports_cet_ss() { return (_features & CPU_CET_SS) != 0; } - static bool supports_cet_ibt() { return (_features & CPU_CET_IBT) != 0; } // // Feature identification not affected by VM flags diff --git a/src/hotspot/share/adlc/filebuff.hpp b/src/hotspot/share/adlc/filebuff.hpp index 0426197e9a6ea..02f75bbbae00d 100644 --- a/src/hotspot/share/adlc/filebuff.hpp +++ b/src/hotspot/share/adlc/filebuff.hpp @@ -73,9 +73,5 @@ class FileBuff { char *get_line(void); int linenum() const { return _linenum; } void set_linenum(int line) { _linenum = line; } - - // This converts a pointer into the buffer to a file offset. It only works - // when the pointer is valid (i.e. just obtained from getline()). - long getoff(const char* s) { return _bufoff + (long)(s - _buf); } }; #endif // SHARE_ADLC_FILEBUFF_HPP diff --git a/src/hotspot/share/adlc/forms.hpp b/src/hotspot/share/adlc/forms.hpp index a82b9bbb3382d..793e34500ffe2 100644 --- a/src/hotspot/share/adlc/forms.hpp +++ b/src/hotspot/share/adlc/forms.hpp @@ -293,7 +293,6 @@ class FormList { void reset() { if (_root) {_cur = _root; _justReset = 1;} }; // Second iterator, state is internal - Form * current2(){ return _cur2; }; Form * iter2() { if (_justReset2) _justReset2 = 0; else if (_cur2) _cur2 = _cur2->_next; return _cur2;}; diff --git a/src/hotspot/share/adlc/formsopt.hpp b/src/hotspot/share/adlc/formsopt.hpp index d183a46b87545..ee6ef83eae4ed 100644 --- a/src/hotspot/share/adlc/formsopt.hpp +++ b/src/hotspot/share/adlc/formsopt.hpp @@ -202,9 +202,6 @@ class RegClass : public Form { void output(FILE *fp); // Write info to output files virtual void forms_do(FormClosure* f); - virtual bool has_stack_version() { - return _stack_or_reg; - } virtual void set_stack_version(bool flag) { _stack_or_reg = flag; } @@ -709,9 +706,6 @@ class PeepChild : public Form { : _inst_num(inst_num), _inst_op(inst_op), _inst_name(inst_name) {}; ~PeepChild(); - bool use_leaf_operand() { return _inst_num != -1; }; - bool generate_an_instruction() { return _inst_num == -1; } - void dump(); void output(FILE *fp); }; diff --git a/src/hotspot/share/adlc/output_c.cpp b/src/hotspot/share/adlc/output_c.cpp index 77332b21c0112..5e23c4d0b8fac 100644 --- a/src/hotspot/share/adlc/output_c.cpp +++ b/src/hotspot/share/adlc/output_c.cpp @@ -2284,12 +2284,6 @@ class DefineEmitState { } } - void emit_reloc_type(const char* type) { - fprintf(_fp, "%s", type) - ; - } - - void emit() { // // "emit_d32_reloc(" or "emit_hi_reloc" or "emit_lo_reloc" diff --git a/src/hotspot/share/asm/assembler.hpp b/src/hotspot/share/asm/assembler.hpp index d05278f7fe107..84d3fd25cc67a 100644 --- a/src/hotspot/share/asm/assembler.hpp +++ b/src/hotspot/share/asm/assembler.hpp @@ -129,7 +129,6 @@ class Label { return _loc; } int loc_pos() const { return CodeBuffer::locator_pos(loc()); } - int loc_sect() const { return CodeBuffer::locator_sect(loc()); } bool is_bound() const { return _loc >= 0; } bool is_unbound() const { return _loc == -1 && _patch_index > 0; } diff --git a/src/hotspot/share/asm/codeBuffer.hpp b/src/hotspot/share/asm/codeBuffer.hpp index 48476bedfe2f6..199492c6be345 100644 --- a/src/hotspot/share/asm/codeBuffer.hpp +++ b/src/hotspot/share/asm/codeBuffer.hpp @@ -632,7 +632,6 @@ class CodeBuffer: public StackObj DEBUG_ONLY(COMMA private Scrubber) { // is a given address in the insts section? (2nd version is end-inclusive) bool insts_contains(address pc) const { return _insts.contains(pc); } - bool insts_contains2(address pc) const { return _insts.contains2(pc); } // Record any extra oops required to keep embedded metadata alive void finalize_oop_references(const methodHandle& method); diff --git a/src/hotspot/share/c1/c1_FrameMap.hpp b/src/hotspot/share/c1/c1_FrameMap.hpp index 2a7533e499f60..6c71074119847 100644 --- a/src/hotspot/share/c1/c1_FrameMap.hpp +++ b/src/hotspot/share/c1/c1_FrameMap.hpp @@ -104,7 +104,6 @@ class FrameMap : public CompilationResourceObj { CallingConvention* _incoming_arguments; intArray* _argument_locations; - void check_spill_index (int spill_index) const { assert(spill_index >= 0, "bad index"); } void check_monitor_index (int monitor_index) const { assert(monitor_index >= 0 && monitor_index < _num_monitors, "bad index"); } diff --git a/src/hotspot/share/c1/c1_GraphBuilder.hpp b/src/hotspot/share/c1/c1_GraphBuilder.hpp index 92b9a518a2070..828146b648bbc 100644 --- a/src/hotspot/share/c1/c1_GraphBuilder.hpp +++ b/src/hotspot/share/c1/c1_GraphBuilder.hpp @@ -332,11 +332,6 @@ class GraphBuilder { BlockBegin* inline_cleanup_block() const { return scope_data()->inline_cleanup_block(); } Instruction* inline_cleanup_return_prev() const { return scope_data()->inline_cleanup_return_prev(); } ValueStack* inline_cleanup_state() const { return scope_data()->inline_cleanup_state(); } - void restore_inline_cleanup_info() { - _block = inline_cleanup_block(); - _last = inline_cleanup_return_prev(); - _state = inline_cleanup_state(); - } void incr_num_returns() { scope_data()->incr_num_returns(); } int num_returns() const { return scope_data()->num_returns(); } intx max_inline_size() const { return scope_data()->max_inline_size(); } diff --git a/src/hotspot/share/c1/c1_Instruction.hpp b/src/hotspot/share/c1/c1_Instruction.hpp index 32ff3d9f61cab..d65e0923743f1 100644 --- a/src/hotspot/share/c1/c1_Instruction.hpp +++ b/src/hotspot/share/c1/c1_Instruction.hpp @@ -520,12 +520,9 @@ class Instruction: public CompilationResourceObj { virtual Constant* as_Constant() { return nullptr; } virtual AccessField* as_AccessField() { return nullptr; } virtual LoadField* as_LoadField() { return nullptr; } - virtual StoreField* as_StoreField() { return nullptr; } - virtual AccessArray* as_AccessArray() { return nullptr; } virtual ArrayLength* as_ArrayLength() { return nullptr; } virtual AccessIndexed* as_AccessIndexed() { return nullptr; } virtual LoadIndexed* as_LoadIndexed() { return nullptr; } - virtual StoreIndexed* as_StoreIndexed() { return nullptr; } virtual NegateOp* as_NegateOp() { return nullptr; } virtual Op2* as_Op2() { return nullptr; } virtual ArithmeticOp* as_ArithmeticOp() { return nullptr; } @@ -540,36 +537,21 @@ class Instruction: public CompilationResourceObj { virtual Invoke* as_Invoke() { return nullptr; } virtual NewInstance* as_NewInstance() { return nullptr; } virtual NewArray* as_NewArray() { return nullptr; } - virtual NewTypeArray* as_NewTypeArray() { return nullptr; } - virtual NewObjectArray* as_NewObjectArray() { return nullptr; } virtual NewMultiArray* as_NewMultiArray() { return nullptr; } - virtual TypeCheck* as_TypeCheck() { return nullptr; } - virtual CheckCast* as_CheckCast() { return nullptr; } - virtual InstanceOf* as_InstanceOf() { return nullptr; } - virtual TypeCast* as_TypeCast() { return nullptr; } - virtual AccessMonitor* as_AccessMonitor() { return nullptr; } virtual MonitorEnter* as_MonitorEnter() { return nullptr; } virtual MonitorExit* as_MonitorExit() { return nullptr; } virtual Intrinsic* as_Intrinsic() { return nullptr; } - virtual BlockBegin* as_BlockBegin() { return nullptr; } virtual BlockEnd* as_BlockEnd() { return nullptr; } virtual Goto* as_Goto() { return nullptr; } virtual If* as_If() { return nullptr; } - virtual TableSwitch* as_TableSwitch() { return nullptr; } - virtual LookupSwitch* as_LookupSwitch() { return nullptr; } virtual Return* as_Return() { return nullptr; } virtual Throw* as_Throw() { return nullptr; } virtual Base* as_Base() { return nullptr; } virtual RoundFP* as_RoundFP() { return nullptr; } virtual ExceptionObject* as_ExceptionObject() { return nullptr; } - virtual UnsafeOp* as_UnsafeOp() { return nullptr; } virtual ProfileInvoke* as_ProfileInvoke() { return nullptr; } virtual RangeCheckPredicate* as_RangeCheckPredicate() { return nullptr; } -#ifdef ASSERT - virtual Assert* as_Assert() { return nullptr; } -#endif - virtual void visit(InstructionVisitor* v) = 0; virtual bool can_trap() const { return false; } diff --git a/src/hotspot/share/c1/c1_LIR.hpp b/src/hotspot/share/c1/c1_LIR.hpp index c69d29f8d619d..cbe181d644dce 100644 --- a/src/hotspot/share/c1/c1_LIR.hpp +++ b/src/hotspot/share/c1/c1_LIR.hpp @@ -365,12 +365,7 @@ class LIR_Opr { char type_char() const { return type_char((is_pointer()) ? pointer()->type() : type()); } bool is_equal(LIR_Opr opr) const { return *this == opr; } - // checks whether types are same - bool is_same_type(LIR_Opr opr) const { - assert(type_field() != unknown_type && - opr->type_field() != unknown_type, "shouldn't see unknown_type"); - return type_field() == opr->type_field(); - } + bool is_same_register(LIR_Opr opr) { return (is_register() && opr->is_register() && kind_field() == opr->kind_field() && @@ -2400,7 +2395,6 @@ class LIR_InsertionBuffer : public CompilationResourceObj { LIR_OpList _ops; void append_new(int index, int count) { _index_and_count.append(index); _index_and_count.append(count); } - void set_index_at(int i, int value) { _index_and_count.at_put((i << 1), value); } void set_count_at(int i, int value) { _index_and_count.at_put((i << 1) + 1, value); } #ifdef ASSERT diff --git a/src/hotspot/share/c1/c1_LIRAssembler.hpp b/src/hotspot/share/c1/c1_LIRAssembler.hpp index eb89e3ea24870..d8bce1e13b24d 100644 --- a/src/hotspot/share/c1/c1_LIRAssembler.hpp +++ b/src/hotspot/share/c1/c1_LIRAssembler.hpp @@ -55,7 +55,6 @@ class LIR_Assembler: public CompilationResourceObj { FrameMap* frame_map() const { return _frame_map; } - void set_current_block(BlockBegin* b) { _current_block = b; } BlockBegin* current_block() const { return _current_block; } // non-safepoint debug info management diff --git a/src/hotspot/share/c1/c1_ValueType.hpp b/src/hotspot/share/c1/c1_ValueType.hpp index 488b337251884..1a32598f36f65 100644 --- a/src/hotspot/share/c1/c1_ValueType.hpp +++ b/src/hotspot/share/c1/c1_ValueType.hpp @@ -132,7 +132,6 @@ class ValueType: public CompilationResourceObj { bool is_address() { return as_AddressType() != nullptr; } bool is_illegal() { return tag() == illegalTag; } - bool is_int_kind() const { return tag() == intTag || tag() == longTag; } bool is_float_kind() const { return tag() == floatTag || tag() == doubleTag; } bool is_object_kind() const { return tag() == objectTag; } diff --git a/src/hotspot/share/cds/archiveBuilder.hpp b/src/hotspot/share/cds/archiveBuilder.hpp index cbde5a7e02cbc..e51f3642dbc0f 100644 --- a/src/hotspot/share/cds/archiveBuilder.hpp +++ b/src/hotspot/share/cds/archiveBuilder.hpp @@ -311,10 +311,6 @@ class ArchiveBuilder : public StackObj { return (T)(address(obj) + _buffer_to_requested_delta); } - static intx get_buffer_to_requested_delta() { - return current()->buffer_to_requested_delta(); - } - inline static u4 to_offset_u4(uintx offset) { guarantee(offset <= MAX_SHARED_DELTA, "must be 32-bit offset " INTPTR_FORMAT, offset); return (u4)offset; diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 5d56eb2153f62..e90cb8fbb5eca 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -611,13 +611,6 @@ class ManifestStream: public ResourceObj { static bool is_attr(u1* attr, const char* name) { return strncmp((const char*)attr, name, strlen(name)) == 0; } - - static char* copy_attr(u1* value, size_t len) { - char* buf = NEW_RESOURCE_ARRAY(char, len + 1); - strncpy(buf, (char*)value, len); - buf[len] = 0; - return buf; - } }; void FileMapInfo::update_jar_manifest(ClassPathEntry *cpe, SharedClassPathEntry* ent, TRAPS) { diff --git a/src/hotspot/share/cds/filemap.hpp b/src/hotspot/share/cds/filemap.hpp index 54881b8d2375d..20f5e7078fffe 100644 --- a/src/hotspot/share/cds/filemap.hpp +++ b/src/hotspot/share/cds/filemap.hpp @@ -135,9 +135,6 @@ class FileMapRegion: private CDSFileMapRegion { void assert_is_heap_region() const { assert(_is_heap_region, "must be heap region"); } - void assert_is_not_heap_region() const { - assert(!_is_heap_region, "must not be heap region"); - } static FileMapRegion* cast(CDSFileMapRegion* p) { return (FileMapRegion*)p; @@ -427,10 +424,6 @@ class FileMapInfo : public CHeapObj { NOT_CDS(return nullptr;) } - static void set_current_info(FileMapInfo* info) { - CDS_ONLY(_current_info = info;) - } - static FileMapInfo* dynamic_info() { CDS_ONLY(return _dynamic_archive_info;) NOT_CDS(return nullptr;) diff --git a/src/hotspot/share/cds/metaspaceShared.hpp b/src/hotspot/share/cds/metaspaceShared.hpp index 1fb6ae8814210..753ff45ccddf2 100644 --- a/src/hotspot/share/cds/metaspaceShared.hpp +++ b/src/hotspot/share/cds/metaspaceShared.hpp @@ -162,7 +162,6 @@ class MetaspaceShared : AllStatic { // Can we skip some expensive operations related to modules? static bool use_optimized_module_handling() { return NOT_CDS(false) CDS_ONLY(_use_optimized_module_handling); } - static void disable_optimized_module_handling() { _use_optimized_module_handling = false; } private: static void read_extra_data(JavaThread* current, const char* filename) NOT_CDS_RETURN; diff --git a/src/hotspot/share/ci/ciMethodBlocks.hpp b/src/hotspot/share/ci/ciMethodBlocks.hpp index f1b446c2a87da..4b63d48066126 100644 --- a/src/hotspot/share/ci/ciMethodBlocks.hpp +++ b/src/hotspot/share/ci/ciMethodBlocks.hpp @@ -105,19 +105,12 @@ class ciBlock : public ArenaObj { bool processed() const { return (_flags & Processed) != 0; } bool is_handler() const { return (_flags & Handler) != 0; } bool may_throw() const { return (_flags & MayThrow) != 0; } - bool does_jsr() const { return (_flags & DoesJsr) != 0; } - bool does_ret() const { return (_flags & DoesRet) != 0; } bool has_handler() const { return (_flags & HasHandler) != 0; } bool is_ret_target() const { return (_flags & RetTarget) != 0; } void set_processed() { _flags |= Processed; } void clear_processed() { _flags &= ~Processed; } void set_handler() { _flags |= Handler; } void set_may_throw() { _flags |= MayThrow; } - void set_does_jsr() { _flags |= DoesJsr; } - void clear_does_jsr() { _flags &= ~DoesJsr; } - void set_does_ret() { _flags |= DoesRet; } - void clear_does_ret() { _flags &= ~DoesRet; } - void set_is_ret_target() { _flags |= RetTarget; } void set_has_handler() { _flags |= HasHandler; } void clear_exception_handler() { _flags &= ~Handler; _ex_start_bci = -1; _ex_limit_bci = -1; } #ifndef PRODUCT diff --git a/src/hotspot/share/ci/ciObject.hpp b/src/hotspot/share/ci/ciObject.hpp index 9b60639edb5d6..e5dde96b4c4ae 100644 --- a/src/hotspot/share/ci/ciObject.hpp +++ b/src/hotspot/share/ci/ciObject.hpp @@ -128,7 +128,6 @@ class ciObject : public ciBaseObject { virtual bool is_array() { return false; } virtual bool is_obj_array() { return false; } virtual bool is_type_array() { return false; } - virtual bool is_native_entry_point()const { return false; } // Is this a type or value which has no associated class? // It is true of primitive types and null objects. @@ -166,10 +165,6 @@ class ciObject : public ciBaseObject { assert(is_method_handle(), "bad cast"); return (ciMethodHandle*)this; } - ciMethodType* as_method_type() { - assert(is_method_type(), "bad cast"); - return (ciMethodType*)this; - } ciArray* as_array() { assert(is_array(), "bad cast"); return (ciArray*)this; diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index 815550da0bc91..6dd2fa43b358f 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -974,11 +974,6 @@ class AnnotationCollector : public ResourceObj{ _annotations_present |= (int)nth_bit((int)id); } - void remove_annotation(ID id) { - assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob"); - _annotations_present &= (int)~nth_bit((int)id); - } - // Report if the annotation is present. bool has_any_annotations() const { return _annotations_present != 0; } bool has_annotation(ID id) const { return (nth_bit((int)id) & _annotations_present) != 0; } @@ -988,7 +983,6 @@ class AnnotationCollector : public ResourceObj{ bool is_contended() const { return has_annotation(_jdk_internal_vm_annotation_Contended); } - void set_stable(bool stable) { set_annotation(_field_Stable); } bool is_stable() const { return has_annotation(_field_Stable); } }; diff --git a/src/hotspot/share/classfile/classLoaderExt.hpp b/src/hotspot/share/classfile/classLoaderExt.hpp index b76ce3ff33a32..83c7298872292 100644 --- a/src/hotspot/share/classfile/classLoaderExt.hpp +++ b/src/hotspot/share/classfile/classLoaderExt.hpp @@ -99,10 +99,6 @@ class ClassLoaderExt: public ClassLoader { // AllStatic _app_module_paths_start_index = module_start; } - static bool is_boot_classpath(int classpath_index) { - return classpath_index < _app_class_paths_start_index; - } - static bool has_platform_or_app_classes() { return _has_app_classes || _has_platform_classes; } diff --git a/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp b/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp index f89090fbb5c06..46d0f89091f32 100644 --- a/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp +++ b/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp @@ -336,12 +336,6 @@ class LoaderTreeNode : public ResourceObj { _child = info; } - void add_sibling(LoaderTreeNode* info) { - assert(info->_next == nullptr, "must be"); - info->_next = _next; - _next = info; - } - void add_classes(LoadedClassInfo* first_class, int num_classes, bool has_class_mirror_holder) { LoadedClassInfo** p_list_to_add_to; bool is_hidden = first_class->_klass->is_hidden(); diff --git a/src/hotspot/share/classfile/fieldLayoutBuilder.hpp b/src/hotspot/share/classfile/fieldLayoutBuilder.hpp index cda64788acffa..4b5187b4c5a90 100644 --- a/src/hotspot/share/classfile/fieldLayoutBuilder.hpp +++ b/src/hotspot/share/classfile/fieldLayoutBuilder.hpp @@ -246,11 +246,6 @@ class FieldLayoutBuilder : public ResourceObj { FieldLayoutBuilder(const Symbol* classname, const InstanceKlass* super_klass, ConstantPool* constant_pool, GrowableArray* field_info, bool is_contended, FieldLayoutInfo* info); - int get_alignment() { - assert(_alignment != -1, "Uninitialized"); - return _alignment; - } - void build_layout(); void compute_regular_layout(); void insert_contended_padding(LayoutRawBlock* slot); diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp index e3bb453ae0ae4..4d4332df0f162 100644 --- a/src/hotspot/share/classfile/javaClasses.hpp +++ b/src/hotspot/share/classfile/javaClasses.hpp @@ -1114,7 +1114,6 @@ class jdk_internal_foreign_abi_NativeEntryPoint: AllStatic { static bool is_instance(oop obj); // Accessors for code generation: - static int method_type_offset_in_bytes() { return _method_type_offset; } static int downcall_stub_address_offset_in_bytes() { return _downcall_stub_address_offset; } }; diff --git a/src/hotspot/share/classfile/placeholders.hpp b/src/hotspot/share/classfile/placeholders.hpp index 7f83cf5d058b9..30e82be46c897 100644 --- a/src/hotspot/share/classfile/placeholders.hpp +++ b/src/hotspot/share/classfile/placeholders.hpp @@ -100,13 +100,10 @@ class PlaceholderEntry { bool remove_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action); SeenThread* superThreadQ() const { return _superThreadQ; } - void set_superThreadQ(SeenThread* SeenThread) { _superThreadQ = SeenThread; } SeenThread* loadInstanceThreadQ() const { return _loadInstanceThreadQ; } - void set_loadInstanceThreadQ(SeenThread* SeenThread) { _loadInstanceThreadQ = SeenThread; } SeenThread* defineThreadQ() const { return _defineThreadQ; } - void set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; } public: PlaceholderEntry() : _definer(nullptr), _instanceKlass(nullptr), @@ -129,10 +126,6 @@ class PlaceholderEntry { return (_loadInstanceThreadQ != nullptr); } - bool define_class_in_progress() { - return (_defineThreadQ != nullptr); - } - // Used for ClassCircularityError checking bool check_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action); diff --git a/src/hotspot/share/classfile/stackMapFrame.hpp b/src/hotspot/share/classfile/stackMapFrame.hpp index 5958154dc5026..b043647856cf5 100644 --- a/src/hotspot/share/classfile/stackMapFrame.hpp +++ b/src/hotspot/share/classfile/stackMapFrame.hpp @@ -120,7 +120,6 @@ class StackMapFrame : public ResourceObj { } inline void set_offset(int32_t offset) { _offset = offset; } - inline void set_verifier(ClassVerifier* v) { _verifier = v; } inline void set_flags(u1 flags) { _flags = flags; } inline void set_locals_size(int32_t locals_size) { _locals_size = locals_size; } inline void set_stack_size(int32_t stack_size) { _stack_size = _stack_mark = stack_size; } diff --git a/src/hotspot/share/classfile/stackMapTableFormat.hpp b/src/hotspot/share/classfile/stackMapTableFormat.hpp index 2b89c53278a5c..22c7308dd8f60 100644 --- a/src/hotspot/share/classfile/stackMapTableFormat.hpp +++ b/src/hotspot/share/classfile/stackMapTableFormat.hpp @@ -60,20 +60,6 @@ class verification_type_info { return vti; } - static verification_type_info* create_object_at(address addr, u2 cp_idx) { - verification_type_info* vti = (verification_type_info*)addr; - vti->set_tag(ITEM_Object); - vti->set_cpool_index(cp_idx); - return vti; - } - - static verification_type_info* create_uninit_at(address addr, u2 bci) { - verification_type_info* vti = (verification_type_info*)addr; - vti->set_tag(ITEM_Uninitialized); - vti->set_bci(bci); - return vti; - } - static size_t calculate_size(u1 tag) { if (tag == ITEM_Object || tag == ITEM_Uninitialized) { return sizeof(u1) + sizeof(u2); @@ -921,10 +907,6 @@ class stack_map_table { stack_map_frame* entries() const { return stack_map_frame::at(entries_addr()); } - - void set_number_of_entries(u2 num) { - Bytes::put_Java_u2(number_of_entries_addr(), num); - } }; class stack_map_table_attribute { @@ -958,9 +940,6 @@ class stack_map_table_attribute { void set_name_index(u2 idx) { Bytes::put_Java_u2(name_index_addr(), idx); } - void set_attribute_length(u4 len) { - Bytes::put_Java_u4(attribute_length_addr(), len); - } }; #undef FOR_EACH_STACKMAP_FRAME_TYPE diff --git a/src/hotspot/share/classfile/verificationType.hpp b/src/hotspot/share/classfile/verificationType.hpp index 4f0609f0cce28..425779ca6f236 100644 --- a/src/hotspot/share/classfile/verificationType.hpp +++ b/src/hotspot/share/classfile/verificationType.hpp @@ -151,8 +151,6 @@ class VerificationType { { return VerificationType(Category1Query); } static VerificationType category2_check() { return VerificationType(Category2Query); } - static VerificationType category2_2nd_check() - { return VerificationType(Category2_2ndQuery); } // For reference types, store the actual Symbol static VerificationType reference_type(Symbol* sh) { @@ -172,7 +170,6 @@ class VerificationType { bool is_bogus() const { return (_u._data == Bogus); } bool is_null() const { return (_u._data == Null); } - bool is_boolean() const { return (_u._data == Boolean); } bool is_byte() const { return (_u._data == Byte); } bool is_char() const { return (_u._data == Char); } bool is_short() const { return (_u._data == Short); } @@ -199,10 +196,6 @@ class VerificationType { bool is_category2_2nd() const { return ((_u._data & Category2_2nd) == Category2_2nd); } - bool is_reference_check() const { return _u._data == ReferenceQuery; } - bool is_category1_check() const { return _u._data == Category1Query; } - bool is_category2_check() const { return _u._data == Category2Query; } - bool is_category2_2nd_check() const { return _u._data == Category2_2ndQuery; } bool is_check() const { return (_u._data & TypeQuery) == TypeQuery; } bool is_x_array(char sig) const { diff --git a/src/hotspot/share/classfile/verifier.hpp b/src/hotspot/share/classfile/verifier.hpp index 8065620c8fdb1..ed851f76d8036 100644 --- a/src/hotspot/share/classfile/verifier.hpp +++ b/src/hotspot/share/classfile/verifier.hpp @@ -263,10 +263,6 @@ class sig_as_verification_types : public ResourceObj { void set_num_args(int num_args) { _num_args = num_args; } GrowableArray* sig_verif_types() { return _sig_verif_types; } - void set_sig_verif_types(GrowableArray* sig_verif_types) { - _sig_verif_types = sig_verif_types; - } - }; // This hashtable is indexed by the Utf8 constant pool indexes pointed to diff --git a/src/hotspot/share/code/codeCache.hpp b/src/hotspot/share/code/codeCache.hpp index 8fcbf32b64484..8d06febd82553 100644 --- a/src/hotspot/share/code/codeCache.hpp +++ b/src/hotspot/share/code/codeCache.hpp @@ -341,9 +341,6 @@ template class CodeBlobIterator : publi GrowableArrayIterator _end; bool _not_unloading; // Those nmethods that are not unloading - void initialize_iteration(T* nm) { - } - bool next_impl() { for (;;) { // Walk through heaps as required diff --git a/src/hotspot/share/code/compressedStream.hpp b/src/hotspot/share/code/compressedStream.hpp index f2e946e8b509a..85b4f5996440a 100644 --- a/src/hotspot/share/code/compressedStream.hpp +++ b/src/hotspot/share/code/compressedStream.hpp @@ -61,7 +61,6 @@ class CompressedReadStream : public CompressedStream { jboolean read_bool() { return (jboolean) read(); } jbyte read_byte() { return (jbyte ) read(); } - jchar read_char() { return (jchar ) read_int(); } jshort read_short() { return (jshort ) read_signed_int(); } jint read_signed_int(); jfloat read_float(); // jfloat_cast(reverse_bits(read_int())) @@ -98,8 +97,6 @@ class CompressedWriteStream : public CompressedStream { void write_bool(jboolean value) { write(value); } void write_byte(jbyte value) { write(value); } - void write_char(jchar value) { write_int(value); } - void write_short(jshort value) { write_signed_int(value); } void write_signed_int(jint value) { write_int(UNSIGNED5::encode_sign(value)); } void write_float(jfloat value); // write_int(reverse_bits(jint_cast(v))) void write_double(jdouble value); // write_int(reverse_bits()) diff --git a/src/hotspot/share/code/debugInfo.hpp b/src/hotspot/share/code/debugInfo.hpp index 6aba5b67cb650..5becaea9a2a8f 100644 --- a/src/hotspot/share/code/debugInfo.hpp +++ b/src/hotspot/share/code/debugInfo.hpp @@ -166,7 +166,6 @@ class ObjectValue: public ScopeValue { void set_id(int id) { _id = id; } virtual void set_value(oop value); void set_visited(bool visited) { _visited = visited; } - void set_is_scalar_replaced(bool scd) { _is_scalar_replaced = scd; } void set_root(bool root) { _is_root = root; } // Serialization of debugging information diff --git a/src/hotspot/share/code/dependencies.hpp b/src/hotspot/share/code/dependencies.hpp index 124db0b136933..985ee1d53cf25 100644 --- a/src/hotspot/share/code/dependencies.hpp +++ b/src/hotspot/share/code/dependencies.hpp @@ -323,9 +323,6 @@ class Dependencies: public ResourceObj { static void check_ctxk(ciKlass* ctxk) { assert(ctxk->is_instance_klass(), "java types only"); } - static void check_ctxk_concrete(ciKlass* ctxk) { - assert(is_concrete_klass(ctxk->as_instance_klass()), "must be concrete"); - } static void check_ctxk_abstract(ciKlass* ctxk) { check_ctxk(ctxk); assert(!is_concrete_klass(ctxk->as_instance_klass()), "must be abstract"); diff --git a/src/hotspot/share/code/nmethod.hpp b/src/hotspot/share/code/nmethod.hpp index 9972b89ae4026..2cd26c514f038 100644 --- a/src/hotspot/share/code/nmethod.hpp +++ b/src/hotspot/share/code/nmethod.hpp @@ -352,7 +352,6 @@ class nmethod : public CodeBlob { // Returns true if this thread changed the state of the nmethod or // false if another thread performed the transition. - bool make_entrant() { Unimplemented(); return false; } void inc_decompile_count(); // Inform external interfaces that a compiled method has been unloaded @@ -593,19 +592,12 @@ class nmethod : public CodeBlob { int skipped_instructions_size () const { return _skipped_instructions_size; } int total_size() const; - // Containment - bool consts_contains (address addr) const { return consts_begin () <= addr && addr < consts_end (); } // Returns true if a given address is in the 'insts' section. The method // insts_contains_inclusive() is end-inclusive. bool insts_contains (address addr) const { return insts_begin () <= addr && addr < insts_end (); } bool insts_contains_inclusive(address addr) const { return insts_begin () <= addr && addr <= insts_end (); } bool stub_contains (address addr) const { return stub_begin () <= addr && addr < stub_end (); } bool oops_contains (oop* addr) const { return oops_begin () <= addr && addr < oops_end (); } - bool metadata_contains (Metadata** addr) const { return metadata_begin () <= addr && addr < metadata_end (); } - bool scopes_data_contains (address addr) const { return scopes_data_begin () <= addr && addr < scopes_data_end (); } - bool scopes_pcs_contains (PcDesc* addr) const { return scopes_pcs_begin () <= addr && addr < scopes_pcs_end (); } - bool handler_table_contains (address addr) const { return handler_table_begin() <= addr && addr < handler_table_end(); } - bool nul_chk_table_contains (address addr) const { return nul_chk_table_begin() <= addr && addr < nul_chk_table_end(); } // entry points address entry_point() const { return code_begin() + _entry_offset; } // normal entry point diff --git a/src/hotspot/share/code/vmreg.hpp b/src/hotspot/share/code/vmreg.hpp index 41e40e9a0178e..cbcf25cc71728 100644 --- a/src/hotspot/share/code/vmreg.hpp +++ b/src/hotspot/share/code/vmreg.hpp @@ -191,16 +191,6 @@ class VMRegPair { return (_first->is_valid()) && (_first->value() + 1 == _second->value()); } - // Return true if single stack based "register" where the slot alignment matches input alignment - bool is_adjacent_on_stack(int alignment) const { - return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); - } - - // Return true if single stack based "register" where the slot alignment matches input alignment - bool is_adjacent_aligned_on_stack(int alignment) const { - return (_first->is_stack() && (_first->value() + 1 == _second->value()) && ((_first->value() & (alignment-1)) == 0)); - } - // Return true if single register but adjacent stack slots do not count bool is_single_phys_reg() const { return (_first->is_reg() && (_first->value() + 1 == _second->value())); diff --git a/src/hotspot/share/code/vtableStubs.hpp b/src/hotspot/share/code/vtableStubs.hpp index 3993e1e72d5cf..d7fa7a54cdb05 100644 --- a/src/hotspot/share/code/vtableStubs.hpp +++ b/src/hotspot/share/code/vtableStubs.hpp @@ -172,7 +172,6 @@ class VtableStub { public: // Query - bool is_itable_stub() { return !_is_vtable_stub; } bool is_vtable_stub() { return _is_vtable_stub; } bool is_abstract_method_error(address epc) { return epc == code_begin()+_ame_offset; } bool is_null_pointer_exception(address epc) { return epc == code_begin()+_npe_offset; } diff --git a/src/hotspot/share/compiler/compileBroker.hpp b/src/hotspot/share/compiler/compileBroker.hpp index 71a9c9dd6bbb0..901fe80899075 100644 --- a/src/hotspot/share/compiler/compileBroker.hpp +++ b/src/hotspot/share/compiler/compileBroker.hpp @@ -415,7 +415,6 @@ class CompileBroker: AllStatic { static int get_total_compile_count() { return _total_compile_count; } static int get_total_bailout_count() { return _total_bailout_count; } static int get_total_invalidated_count() { return _total_invalidated_count; } - static int get_total_native_compile_count() { return _total_native_compile_count; } static int get_total_osr_compile_count() { return _total_osr_compile_count; } static int get_total_standard_compile_count() { return _total_standard_compile_count; } static int get_total_compiler_stopped_count() { return _total_compiler_stopped_count; } diff --git a/src/hotspot/share/compiler/compilerDefinitions.hpp b/src/hotspot/share/compiler/compilerDefinitions.hpp index 9b69501a5986d..7d69986bfdd94 100644 --- a/src/hotspot/share/compiler/compilerDefinitions.hpp +++ b/src/hotspot/share/compiler/compilerDefinitions.hpp @@ -81,9 +81,7 @@ class CompilationModeFlag : AllStatic { static bool disable_intermediate() { return high_only() || high_only_quick_internal(); } static bool quick_internal() { return !high_only(); } - static void set_high_only_quick_internal() { _mode = Mode::HIGH_ONLY_QUICK_INTERNAL; } static void set_quick_only() { _mode = Mode::QUICK_ONLY; } - static void set_high_only() { _mode = Mode::HIGH_ONLY; } }; inline bool is_c1_compile(int comp_level) { diff --git a/src/hotspot/share/compiler/compilerOracle.cpp b/src/hotspot/share/compiler/compilerOracle.cpp index a81d60c9fc422..eafcde356c4ca 100644 --- a/src/hotspot/share/compiler/compilerOracle.cpp +++ b/src/hotspot/share/compiler/compilerOracle.cpp @@ -171,12 +171,6 @@ class TypedMethodOptionMatcher : public MethodMatcher { _option = option; } - void init_matcher(Symbol* class_name, Mode class_mode, - Symbol* method_name, Mode method_mode, - Symbol* signature) { - MethodMatcher::init(class_name, class_mode, method_name, method_mode, signature); - } - void set_next(TypedMethodOptionMatcher* next) {_next = next; } TypedMethodOptionMatcher* next() { return _next; } CompileCommandEnum option() { return _option; } diff --git a/src/hotspot/share/gc/g1/g1BiasedArray.hpp b/src/hotspot/share/gc/g1/g1BiasedArray.hpp index 67b4c6bbe3084..52b9ff9b5ca27 100644 --- a/src/hotspot/share/gc/g1/g1BiasedArray.hpp +++ b/src/hotspot/share/gc/g1/g1BiasedArray.hpp @@ -166,14 +166,6 @@ class G1BiasedMappedArray : public G1BiasedMappedArrayBase { } } -protected: - // Returns the address of the element the given address maps to - T* address_mapped_to(HeapWord* address) { - idx_t biased_index = ((uintptr_t)address) >> this->shift_by(); - this->verify_biased_index_inclusive_end(biased_index); - return biased_base() + biased_index; - } - public: // Return the smallest address (inclusive) in the heap that this array covers. HeapWord* bottom_address_mapped() const { diff --git a/src/hotspot/share/gc/g1/g1ConcurrentStartToMixedTimeTracker.hpp b/src/hotspot/share/gc/g1/g1ConcurrentStartToMixedTimeTracker.hpp index 57372e695c885..666a4065d9e2e 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentStartToMixedTimeTracker.hpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentStartToMixedTimeTracker.hpp @@ -39,9 +39,6 @@ class G1ConcurrentStartToMixedTimeTracker { double _mixed_start_time; double _total_pause_time; - double wall_time() const { - return _mixed_start_time - _concurrent_start_end_time; - } public: G1ConcurrentStartToMixedTimeTracker() { reset(); } diff --git a/src/hotspot/share/gc/g1/g1FullCollector.hpp b/src/hotspot/share/gc/g1/g1FullCollector.hpp index 11effe85993e9..ec3fda65e7425 100644 --- a/src/hotspot/share/gc/g1/g1FullCollector.hpp +++ b/src/hotspot/share/gc/g1/g1FullCollector.hpp @@ -115,7 +115,6 @@ class G1FullCollector : StackObj { G1FullGCCompactionPoint* compaction_point(uint id) { return _compaction_points[id]; } OopQueueSet* oop_queue_set() { return &_oop_queue_set; } ObjArrayTaskQueueSet* array_queue_set() { return &_array_queue_set; } - PreservedMarksSet* preserved_mark_set() { return &_preserved_marks_set; } G1FullGCCompactionPoint* serial_compaction_point() { return &_serial_compaction_point; } G1FullGCCompactionPoint* humongous_compaction_point() { return &_humongous_compaction_point; } G1CMBitMap* mark_bitmap(); diff --git a/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp b/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp index 2fc7d74f331f1..f8baaf820a2d2 100644 --- a/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp +++ b/src/hotspot/share/gc/g1/g1FullGCHeapRegionAttr.hpp @@ -78,8 +78,6 @@ class G1FullGCHeapRegionAttr : public G1BiasedMappedArray { void verify_is_compacting(uint idx) { assert(get_by_index(idx) == Compacting, "invariant"); } void verify_is_skip_compacting(uint idx) { assert(get_by_index(idx) == SkipCompacting, "invariant"); } - - void verify_is_invalid(uint idx) { assert(get_by_index(idx) == Invalid, "invariant"); } }; #endif // SHARE_GC_G1_G1FULLGCHEAPREGIONATTR_HPP diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp index 40abfd605339f..dad2b7d2c95c0 100644 --- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp +++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp @@ -370,10 +370,6 @@ class G1GCPhaseTimes : public CHeapObj { _cur_verify_after_time_ms = time_ms; } - void inc_external_accounted_time_ms(double time_ms) { - _external_accounted_time_ms += time_ms; - } - void record_prepare_heap_roots_time_ms(double recorded_prepare_heap_roots_time_ms) { _recorded_prepare_heap_roots_time_ms = recorded_prepare_heap_roots_time_ms; } diff --git a/src/hotspot/share/gc/g1/g1HeapRegion.hpp b/src/hotspot/share/gc/g1/g1HeapRegion.hpp index dc2c71bcbb450..b485bf36fb4eb 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegion.hpp +++ b/src/hotspot/share/gc/g1/g1HeapRegion.hpp @@ -420,7 +420,6 @@ class G1HeapRegion : public CHeapObj { // Unsets the humongous-related fields on the region. void clear_humongous(); - void set_rem_set(HeapRegionRemSet* rem_set) { _rem_set = rem_set; } // If the region has a remembered set, return a pointer to it. HeapRegionRemSet* rem_set() const { return _rem_set; diff --git a/src/hotspot/share/gc/g1/g1HeapRegionRemSet.hpp b/src/hotspot/share/gc/g1/g1HeapRegionRemSet.hpp index fb0a64ac0d18c..f95a2b6f4441a 100644 --- a/src/hotspot/share/gc/g1/g1HeapRegionRemSet.hpp +++ b/src/hotspot/share/gc/g1/g1HeapRegionRemSet.hpp @@ -177,10 +177,6 @@ class HeapRegionRemSet : public CHeapObj { } #ifndef PRODUCT - static void print_from_card_cache() { - G1FromCardCache::print(); - } - static void test(); #endif }; diff --git a/src/hotspot/share/gc/g1/g1MonotonicArena.hpp b/src/hotspot/share/gc/g1/g1MonotonicArena.hpp index bf46e4a33513a..da47122b47f82 100644 --- a/src/hotspot/share/gc/g1/g1MonotonicArena.hpp +++ b/src/hotspot/share/gc/g1/g1MonotonicArena.hpp @@ -81,8 +81,6 @@ class G1MonotonicArena : public FreeListConfig { DEBUG_ONLY(uint calculate_length() const;) public: - const Segment* first_segment() const { return Atomic::load(&_first); } - uint num_total_slots() const { return Atomic::load(&_num_total_slots); } uint num_allocated_slots() const { uint allocated = Atomic::load(&_num_allocated_slots); diff --git a/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp b/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp index e83813c78f48f..bca509d715e91 100644 --- a/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp +++ b/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp @@ -222,8 +222,6 @@ class GCAdaptivePolicyCounters : public GCPolicyCounters { ); } - void set_size_policy(AdaptiveSizePolicy* v) { _size_policy = v; } - virtual GCPolicyCounters::Name kind() const { return GCPolicyCounters::GCAdaptivePolicyCountersKind; } diff --git a/src/hotspot/share/gc/shared/cardTable.hpp b/src/hotspot/share/gc/shared/cardTable.hpp index ee41be06be0df..4c23f53a7138f 100644 --- a/src/hotspot/share/gc/shared/cardTable.hpp +++ b/src/hotspot/share/gc/shared/cardTable.hpp @@ -135,9 +135,6 @@ class CardTable: public CHeapObj { const CardValue* byte_for_const(const void* p) const { return byte_for(p); } - const CardValue* byte_after_const(const void* p) const { - return byte_after(p); - } // Mapping from card marking array entry to address of first word HeapWord* addr_for(const CardValue* p) const { diff --git a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp index 34db132ab83f9..2340b0910ca5c 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.hpp @@ -71,7 +71,6 @@ class ShenandoahCodeRoots : public AllStatic { static void arm_nmethods_for_evac(); static void disarm_nmethods(); static int disarmed_value() { return _disarmed_value; } - static int* disarmed_value_address() { return &_disarmed_value; } static bool use_nmethod_barriers_for_mark(); diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp index e2852e5548cf3..f24c4e7049358 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp @@ -195,16 +195,6 @@ class ShenandoahRegionPartitions { return _capacity[int(which_partition)] - _used[int(which_partition)]; } - inline void set_capacity_of(ShenandoahFreeSetPartitionId which_partition, size_t value) { - assert (which_partition < NumPartitions, "selected free set must be valid"); - _capacity[int(which_partition)] = value; - } - - inline void set_used_by(ShenandoahFreeSetPartitionId which_partition, size_t value) { - assert (which_partition < NumPartitions, "selected free set must be valid"); - _used[int(which_partition)] = value; - } - inline size_t count(ShenandoahFreeSetPartitionId which_partition) const { return _region_counts[int(which_partition)]; } // Assure leftmost, rightmost, leftmost_empty, and rightmost_empty bounds are valid for all free sets. diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp index c5763608582a1..e940f929f72d9 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp @@ -289,30 +289,12 @@ class ShenandoahHeapRegion { return ShenandoahHeapRegion::RegionSizeWordsMask; } - // Convert to jint with sanity checking - inline static jint region_size_bytes_jint() { - assert (ShenandoahHeapRegion::RegionSizeBytes <= (size_t)max_jint, "sanity"); - return (jint)ShenandoahHeapRegion::RegionSizeBytes; - } - - // Convert to jint with sanity checking - inline static jint region_size_words_jint() { - assert (ShenandoahHeapRegion::RegionSizeWords <= (size_t)max_jint, "sanity"); - return (jint)ShenandoahHeapRegion::RegionSizeWords; - } - // Convert to jint with sanity checking inline static jint region_size_bytes_shift_jint() { assert (ShenandoahHeapRegion::RegionSizeBytesShift <= (size_t)max_jint, "sanity"); return (jint)ShenandoahHeapRegion::RegionSizeBytesShift; } - // Convert to jint with sanity checking - inline static jint region_size_words_shift_jint() { - assert (ShenandoahHeapRegion::RegionSizeWordsShift <= (size_t)max_jint, "sanity"); - return (jint)ShenandoahHeapRegion::RegionSizeWordsShift; - } - inline static size_t humongous_threshold_bytes() { return ShenandoahHeapRegion::HumongousThresholdBytes; } diff --git a/src/hotspot/share/gc/z/zIndexDistributor.inline.hpp b/src/hotspot/share/gc/z/zIndexDistributor.inline.hpp index 172ba2505759d..9a0faec812f6c 100644 --- a/src/hotspot/share/gc/z/zIndexDistributor.inline.hpp +++ b/src/hotspot/share/gc/z/zIndexDistributor.inline.hpp @@ -169,19 +169,6 @@ class ZIndexDistributorClaimTree : public CHeapObj { return Atomic::fetch_then_add(&_claim_array[index], 1, memory_order_relaxed); } - int claim_at(int* indices, int level) { - const int index = claim_index(indices, level); - const int value = claim(index); -#if 0 - if (level == 0) { tty->print_cr("Claim at: %d index: %d got: %d", indices[0], index, value); } - else if (level == 1) { tty->print_cr("Claim at: %d %d index: %d got: %d", indices[0], indices[1], index, value); } - else if (level == 2) { tty->print_cr("Claim at: %d %d %d index: %d got: %d", indices[0], indices[1], indices[2], index, value); } - else if (level == 3) { tty->print_cr("Claim at: %d %d %d %d index: %d got: %d", indices[0], indices[1], indices[2], indices[3], index, value); } - else if (level == 4) { tty->print_cr("Claim at: %d %d %d %d %d index: %d got: %d", indices[0], indices[1], indices[2], indices[3], indices[4], index, value); } -#endif - return value; - } - template void claim_and_do(Function function, int* indices, int level) { if (level < N) { diff --git a/src/hotspot/share/interpreter/abstractInterpreter.hpp b/src/hotspot/share/interpreter/abstractInterpreter.hpp index e487b152b76ea..efc0625fa5341 100644 --- a/src/hotspot/share/interpreter/abstractInterpreter.hpp +++ b/src/hotspot/share/interpreter/abstractInterpreter.hpp @@ -261,32 +261,6 @@ class AbstractInterpreter: AllStatic { return ((frame::interpreter_frame_expression_stack_direction() * n) * stackElementSize); } - // access to stacked values according to type: - static oop* oop_addr_in_slot(intptr_t* slot_addr) { - return (oop*) slot_addr; - } - static jint* int_addr_in_slot(intptr_t* slot_addr) { - if ((int) sizeof(jint) < wordSize && !Endian::is_Java_byte_ordering_different()) - // big-endian LP64 - return (jint*)(slot_addr + 1) - 1; - else - return (jint*) slot_addr; - } - static jlong long_in_slot(intptr_t* slot_addr) { - if (sizeof(intptr_t) >= sizeof(jlong)) { - return *(jlong*) slot_addr; - } else { - return Bytes::get_native_u8((address)slot_addr); - } - } - static void set_long_in_slot(intptr_t* slot_addr, jlong value) { - if (sizeof(intptr_t) >= sizeof(jlong)) { - *(jlong*) slot_addr = value; - } else { - Bytes::put_native_u8((address)slot_addr, value); - } - } - static void initialize_method_handle_entries(); }; diff --git a/src/hotspot/share/interpreter/bytecode.hpp b/src/hotspot/share/interpreter/bytecode.hpp index 870fcb7784ec7..af18d391a5453 100644 --- a/src/hotspot/share/interpreter/bytecode.hpp +++ b/src/hotspot/share/interpreter/bytecode.hpp @@ -49,11 +49,8 @@ class Bytecode: public StackObj { address aligned_addr_at (int offset) const { return align_up(addr_at(offset), jintSize); } // Word access: - int get_Java_u2_at (int offset) const { return Bytes::get_Java_u2(addr_at(offset)); } int get_Java_u4_at (int offset) const { return Bytes::get_Java_u4(addr_at(offset)); } int get_aligned_Java_u4_at(int offset) const { return Bytes::get_Java_u4(aligned_addr_at(offset)); } - int get_native_u2_at (int offset) const { return Bytes::get_native_u2(addr_at(offset)); } - int get_native_u4_at (int offset) const { return Bytes::get_native_u4(addr_at(offset)); } public: Bytecode(Method* method, address bcp): _bcp(bcp), _code(Bytecodes::code_at(method, addr_at(0))) { diff --git a/src/hotspot/share/interpreter/bytecodeStream.hpp b/src/hotspot/share/interpreter/bytecodeStream.hpp index de012de6e3e20..69e1b34fe4d82 100644 --- a/src/hotspot/share/interpreter/bytecodeStream.hpp +++ b/src/hotspot/share/interpreter/bytecodeStream.hpp @@ -96,9 +96,6 @@ class BaseBytecodeStream: StackObj { address bcp() const { return method()->code_base() + _bci; } Bytecode bytecode() const { return Bytecode(_method(), bcp()); } - // State changes - void set_next_bci(int bci) { assert(0 <= bci && bci <= method()->code_size(), "illegal bci"); _next_bci = bci; } - // Bytecode-specific attributes int dest() const { return bci() + bytecode().get_offset_s2(raw_code()); } int dest_w() const { return bci() + bytecode().get_offset_s4(raw_code()); } diff --git a/src/hotspot/share/interpreter/bytecodeTracer.cpp b/src/hotspot/share/interpreter/bytecodeTracer.cpp index e5a3e9c16f4a1..11a1b815c097b 100644 --- a/src/hotspot/share/interpreter/bytecodeTracer.cpp +++ b/src/hotspot/share/interpreter/bytecodeTracer.cpp @@ -68,7 +68,6 @@ class BytecodePrinter { int get_native_index_u2() { int i = Bytes::get_native_u2(_next_pc); _next_pc += 2; return i; } int get_native_index_u4() { int i = Bytes::get_native_u4(_next_pc); _next_pc += 4; return i; } int get_Java_index_u2() { int i = Bytes::get_Java_u2 (_next_pc); _next_pc += 2; return i; } - int get_Java_index_u4() { int i = Bytes::get_Java_u4 (_next_pc); _next_pc += 4; return i; } int get_index_special() { return (is_wide()) ? get_Java_index_u2() : get_index_u1(); } Method* method() const { return _current_method; } bool is_wide() const { return _is_wide; } diff --git a/src/hotspot/share/interpreter/bytecodes.hpp b/src/hotspot/share/interpreter/bytecodes.hpp index 629cca706aeb4..5bd2e5663c8a3 100644 --- a/src/hotspot/share/interpreter/bytecodes.hpp +++ b/src/hotspot/share/interpreter/bytecodes.hpp @@ -419,7 +419,6 @@ class Bytecodes: AllStatic { || code == _fconst_0 || code == _dconst_0); } static bool is_return (Code code) { return (_ireturn <= code && code <= _return); } static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); } - static bool is_field_code (Code code) { return (_getstatic <= java_code(code) && java_code(code) <= _putfield); } static bool has_receiver (Code code) { assert(is_invoke(code), ""); return code == _invokevirtual || code == _invokespecial || code == _invokeinterface; } diff --git a/src/hotspot/share/interpreter/rewriter.hpp b/src/hotspot/share/interpreter/rewriter.hpp index b5a4ad4870f5d..92e8e7db53467 100644 --- a/src/hotspot/share/interpreter/rewriter.hpp +++ b/src/hotspot/share/interpreter/rewriter.hpp @@ -78,9 +78,6 @@ class Rewriter: public StackObj { _resolved_reference_limit = _resolved_references_map.length(); } - int cp_entry_to_cp_cache(int i) { assert(has_cp_cache(i), "oob"); return _cp_map.at(i); } - bool has_cp_cache(int i) { return (uint) i < (uint) _cp_map.length() && _cp_map.at(i) >= 0; } - int add_map_entry(int cp_index, GrowableArray* cp_map, GrowableArray* cp_cache_map) { assert(cp_map->at(cp_index) == -1, "not twice on same cp_index"); int cache_index = cp_cache_map->append(cp_index); diff --git a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.hpp b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.hpp index 9941055bfd418..97e0df510cc2d 100644 --- a/src/hotspot/share/interpreter/zero/bytecodeInterpreter.hpp +++ b/src/hotspot/share/interpreter/zero/bytecodeInterpreter.hpp @@ -193,8 +193,6 @@ inline void set_msg(messages new_msg) { _msg = new_msg; } inline Method* callee() { return _result._to_call._callee; } inline void set_callee(Method* new_callee) { _result._to_call._callee = new_callee; } inline void set_callee_entry_point(address entry) { _result._to_call._callee_entry_point = entry; } -inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } -inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } inline int bcp_advance() { return _result._to_call._bcp_advance; } inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } diff --git a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp index b74a07c23c2e0..a8869b73ba1d9 100644 --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp @@ -84,10 +84,6 @@ class JfrTraceIdEpoch : AllStatic { return _generation; } - static bool is_current_epoch_generation(u2 generation) { - return _generation == generation; - } - static u1 previous() { return _epoch_state ? (u1)0 : (u1)1; } diff --git a/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp b/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp index 4b08ea6b1354e..362117dd3f2ab 100644 --- a/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp +++ b/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp @@ -113,11 +113,6 @@ class JfrChunkHeadWriter : public StackObj { _writer->be_write(PAD); } - void write_guard_flush() { - write_guard(); - _writer->flush(); - } - void write_flags() { _writer->be_write(_chunk->flags()); } diff --git a/src/hotspot/share/jfr/recorder/service/jfrEvent.hpp b/src/hotspot/share/jfr/recorder/service/jfrEvent.hpp index 62e960cef5e0a..04c198b018dcc 100644 --- a/src/hotspot/share/jfr/recorder/service/jfrEvent.hpp +++ b/src/hotspot/share/jfr/recorder/service/jfrEvent.hpp @@ -122,10 +122,6 @@ class JfrEvent { return T::isInstant; } - static bool is_requestable() { - return T::isRequestable; - } - static bool has_thread() { return T::hasThread; } diff --git a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.hpp b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.hpp index 8b2ca022443fe..2b9f2e2925524 100644 --- a/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.hpp +++ b/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTrace.hpp @@ -88,9 +88,7 @@ class JfrStackTrace : public JfrCHeapObj { bool equals(const JfrStackTrace& rhs) const; void set_id(traceid id) { _id = id; } - void set_nr_of_frames(u4 nr_of_frames) { _nr_of_frames = nr_of_frames; } void set_hash(unsigned int hash) { _hash = hash; } - void set_reached_root(bool reached_root) { _reached_root = reached_root; } void resolve_linenos() const; bool record(JavaThread* current_thread, int skip, int64_t stack_frame_id); @@ -98,7 +96,6 @@ class JfrStackTrace : public JfrCHeapObj { bool record_async(JavaThread* other_thread, const frame& frame); bool have_lineno() const { return _lineno; } - bool full_stacktrace() const { return _reached_root; } JfrStackTrace(traceid id, const JfrStackTrace& trace, const JfrStackTrace* next); JfrStackTrace(JfrStackFrame* frames, u4 max_frames); diff --git a/src/hotspot/share/jfr/support/jfrThreadLocal.hpp b/src/hotspot/share/jfr/support/jfrThreadLocal.hpp index 73ff226c826db..c4ef6e301bf59 100644 --- a/src/hotspot/share/jfr/support/jfrThreadLocal.hpp +++ b/src/hotspot/share/jfr/support/jfrThreadLocal.hpp @@ -141,10 +141,6 @@ class JfrThreadLocal { return _stackframes != nullptr ? _stackframes : install_stackframes(); } - void set_stackframes(JfrStackFrame* frames) { - _stackframes = frames; - } - u4 stackdepth() const; void set_stackdepth(u4 depth) { diff --git a/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp b/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp index 98fed480bf1d7..b31715ea03769 100644 --- a/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp +++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp @@ -347,8 +347,6 @@ class CodeInstaller : public StackObj { static bool is_general_purpose_reg(VMReg hotspotRegister); static ScopeValue* to_primitive_value(HotSpotCompiledCodeStream* stream, jlong raw, BasicType type, ScopeValue* &second, JVMCI_TRAPS); - const OopMapSet* oopMapSet() const { return _debug_recorder->_oopmaps; } - // Gets the tag to be used with `read_oop()` corresponding to `patch_object_tag`. static u1 as_read_oop_tag(HotSpotCompiledCodeStream* stream, u1 patch_object_tag, JVMCI_TRAPS); diff --git a/src/hotspot/share/jvmci/jvmciCompiler.hpp b/src/hotspot/share/jvmci/jvmciCompiler.hpp index bdb50cfc26a89..7fd1cac09e149 100644 --- a/src/hotspot/share/jvmci/jvmciCompiler.hpp +++ b/src/hotspot/share/jvmci/jvmciCompiler.hpp @@ -105,9 +105,6 @@ class JVMCICompiler : public AbstractCompiler { virtual bool is_hidden_from_external_view() const { return UseJVMCINativeLibrary && LibJVMCICompilerThreadHidden; } - - bool needs_stubs () { return false; } - // Initialization virtual void initialize(); diff --git a/src/hotspot/share/jvmci/jvmciObject.hpp b/src/hotspot/share/jvmci/jvmciObject.hpp index 44efb5bfcf33a..636e915be2b9e 100644 --- a/src/hotspot/share/jvmci/jvmciObject.hpp +++ b/src/hotspot/share/jvmci/jvmciObject.hpp @@ -43,7 +43,6 @@ class JVMCIObject { static JVMCIObject create(jobject o, bool is_hotspot) { JVMCIObject r(o, is_hotspot); return r; } jobject as_jobject() { return _object; } - jobject as_jweak() { return (jweak) _object; } jstring as_jstring() { return (jstring) _object; } bool is_hotspot() { return _is_hotspot; } @@ -79,12 +78,8 @@ class JVMCIPrimitiveArray : public JVMCIArray { jbooleanArray as_jbooleanArray() { return (jbooleanArray) as_jobject(); } jbyteArray as_jbyteArray() { return (jbyteArray) as_jobject(); } - jcharArray as_jcharArray() { return (jcharArray) as_jobject(); } - jshortArray as_jshortArray() { return (jshortArray) as_jobject(); } jintArray as_jintArray() { return (jintArray) as_jobject(); } - jfloatArray as_jfloatArray() { return (jfloatArray) as_jobject(); } jlongArray as_jlongArray() { return (jlongArray) as_jobject(); } - jdoubleArray as_jdoubleArray() { return (jdoubleArray) as_jobject(); } }; inline JVMCIObject::operator JVMCIArray() { return JVMCIArray(_object, _is_hotspot); } diff --git a/src/hotspot/share/logging/logDecorations.cpp b/src/hotspot/share/logging/logDecorations.cpp index 058bd7ab2aad0..7a696a8e637b2 100644 --- a/src/hotspot/share/logging/logDecorations.cpp +++ b/src/hotspot/share/logging/logDecorations.cpp @@ -140,4 +140,4 @@ void LogDecorations::print_tags_decoration(outputStream* st) const { void LogDecorations::print_hostname_decoration(outputStream* st) const { st->print_raw(host_name()); -} +} \ No newline at end of file diff --git a/src/hotspot/share/memory/heapInspection.hpp b/src/hotspot/share/memory/heapInspection.hpp index 7c4848030c672..1acb1852dec02 100644 --- a/src/hotspot/share/memory/heapInspection.hpp +++ b/src/hotspot/share/memory/heapInspection.hpp @@ -172,16 +172,6 @@ class KlassInfoHisto : public StackObj { return w; } - static int col_width(julong n, const char *name) { - int w = julong_width(n); - int min = (int)(strlen(name)); - if (w < min) { - w = min; - } - // add a leading space for separation. - return w + 1; - } - public: KlassInfoHisto(KlassInfoTable* cit); ~KlassInfoHisto(); diff --git a/src/hotspot/share/memory/metaspaceStats.hpp b/src/hotspot/share/memory/metaspaceStats.hpp index 33040b361a8a6..bed6e4459726b 100644 --- a/src/hotspot/share/memory/metaspaceStats.hpp +++ b/src/hotspot/share/memory/metaspaceStats.hpp @@ -67,10 +67,8 @@ class MetaspaceCombinedStats : public MetaspaceStats { const MetaspaceStats& non_class_space_stats() const { return _ncstats; } size_t class_used() const { return _cstats.used(); } size_t class_committed() const { return _cstats.committed(); } - size_t class_reserved() const { return _cstats.reserved(); } size_t non_class_used() const { return _ncstats.used(); } size_t non_class_committed() const { return _ncstats.committed(); } - size_t non_class_reserved() const { return _ncstats.reserved(); } }; #endif // SHARE_MEMORY_METASPACESTATS_HPP diff --git a/src/hotspot/share/memory/metaspaceUtils.hpp b/src/hotspot/share/memory/metaspaceUtils.hpp index 524e417827ad1..ada183dea7ae3 100644 --- a/src/hotspot/share/memory/metaspaceUtils.hpp +++ b/src/hotspot/share/memory/metaspaceUtils.hpp @@ -65,7 +65,6 @@ class MetaspaceGC : public AllStatic { static uint _shrink_factor; static size_t shrink_factor() { return _shrink_factor; } - void set_shrink_factor(uint v) { _shrink_factor = v; } public: diff --git a/src/hotspot/share/nmt/memBaseline.hpp b/src/hotspot/share/nmt/memBaseline.hpp index 903f558051103..990b6254a1959 100644 --- a/src/hotspot/share/nmt/memBaseline.hpp +++ b/src/hotspot/share/nmt/memBaseline.hpp @@ -133,11 +133,6 @@ class MemBaseline { return amount; } - size_t total_arena_memory() const { - assert(baseline_type() != Not_baselined, "Not yet baselined"); - return _malloc_memory_snapshot.total_arena(); - } - size_t malloc_tracking_overhead() const { assert(baseline_type() != Not_baselined, "Not yet baselined"); MemBaseline* bl = const_cast(this); diff --git a/src/hotspot/share/oops/constantPool.hpp b/src/hotspot/share/oops/constantPool.hpp index e48229749f387..cdcece8f428cb 100644 --- a/src/hotspot/share/oops/constantPool.hpp +++ b/src/hotspot/share/oops/constantPool.hpp @@ -218,7 +218,6 @@ class ConstantPool : public Metadata { // Klass holding pool InstanceKlass* pool_holder() const { return _pool_holder; } void set_pool_holder(InstanceKlass* k) { _pool_holder = k; } - InstanceKlass** pool_holder_addr() { return &_pool_holder; } // Interpreter runtime support ConstantPoolCache* cache() const { return _cache; } diff --git a/src/hotspot/share/oops/cpCache.hpp b/src/hotspot/share/oops/cpCache.hpp index f92398351987f..64e1b5c13a879 100644 --- a/src/hotspot/share/oops/cpCache.hpp +++ b/src/hotspot/share/oops/cpCache.hpp @@ -199,12 +199,6 @@ class ConstantPoolCache: public MetaspaceObj { public: static int size() { return align_metadata_size(sizeof(ConstantPoolCache) / wordSize); } - private: - - // Helpers - ConstantPool** constant_pool_addr() { return &_constant_pool; } - - public: // Accessors void set_constant_pool(ConstantPool* pool) { _constant_pool = pool; } ConstantPool* constant_pool() const { return _constant_pool; } diff --git a/src/hotspot/share/oops/fieldInfo.hpp b/src/hotspot/share/oops/fieldInfo.hpp index d2fd79332a900..71f440c2f5af4 100644 --- a/src/hotspot/share/oops/fieldInfo.hpp +++ b/src/hotspot/share/oops/fieldInfo.hpp @@ -191,10 +191,6 @@ class FieldInfo { _contention_group = group; } - bool is_offset_set() const { - return _offset != 0; - } - inline Symbol* name(ConstantPool* cp) const; inline Symbol* signature(ConstantPool* cp) const; @@ -215,7 +211,6 @@ class Mapper { public: Mapper(CON* consumer) : _consumer(consumer) { _next_index = 0; } int next_index() const { return _next_index; } - void set_next_index(int next_index) { _next_index = next_index; } CON* consumer() const { return _consumer; } void map_field_info(const FieldInfo& fi); }; diff --git a/src/hotspot/share/oops/generateOopMap.hpp b/src/hotspot/share/oops/generateOopMap.hpp index 0da3779d463cc..cc2c3722d0bfc 100644 --- a/src/hotspot/share/oops/generateOopMap.hpp +++ b/src/hotspot/share/oops/generateOopMap.hpp @@ -447,7 +447,6 @@ class GenerateOopMap { void compute_ret_adr_at_TOS (); void update_ret_adr_at_TOS (int bci, int delta); - int binsToHold (int no) { return ((no+(BitsPerWord-1))/BitsPerWord); } char *state_vec_to_string (CellTypeState* vec, int len); // Helper method. Can be used in subclasses to fx. calculate gc_points. If the current instruction @@ -469,7 +468,6 @@ class GenerateOopMap { // Query int max_locals() const { return _max_locals; } Method* method() const { return _method(); } - methodHandle method_as_handle() const { return _method; } bool did_rewriting() { return _did_rewriting; } bool did_relocation() { return _did_relocation; } diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp index 27c97e38b62c2..26bf30ffebe67 100644 --- a/src/hotspot/share/oops/instanceKlass.hpp +++ b/src/hotspot/share/oops/instanceKlass.hpp @@ -334,14 +334,12 @@ class InstanceKlass: public Klass { void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; } int static_field_size() const { return _static_field_size; } - void set_static_field_size(int size) { _static_field_size = size; } int static_oop_field_count() const { return (int)_static_oop_field_count; } void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; } // Java itable int itable_length() const { return _itable_len; } - void set_itable_length(int len) { _itable_len = len; } // array klasses ObjArrayKlass* array_klasses() const { return _array_klasses; } @@ -679,9 +677,6 @@ class InstanceKlass: public Klass { return _nonstatic_oop_map_size / OopMapBlock::size_in_words(); } int nonstatic_oop_map_size() const { return _nonstatic_oop_map_size; } - void set_nonstatic_oop_map_size(int words) { - _nonstatic_oop_map_size = words; - } bool has_contended_annotations() const { return _misc_flags.has_contended_annotations(); } void set_has_contended_annotations(bool value) { _misc_flags.set_has_contended_annotations(value); } @@ -717,10 +712,6 @@ class InstanceKlass: public Klass { public: #if INCLUDE_JVMTI - void init_previous_versions() { - _previous_versions = nullptr; - } - private: static bool _should_clean_previous_versions; public: @@ -833,7 +824,6 @@ class InstanceKlass: public Klass { // OopMapCache support OopMapCache* oop_map_cache() { return _oop_map_cache; } - void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; } void mask_for(const methodHandle& method, int bci, InterpreterOopMap* entry); // JNI identifier support (for static fields - for jni performance) diff --git a/src/hotspot/share/oops/klass.hpp b/src/hotspot/share/oops/klass.hpp index 2923235e2f3d2..7478efecb2cec 100644 --- a/src/hotspot/share/oops/klass.hpp +++ b/src/hotspot/share/oops/klass.hpp @@ -342,9 +342,6 @@ class Klass : public Metadata { void set_has_value_based_class_annotation() { CDS_ONLY(_shared_class_flags |= _has_value_based_class_annotation;) } - void clear_has_value_based_class_annotation() { - CDS_ONLY(_shared_class_flags &= (u2)(~_has_value_based_class_annotation);) - } bool has_value_based_class_annotation() const { CDS_ONLY(return (_shared_class_flags & _has_value_based_class_annotation) != 0;) NOT_CDS(return false;) @@ -671,7 +668,6 @@ class Klass : public Metadata { bool is_instance_klass() const { return assert_same_query(_kind <= InstanceStackChunkKlassKind, is_instance_klass_slow()); } // Other is anything that is not one of the more specialized kinds of InstanceKlass. - bool is_other_instance_klass() const { return _kind == InstanceKlassKind; } bool is_reference_instance_klass() const { return _kind == InstanceRefKlassKind; } bool is_mirror_instance_klass() const { return _kind == InstanceMirrorKlassKind; } bool is_class_loader_instance_klass() const { return _kind == InstanceClassLoaderKlassKind; } diff --git a/src/hotspot/share/oops/markWord.hpp b/src/hotspot/share/oops/markWord.hpp index 12d6ee73acf94..f660986356bfe 100644 --- a/src/hotspot/share/oops/markWord.hpp +++ b/src/hotspot/share/oops/markWord.hpp @@ -232,7 +232,6 @@ class markWord { // age operations markWord set_marked() { return markWord((value() & ~lock_mask_in_place) | marked_value); } - markWord set_unmarked() { return markWord((value() & ~lock_mask_in_place) | unlocked_value); } uint age() const { return (uint) mask_bits(value() >> age_shift, age_mask); } markWord set_age(uint v) const { diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp index 905c53a4ea38b..ac3e77247006f 100644 --- a/src/hotspot/share/oops/method.hpp +++ b/src/hotspot/share/oops/method.hpp @@ -377,9 +377,6 @@ class Method : public Metadata { void set_adapter_entry(AdapterHandlerEntry* adapter) { _adapter = adapter; } - void set_from_compiled_entry(address entry) { - _from_compiled_entry = entry; - } address get_i2c_entry(); address get_c2i_entry(); @@ -497,7 +494,6 @@ class Method : public Metadata { Symbol* klass_name() const; // returns the name of the method holder BasicType result_type() const { return constMethod()->result_type(); } bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); } - bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); } // Checked exceptions thrown by this method (resolved to mirrors) objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); } @@ -775,10 +771,6 @@ class Method : public Metadata { bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } // On-stack replacement support - bool has_osr_nmethod(int level, bool match_level) { - return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr; - } - nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); } @@ -820,7 +812,6 @@ class Method : public Metadata { // not_c1_osr_compilable == not_c1_compilable bool is_not_c1_osr_compilable() const { return is_not_c1_compilable(); } void set_is_not_c1_osr_compilable() { set_is_not_c1_compilable(); } - void clear_is_not_c1_osr_compilable() { clear_is_not_c1_compilable(); } // Background compilation support void clear_queued_for_compilation() { set_queued_for_compilation(false); } diff --git a/src/hotspot/share/oops/methodData.hpp b/src/hotspot/share/oops/methodData.hpp index 4fa42eec960d7..911d48a741bb2 100644 --- a/src/hotspot/share/oops/methodData.hpp +++ b/src/hotspot/share/oops/methodData.hpp @@ -217,21 +217,6 @@ class DataLayout { return true; } - bool clear_flag_at(u1 flag_number) { - const u1 bit = 1 << flag_number; - u1 compare_value; - u1 exchange_value; - do { - compare_value = _header._struct._flags; - if ((compare_value & bit) == 0) { - // already cleaed. - return false; - } - exchange_value = compare_value & ~bit; - } while (compare_value != Atomic::cmpxchg(&_header._struct._flags, compare_value, exchange_value)); - return true; - } - bool flag_at(u1 flag_number) const { return (flags() & (1 << flag_number)) != 0; } @@ -441,10 +426,6 @@ class ProfileData : public ResourceObj { assert(is_ReceiverTypeData(), "wrong type"); return is_ReceiverTypeData() ? (ReceiverTypeData*)this : nullptr; } - VirtualCallData* as_VirtualCallData() const { - assert(is_VirtualCallData(), "wrong type"); - return is_VirtualCallData() ? (VirtualCallData*)this : nullptr; - } RetData* as_RetData() const { assert(is_RetData(), "wrong type"); return is_RetData() ? (RetData*) this : nullptr; @@ -453,18 +434,6 @@ class ProfileData : public ResourceObj { assert(is_BranchData(), "wrong type"); return is_BranchData() ? (BranchData*) this : nullptr; } - ArrayData* as_ArrayData() const { - assert(is_ArrayData(), "wrong type"); - return is_ArrayData() ? (ArrayData*) this : nullptr; - } - MultiBranchData* as_MultiBranchData() const { - assert(is_MultiBranchData(), "wrong type"); - return is_MultiBranchData() ? (MultiBranchData*)this : nullptr; - } - ArgInfoData* as_ArgInfoData() const { - assert(is_ArgInfoData(), "wrong type"); - return is_ArgInfoData() ? (ArgInfoData*)this : nullptr; - } CallTypeData* as_CallTypeData() const { assert(is_CallTypeData(), "wrong type"); return is_CallTypeData() ? (CallTypeData*)this : nullptr; @@ -544,10 +513,8 @@ class BitData : public ProfileData { // The null_seen flag bit is specially known to the interpreter. // Consulting it allows the compiler to avoid setting up null_check traps. bool null_seen() { return flag_at(null_seen_flag); } - void set_null_seen() { set_flag_at(null_seen_flag); } bool deprecated_method_call_site() const { return flag_at(deprecated_method_callsite_flag); } bool set_deprecated_method_call_site() { return data()->set_flag_at(deprecated_method_callsite_flag); } - bool clear_deprecated_method_call_site() { return data()->clear_flag_at(deprecated_method_callsite_flag); } #if INCLUDE_JVMCI // true if an exception was thrown at the specific BCI @@ -662,19 +629,6 @@ class JumpData : public ProfileData { return uint_at(taken_off_set); } - void set_taken(uint cnt) { - set_uint_at(taken_off_set, cnt); - } - - // Saturating counter - uint inc_taken() { - uint cnt = taken() + 1; - // Did we wrap? Will compiler screw us?? - if (cnt == 0) cnt--; - set_uint_at(taken_off_set, cnt); - return cnt; - } - int displacement() const { return int_at(displacement_off_set); } @@ -1212,9 +1166,6 @@ class ReceiverTypeData : public CounterData { static ByteSize receiver_count_offset(uint row) { return cell_offset(receiver_count_cell_index(row)); } - static ByteSize receiver_type_data_size() { - return cell_offset(static_cell_count()); - } // GC support virtual void clean_weak_klass_links(bool always_clean); @@ -1517,18 +1468,6 @@ class BranchData : public JumpData { return uint_at(not_taken_off_set); } - void set_not_taken(uint cnt) { - set_uint_at(not_taken_off_set, cnt); - } - - uint inc_not_taken() { - uint cnt = not_taken() + 1; - // Did we wrap? Will compiler screw us?? - if (cnt == 0) cnt--; - set_uint_at(not_taken_off_set, cnt); - return cnt; - } - // Code generation support static ByteSize not_taken_offset() { return cell_offset(not_taken_off_set); @@ -1567,10 +1506,6 @@ class ArrayData : public ProfileData { int aindex = index + array_start_off_set; return int_at(aindex); } - oop array_oop_at(int index) const { - int aindex = index + array_start_off_set; - return oop_at(aindex); - } void array_set_int_at(int index, int value) { int aindex = index + array_start_off_set; set_int_at(aindex, value); @@ -1602,9 +1537,6 @@ class ArrayData : public ProfileData { static ByteSize array_len_offset() { return cell_offset(array_len_off_set); } - static ByteSize array_start_offset() { - return cell_offset(array_start_off_set); - } }; // MultiBranchData diff --git a/src/hotspot/share/oops/objArrayKlass.hpp b/src/hotspot/share/oops/objArrayKlass.hpp index e16f1f2eb0fcd..f595f30f67011 100644 --- a/src/hotspot/share/oops/objArrayKlass.hpp +++ b/src/hotspot/share/oops/objArrayKlass.hpp @@ -55,11 +55,9 @@ class ObjArrayKlass : public ArrayKlass { // Instance variables Klass* element_klass() const { return _element_klass; } void set_element_klass(Klass* k) { _element_klass = k; } - Klass** element_klass_addr() { return &_element_klass; } Klass* bottom_klass() const { return _bottom_klass; } void set_bottom_klass(Klass* k) { _bottom_klass = k; } - Klass** bottom_klass_addr() { return &_bottom_klass; } ModuleEntry* module() const; PackageEntry* package() const; diff --git a/src/hotspot/share/oops/resolvedFieldEntry.hpp b/src/hotspot/share/oops/resolvedFieldEntry.hpp index 7765240926d43..3041126766b23 100644 --- a/src/hotspot/share/oops/resolvedFieldEntry.hpp +++ b/src/hotspot/share/oops/resolvedFieldEntry.hpp @@ -136,7 +136,6 @@ class ResolvedFieldEntry { // Offsets static ByteSize field_holder_offset() { return byte_offset_of(ResolvedFieldEntry, _field_holder); } static ByteSize field_offset_offset() { return byte_offset_of(ResolvedFieldEntry, _field_offset); } - static ByteSize field_index_offset() { return byte_offset_of(ResolvedFieldEntry, _field_index); } static ByteSize get_code_offset() { return byte_offset_of(ResolvedFieldEntry, _get_code); } static ByteSize put_code_offset() { return byte_offset_of(ResolvedFieldEntry, _put_code); } static ByteSize type_offset() { return byte_offset_of(ResolvedFieldEntry, _tos_state); } diff --git a/src/hotspot/share/opto/addnode.hpp b/src/hotspot/share/opto/addnode.hpp index fd044d6eead63..989fdf6bc9389 100644 --- a/src/hotspot/share/opto/addnode.hpp +++ b/src/hotspot/share/opto/addnode.hpp @@ -271,10 +271,6 @@ class MaxNode : public AddNode { Node* IdealI(PhaseGVN* phase, bool can_reshape); virtual Node* Identity(PhaseGVN* phase); - static Node* unsigned_max(Node* a, Node* b, const Type* t, PhaseGVN& gvn) { - return build_min_max(a, b, true, true, t, gvn); - } - static Node* unsigned_min(Node* a, Node* b, const Type* t, PhaseGVN& gvn) { return build_min_max(a, b, false, true, t, gvn); } @@ -292,11 +288,6 @@ class MaxNode : public AddNode { return build_min_max_diff_with_zero(a, b, true, t, gvn); } - // min(a-b, 0) - static Node* min_diff_with_zero(Node* a, Node* b, const Type* t, PhaseGVN& gvn) { - return build_min_max_diff_with_zero(a, b, false, t, gvn); - } - static Node* build_min_max_int(Node* a, Node* b, bool is_max); static Node* build_min_max_long(PhaseGVN* phase, Node* a, Node* b, bool is_max); }; diff --git a/src/hotspot/share/opto/callnode.hpp b/src/hotspot/share/opto/callnode.hpp index efa84850bb236..00fcc833634f7 100644 --- a/src/hotspot/share/opto/callnode.hpp +++ b/src/hotspot/share/opto/callnode.hpp @@ -241,7 +241,6 @@ class JVMState : public ResourceObj { bool is_loc(uint i) const { return locoff() <= i && i < stkoff(); } bool is_stk(uint i) const { return stkoff() <= i && i < monoff(); } bool is_mon(uint i) const { return monoff() <= i && i < scloff(); } - bool is_scl(uint i) const { return scloff() <= i && i < endoff(); } uint sp() const { return _sp; } int bci() const { return _bci; } diff --git a/src/hotspot/share/opto/cfgnode.hpp b/src/hotspot/share/opto/cfgnode.hpp index de37f4cdd65ca..6be66bc6f7d6e 100644 --- a/src/hotspot/share/opto/cfgnode.hpp +++ b/src/hotspot/share/opto/cfgnode.hpp @@ -654,7 +654,6 @@ class CatchProjNode : public CProjNode { virtual Node* Identity(PhaseGVN* phase); virtual const Type *bottom_type() const { return Type::CONTROL; } int handler_bci() const { return _handler_bci; } - bool is_handler_proj() const { return _handler_bci >= 0; } #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; #endif diff --git a/src/hotspot/share/opto/escape.hpp b/src/hotspot/share/opto/escape.hpp index 658c8f6e8feca..b9040c3ca7a62 100644 --- a/src/hotspot/share/opto/escape.hpp +++ b/src/hotspot/share/opto/escape.hpp @@ -184,7 +184,6 @@ class PointsToNode : public ArenaObj { JavaObjectNode* as_JavaObject() { assert(is_JavaObject(),""); return (JavaObjectNode*)this; } LocalVarNode* as_LocalVar() { assert(is_LocalVar(),""); return (LocalVarNode*)this; } FieldNode* as_Field() { assert(is_Field(),""); return (FieldNode*)this; } - ArraycopyNode* as_Arraycopy() { assert(is_Arraycopy(),""); return (ArraycopyNode*)this; } EscapeState escape_state() const { return (EscapeState)_escape; } void set_escape_state(EscapeState state) { _escape = (u1)state; } diff --git a/src/hotspot/share/opto/machnode.hpp b/src/hotspot/share/opto/machnode.hpp index 677e1bcd1d1a5..9f24b5dc4f782 100644 --- a/src/hotspot/share/opto/machnode.hpp +++ b/src/hotspot/share/opto/machnode.hpp @@ -603,7 +603,6 @@ class MachSpillCopyNode : public MachIdealNode { add_req(n); } virtual uint size_of() const { return sizeof(*this); } - void set_out_RegMask(const RegMask &out) { _out = &out; } void set_in_RegMask(const RegMask &in) { _in = ∈ } virtual const RegMask &out_RegMask() const { return *_out; } virtual const RegMask &in_RegMask(uint) const { return *_in; } diff --git a/src/hotspot/share/opto/matcher.hpp b/src/hotspot/share/opto/matcher.hpp index 84e48086f92d3..d0c56214c1294 100644 --- a/src/hotspot/share/opto/matcher.hpp +++ b/src/hotspot/share/opto/matcher.hpp @@ -260,10 +260,6 @@ class Matcher : public PhaseTransform { _projection_list.push(node); } - Node* pop_projection() { - return _projection_list.pop(); - } - // Number of nodes in the projection list uint number_of_projections() const { return _projection_list.size(); diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp index e0f5a4374133a..671401157030f 100644 --- a/src/hotspot/share/opto/memnode.hpp +++ b/src/hotspot/share/opto/memnode.hpp @@ -1540,10 +1540,6 @@ class MergeMemStream : public StackObj { assert(_mm_base == _mm->base_memory(), "no update to base memory, please"); return _mm_base; } - const MergeMemNode* all_memory2() const { - assert(_mm2 != nullptr, ""); - return _mm2; - } bool at_base_memory() const { return _idx == Compile::AliasIdxBot; } diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp index 0ad56184d4d12..28d34e91d1787 100644 --- a/src/hotspot/share/opto/output.cpp +++ b/src/hotspot/share/opto/output.cpp @@ -208,14 +208,6 @@ class Scheduling { public: static void print_statistics(); - static void increment_instructions_per_bundle(uint i) { - _total_instructions_per_bundle[i]++; - } - - static void increment_nop_size(uint s) { - _total_nop_size += s; - } - static void increment_method_size(uint s) { _total_method_size += s; } diff --git a/src/hotspot/share/opto/output.hpp b/src/hotspot/share/opto/output.hpp index 1717955360256..ce0ee13d2a75b 100644 --- a/src/hotspot/share/opto/output.hpp +++ b/src/hotspot/share/opto/output.hpp @@ -179,7 +179,6 @@ class PhaseOutput : public Phase { void set_scratch_buffer_blob(BufferBlob* b) { _scratch_buffer_blob = b; } relocInfo* scratch_locs_memory() { return _scratch_locs_memory; } void set_scratch_locs_memory(relocInfo* b) { _scratch_locs_memory = b; } - int scratch_buffer_code_size() { return (address)scratch_locs_memory() - _scratch_buffer_blob->content_begin(); } // emit to scratch blob, report resulting size uint scratch_emit_size(const Node* n); diff --git a/src/hotspot/share/opto/phaseX.hpp b/src/hotspot/share/opto/phaseX.hpp index 0025f4dca4695..2adb460e77017 100644 --- a/src/hotspot/share/opto/phaseX.hpp +++ b/src/hotspot/share/opto/phaseX.hpp @@ -154,8 +154,6 @@ class PhaseRemoveUseless : public Phase { // list is allocated from current resource area public: PhaseRemoveUseless(PhaseGVN* gvn, Unique_Node_List& worklist, PhaseNumber phase_num = Remove_Useless); - - Unique_Node_List *get_useful() { return &_useful; } }; //------------------------------PhaseRenumber---------------------------------- diff --git a/src/hotspot/share/opto/runtime.hpp b/src/hotspot/share/opto/runtime.hpp index e4cbdf2f0d0b4..cd9a3b5a544de 100644 --- a/src/hotspot/share/opto/runtime.hpp +++ b/src/hotspot/share/opto/runtime.hpp @@ -207,7 +207,6 @@ class OptoRuntime : public AllStatic { static address multianewarray4_Java() { return _multianewarray4_Java; } static address multianewarray5_Java() { return _multianewarray5_Java; } static address multianewarrayN_Java() { return _multianewarrayN_Java; } - static address vtable_must_compile_stub() { return _vtable_must_compile_Java; } static address complete_monitor_locking_Java() { return _complete_monitor_locking_Java; } static address monitor_notify_Java() { return _monitor_notify_Java; } static address monitor_notifyAll_Java() { return _monitor_notifyAll_Java; } diff --git a/src/hotspot/share/opto/type.hpp b/src/hotspot/share/opto/type.hpp index b9883d5139136..39a447220911d 100644 --- a/src/hotspot/share/opto/type.hpp +++ b/src/hotspot/share/opto/type.hpp @@ -718,10 +718,6 @@ class TypeTuple : public Type { assert(i < _cnt, "oob"); return _fields[i]; } - void set_field_at(uint i, const Type* t) { - assert(i < _cnt, "oob"); - _fields[i] = t; - } static const TypeTuple *make( uint cnt, const Type **fields ); static const TypeTuple *make_range(ciSignature *sig, InterfaceHandling interface_handling = ignore_interfaces); @@ -1379,11 +1375,6 @@ class TypeInstPtr : public TypeOopPtr { private: virtual bool is_meet_subtype_of_helper(const TypeOopPtr* other, bool this_xk, bool other_xk) const; - - virtual bool is_meet_same_type_as(const TypePtr* other) const { - return _klass->equals(other->is_instptr()->_klass) && _interfaces->eq(other->is_instptr()->_interfaces); - } - }; //------------------------------TypeAryPtr------------------------------------- diff --git a/src/hotspot/share/opto/vectorization.hpp b/src/hotspot/share/opto/vectorization.hpp index 6840b01bb93dd..11cb960a2d255 100644 --- a/src/hotspot/share/opto/vectorization.hpp +++ b/src/hotspot/share/opto/vectorization.hpp @@ -874,30 +874,12 @@ class VectorElementSizeStats { _stats[exact_log2(size)]++; } - int count_size(int size) { - assert(1 <= size && size <= 8 && is_power_of_2(size), "Illegal size"); - return _stats[exact_log2(size)]; - } - int smallest_size() { for (int i = 0; i <= 3; i++) { if (_stats[i] > 0) return (1 << i); } return NO_SIZE; } - - int largest_size() { - for (int i = 3; i >= 0; i--) { - if (_stats[i] > 0) return (1 << i); - } - return NO_SIZE; - } - - int unique_size() { - int small = smallest_size(); - int large = largest_size(); - return (small == large) ? small : MIXED_SIZE; - } }; // When alignment is required, we must adjust the pre-loop iteration count pre_iter, diff --git a/src/hotspot/share/opto/vectornode.hpp b/src/hotspot/share/opto/vectornode.hpp index a9ded1bfa2dcd..3e57520fe883f 100644 --- a/src/hotspot/share/opto/vectornode.hpp +++ b/src/hotspot/share/opto/vectornode.hpp @@ -1137,7 +1137,6 @@ class VectorMaskOpNode : public TypeNode { virtual uint size_of() const { return sizeof(VectorMaskOpNode); } virtual uint ideal_reg() const { return Op_RegI; } virtual Node* Ideal(PhaseGVN* phase, bool can_reshape); - int get_mask_Opcode() const { return _mopc;} static Node* make(Node* mask, const Type* ty, int mopc); }; @@ -1472,7 +1471,6 @@ class VectorMaskWrapperNode : public VectorNode { } virtual int Opcode() const; - Node* vector_val() const { return in(1); } Node* vector_mask() const { return in(2); } }; @@ -1508,7 +1506,6 @@ class VectorBlendNode : public VectorNode { virtual Node* Identity(PhaseGVN* phase); Node* vec1() const { return in(1); } Node* vec2() const { return in(2); } - Node* vec_mask() const { return in(3); } }; class VectorRearrangeNode : public VectorNode { @@ -1520,7 +1517,6 @@ class VectorRearrangeNode : public VectorNode { virtual int Opcode() const; Node* vec1() const { return in(1); } - Node* vec_shuffle() const { return in(2); } }; class VectorLoadShuffleNode : public VectorNode { @@ -1530,7 +1526,6 @@ class VectorLoadShuffleNode : public VectorNode { assert(in->bottom_type()->is_vect()->element_basic_type() == T_BYTE, "must be BYTE"); } - int GetOutShuffleSize() const { return type2aelembytes(vect_type()->element_basic_type()); } virtual int Opcode() const; }; diff --git a/src/hotspot/share/prims/jvmtiThreadState.hpp b/src/hotspot/share/prims/jvmtiThreadState.hpp index ff7b6a1ebde57..3507df86686f4 100644 --- a/src/hotspot/share/prims/jvmtiThreadState.hpp +++ b/src/hotspot/share/prims/jvmtiThreadState.hpp @@ -436,11 +436,6 @@ class JvmtiThreadState : public CHeapObj { // Todo: get rid of this! private: bool _debuggable; - public: - // Should the thread be enumerated by jvmtiInternal::GetAllThreads? - bool is_debuggable() { return _debuggable; } - // If a thread cannot be suspended (has no valid last_java_frame) then it gets marked !debuggable - void set_debuggable(bool debuggable) { _debuggable = debuggable; } public: diff --git a/src/hotspot/share/runtime/javaThread.hpp b/src/hotspot/share/runtime/javaThread.hpp index 2541aaded00a3..984f4ba52476b 100644 --- a/src/hotspot/share/runtime/javaThread.hpp +++ b/src/hotspot/share/runtime/javaThread.hpp @@ -786,7 +786,6 @@ class JavaThread: public Thread { static ByteSize pending_monitorenter_offset() { return byte_offset_of(JavaThread, _pending_monitorenter); } static ByteSize jvmci_alternate_call_target_offset() { return byte_offset_of(JavaThread, _jvmci._alternate_call_target); } static ByteSize jvmci_implicit_exception_pc_offset() { return byte_offset_of(JavaThread, _jvmci._implicit_exception_pc); } - static ByteSize jvmci_counters_offset() { return byte_offset_of(JavaThread, _jvmci_counters); } #endif // INCLUDE_JVMCI static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop); } static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc); } @@ -936,7 +935,6 @@ class JavaThread: public Thread { javaVFrame* carrier_last_java_vframe(RegisterMap* reg_map) { return last_java_vframe(carrier_last_frame(reg_map), reg_map); } frame vthread_last_frame(); - javaVFrame* vthread_last_java_vframe(RegisterMap* reg_map) { return last_java_vframe(vthread_last_frame(), reg_map); } frame platform_thread_last_frame(RegisterMap* reg_map); javaVFrame* platform_thread_last_java_vframe(RegisterMap* reg_map) { diff --git a/src/hotspot/share/runtime/registerMap.hpp b/src/hotspot/share/runtime/registerMap.hpp index 5cf68a87b7120..e861741371778 100644 --- a/src/hotspot/share/runtime/registerMap.hpp +++ b/src/hotspot/share/runtime/registerMap.hpp @@ -141,8 +141,6 @@ class RegisterMap : public StackObj { bool process_frames() const { return _process_frames; } bool walk_cont() const { return _walk_cont; } - void set_walk_cont(bool value) { _walk_cont = value; } - bool in_cont() const { return _chunk() != nullptr; } // Whether we are currently on the hstack; if true, frames are relativized oop cont() const; stackChunkHandle stack_chunk() const { return _chunk; } diff --git a/src/hotspot/share/runtime/safepoint.hpp b/src/hotspot/share/runtime/safepoint.hpp index 93ede70c6acd4..8e072f321740a 100644 --- a/src/hotspot/share/runtime/safepoint.hpp +++ b/src/hotspot/share/runtime/safepoint.hpp @@ -255,10 +255,6 @@ class SafepointTracing : public AllStatic { static void statistics_exit_log(); - static jlong time_since_last_safepoint_ms() { - return nanos_to_millis(os::javaTimeNanos() - _last_safepoint_end_time_ns); - } - static jlong end_of_last_safepoint_ms() { return nanos_to_millis(_last_safepoint_end_time_ns); } diff --git a/src/hotspot/share/runtime/thread.hpp b/src/hotspot/share/runtime/thread.hpp index 44c845986f375..9054acb1504ac 100644 --- a/src/hotspot/share/runtime/thread.hpp +++ b/src/hotspot/share/runtime/thread.hpp @@ -252,9 +252,6 @@ class Thread: public ThreadShadow { return _missed_ic_stub_refill_verifier; } - void set_missed_ic_stub_refill_verifier(ICRefillVerifier* verifier) { - _missed_ic_stub_refill_verifier = verifier; - } #endif // ASSERT private: diff --git a/src/hotspot/share/services/memoryPool.hpp b/src/hotspot/share/services/memoryPool.hpp index a55c593ebed80..7640bb61aa530 100644 --- a/src/hotspot/share/services/memoryPool.hpp +++ b/src/hotspot/share/services/memoryPool.hpp @@ -99,11 +99,6 @@ class MemoryPool : public CHeapObj { bool is_pool(instanceHandle pool) const; bool available_for_allocation() { return _available_for_allocation; } - bool set_available_for_allocation(bool value) { - bool prev = _available_for_allocation; - _available_for_allocation = value; - return prev; - } MemoryManager* get_memory_manager(int index) { assert(index >= 0 && index < _num_managers, "Invalid index"); diff --git a/src/hotspot/share/services/memoryService.hpp b/src/hotspot/share/services/memoryService.hpp index 2d28f25c69519..a250812cd402c 100644 --- a/src/hotspot/share/services/memoryService.hpp +++ b/src/hotspot/share/services/memoryService.hpp @@ -89,12 +89,7 @@ class MemoryService : public AllStatic { track_memory_pool_usage(_code_heap_pools->at(i)); } } - static void track_metaspace_memory_usage() { - track_memory_pool_usage(_metaspace_pool); - } - static void track_compressed_class_memory_usage() { - track_memory_pool_usage(_compressed_class_pool); - } + static void track_memory_pool_usage(MemoryPool* pool); static void gc_begin(GCMemoryManager* manager, bool recordGCBeginTime, diff --git a/src/hotspot/share/utilities/accessFlags.hpp b/src/hotspot/share/utilities/accessFlags.hpp index 78bf179e03afd..0be80396baf30 100644 --- a/src/hotspot/share/utilities/accessFlags.hpp +++ b/src/hotspot/share/utilities/accessFlags.hpp @@ -86,11 +86,6 @@ class AccessFlags { // get .class file flags jint get_flags () const { return (_flags & JVM_ACC_WRITTEN_FLAGS); } - // Initialization - void set_field_flags(jint flags) { - assert((flags & JVM_RECOGNIZED_FIELD_MODIFIERS) == flags, "only recognized flags"); - _flags = (flags & JVM_RECOGNIZED_FIELD_MODIFIERS); - } void set_flags(jint flags) { _flags = (flags & JVM_ACC_WRITTEN_FLAGS); } private: diff --git a/src/hotspot/share/utilities/bitMap.hpp b/src/hotspot/share/utilities/bitMap.hpp index 0d592de7cd077..2aec40e62a68a 100644 --- a/src/hotspot/share/utilities/bitMap.hpp +++ b/src/hotspot/share/utilities/bitMap.hpp @@ -155,7 +155,6 @@ class BitMap { // Set a word to a specified value or to all ones; clear a word. void set_word (idx_t word, bm_word_t val) { _map[word] = val; } void set_word (idx_t word) { set_word(word, ~(bm_word_t)0); } - void clear_word(idx_t word) { _map[word] = 0; } static inline bm_word_t load_word_ordered(const volatile bm_word_t* const addr, atomic_memory_order memory_order); diff --git a/src/hotspot/share/utilities/globalDefinitions.hpp b/src/hotspot/share/utilities/globalDefinitions.hpp index a15a4de3e93dc..bdad3f807ce10 100644 --- a/src/hotspot/share/utilities/globalDefinitions.hpp +++ b/src/hotspot/share/utilities/globalDefinitions.hpp @@ -918,7 +918,6 @@ class JavaValue { jbyte get_jbyte() const { return (jbyte) (_value.i);} jchar get_jchar() const { return (jchar) (_value.i);} jshort get_jshort() const { return (jshort) (_value.i);} - }; diff --git a/src/hotspot/share/utilities/istream.hpp b/src/hotspot/share/utilities/istream.hpp index b6a58055b937c..12428ed393cb7 100644 --- a/src/hotspot/share/utilities/istream.hpp +++ b/src/hotspot/share/utilities/istream.hpp @@ -298,11 +298,6 @@ class inputStream : public CHeapObjBase { // Copy the current line to the given output stream. void print_on(outputStream* out); - // Copy the current line to the given output stream, and also call cr(). - void print_cr_on(outputStream* out) { - print_on(out); out->cr(); - } - #ifdef ASSERT void dump(const char* what = nullptr); static int coverage_mode(int mode, int& cases, int& total, int& zeroes); diff --git a/src/hotspot/share/utilities/ostream.hpp b/src/hotspot/share/utilities/ostream.hpp index d39fca29ba4c0..20e1339c8618d 100644 --- a/src/hotspot/share/utilities/ostream.hpp +++ b/src/hotspot/share/utilities/ostream.hpp @@ -80,7 +80,6 @@ class outputStream : public CHeapObjBase { void inc(int n) { _indentation += n; }; void dec(int n) { _indentation -= n; }; int indentation() const { return _indentation; } - void set_indentation(int i) { _indentation = i; } void fill_to(int col); void move_to(int col, int slop = 6, int min_space = 2); @@ -128,15 +127,11 @@ class outputStream : public CHeapObjBase { // flushing virtual void flush() {} virtual void write(const char* str, size_t len) = 0; - virtual void rotate_log(bool force, outputStream* out = nullptr) {} // GC log rotation virtual ~outputStream() {} // close properly on deletion // Caller may specify their own scratch buffer to use for printing; otherwise, // an automatic buffer on the stack (with O_BUFLEN len) is used. void set_scratch_buffer(char* p, size_t len) { _scratch = p; _scratch_len = len; } - - void dec_cr() { dec(); cr(); } - void inc_cr() { inc(); cr(); } }; // standard output diff --git a/src/hotspot/share/utilities/unsigned5.hpp b/src/hotspot/share/utilities/unsigned5.hpp index 7f74d6e8498ab..34b082e3004f0 100644 --- a/src/hotspot/share/utilities/unsigned5.hpp +++ b/src/hotspot/share/utilities/unsigned5.hpp @@ -185,23 +185,6 @@ class UNSIGNED5 : AllStatic { } } - // reports the largest uint32_t value that can be encoded using len bytes - // len must be in the range [1..5] - static constexpr uint32_t max_encoded_in_length(uint32_t len) { - assert(len >= 1 && len <= MAX_LENGTH, "invalid length"); - if (len >= MAX_LENGTH) return MAX_VALUE; // largest non-overflow value - // Be careful: the constexpr magic evaporates if undefined behavior - // results from any of these expressions. Beware of signed overflow! - uint32_t all_combinations = 0; - uint32_t combinations_i = L; // L * H^i - for (uint32_t i = 0; i < len; i++) { - // count combinations of that end at byte i - all_combinations += combinations_i; - combinations_i <<= lg_H; - } - return all_combinations - 1; - } - // tells if a value, when encoded, would fit between the offset and limit template static constexpr bool fits_in_limit(uint32_t value, OFF offset, OFF limit) { diff --git a/src/hotspot/share/utilities/xmlstream.hpp b/src/hotspot/share/utilities/xmlstream.hpp index a933d2c472dfe..ab9d734de7f09 100644 --- a/src/hotspot/share/utilities/xmlstream.hpp +++ b/src/hotspot/share/utilities/xmlstream.hpp @@ -106,7 +106,6 @@ class xmlStream : public outputStream { virtual void flush(); // flushes out, sets _last_flush = count() virtual void write(const char* s, size_t len); void write_text(const char* s, size_t len); // used by xmlTextStream - int unflushed_count() { return (int)(out()->count() - _last_flush); } // writing complete XML elements void elem(const char* format, ...) ATTRIBUTE_PRINTF(2, 3); diff --git a/test/hotspot/gtest/gc/g1/test_g1BiasedArray.cpp b/test/hotspot/gtest/gc/g1/test_g1BiasedArray.cpp index 05e1d39bd48c9..760ab718c3617 100644 --- a/test/hotspot/gtest/gc/g1/test_g1BiasedArray.cpp +++ b/test/hotspot/gtest/gc/g1/test_g1BiasedArray.cpp @@ -25,112 +25,112 @@ #include "gc/g1/g1BiasedArray.hpp" #include "unittest.hpp" -class TestMappedArray : public G1BiasedMappedArray { -public: - virtual int default_value() const { - return 0xBAADBABE; - } - int* my_address_mapped_to(HeapWord* address) { - return address_mapped_to(address); - } -}; +//class TestMappedArray : public G1BiasedMappedArray { +//public: +// virtual int default_value() const { +// return 0xBAADBABE; +// } +// int* my_address_mapped_to(HeapWord* address) { +// return address_mapped_to(address); +// } +//}; TEST_VM(G1BiasedArray, simple) { const size_t REGION_SIZE_IN_WORDS = 512; const size_t NUM_REGIONS = 20; - // Any value that is non-zero - HeapWord* fake_heap = - (HeapWord*) LP64_ONLY(0xBAAA00000) NOT_LP64(0xBA000000); - - TestMappedArray array; - MemRegion range(fake_heap, fake_heap + REGION_SIZE_IN_WORDS * NUM_REGIONS); - array.initialize(range, REGION_SIZE_IN_WORDS * HeapWordSize); - const int DEFAULT_VALUE = array.default_value(); - - // Check address calculation (bounds) - ASSERT_EQ(fake_heap, array.bottom_address_mapped()) - << "bottom mapped address should be " - << p2i(array.bottom_address_mapped()) - << ", but is " - << p2i(fake_heap); - ASSERT_EQ(fake_heap + REGION_SIZE_IN_WORDS * NUM_REGIONS, - array.end_address_mapped()); - - int* bottom = array.my_address_mapped_to(fake_heap); - ASSERT_EQ((void*) bottom, (void*) array.base()); - int* end = array.my_address_mapped_to(fake_heap + - REGION_SIZE_IN_WORDS * NUM_REGIONS); - ASSERT_EQ((void*) end, (void*) (array.base() + array.length())); - // The entire array should contain default value elements - for (int* current = bottom; current < end; current++) { - ASSERT_EQ(DEFAULT_VALUE, *current); - } - - // Test setting values in the table - HeapWord* region_start_address = - fake_heap + REGION_SIZE_IN_WORDS * (NUM_REGIONS / 2); - HeapWord* region_end_address = - fake_heap + (REGION_SIZE_IN_WORDS * (NUM_REGIONS / 2) + - REGION_SIZE_IN_WORDS - 1); - - // Set/get by address tests: invert some value; first retrieve one - int actual_value = array.get_by_index(NUM_REGIONS / 2); - array.set_by_index(NUM_REGIONS / 2, ~actual_value); - // Get the same value by address, should correspond to the start of the "region" - int value = array.get_by_address(region_start_address); - ASSERT_EQ(value, ~actual_value); - // Get the same value by address, at one HeapWord before the start - value = array.get_by_address(region_start_address - 1); - ASSERT_EQ(DEFAULT_VALUE, value); - // Get the same value by address, at the end of the "region" - value = array.get_by_address(region_end_address); - ASSERT_EQ(value, ~actual_value); - // Make sure the next value maps to another index - value = array.get_by_address(region_end_address + 1); - ASSERT_EQ(DEFAULT_VALUE, value); - - // Reset the value in the array - array.set_by_address(region_start_address + - (region_end_address - region_start_address) / 2, - actual_value); - - // The entire array should have the default value again - for (int* current = bottom; current < end; current++) { - ASSERT_EQ(DEFAULT_VALUE, *current); - } - - // Set/get by index tests: invert some value - size_t index = NUM_REGIONS / 2; - actual_value = array.get_by_index(index); - array.set_by_index(index, ~actual_value); - - value = array.get_by_index(index); - ASSERT_EQ(~actual_value, value); - - value = array.get_by_index(index - 1); - ASSERT_EQ(DEFAULT_VALUE, value); - - value = array.get_by_index(index + 1); - ASSERT_EQ(DEFAULT_VALUE, value); - - array.set_by_index(0, 0); - value = array.get_by_index(0); - ASSERT_EQ(0, value); - - array.set_by_index(array.length() - 1, 0); - value = array.get_by_index(array.length() - 1); - ASSERT_EQ(0, value); - - array.set_by_index(index, 0); - - // The array should have three zeros, and default values otherwise - size_t num_zeros = 0; - for (int* current = bottom; current < end; current++) { - ASSERT_TRUE(*current == DEFAULT_VALUE || *current == 0); - if (*current == 0) { - num_zeros++; - } - } - ASSERT_EQ((size_t) 3, num_zeros); +// // Any value that is non-zero +// HeapWord* fake_heap = +// (HeapWord*) LP64_ONLY(0xBAAA00000) NOT_LP64(0xBA000000); +// +// TestMappedArray array; +// MemRegion range(fake_heap, fake_heap + REGION_SIZE_IN_WORDS * NUM_REGIONS); +// array.initialize(range, REGION_SIZE_IN_WORDS * HeapWordSize); +// const int DEFAULT_VALUE = array.default_value(); +// +// // Check address calculation (bounds) +// ASSERT_EQ(fake_heap, array.bottom_address_mapped()) +// << "bottom mapped address should be " +// << p2i(array.bottom_address_mapped()) +// << ", but is " +// << p2i(fake_heap); +// ASSERT_EQ(fake_heap + REGION_SIZE_IN_WORDS * NUM_REGIONS, +// array.end_address_mapped()); +// +// int* bottom = array.my_address_mapped_to(fake_heap); +// ASSERT_EQ((void*) bottom, (void*) array.base()); +// int* end = array.my_address_mapped_to(fake_heap + +// REGION_SIZE_IN_WORDS * NUM_REGIONS); +// ASSERT_EQ((void*) end, (void*) (array.base() + array.length())); +// // The entire array should contain default value elements +// for (int* current = bottom; current < end; current++) { +// ASSERT_EQ(DEFAULT_VALUE, *current); +// } +// +// // Test setting values in the table +// HeapWord* region_start_address = +// fake_heap + REGION_SIZE_IN_WORDS * (NUM_REGIONS / 2); +// HeapWord* region_end_address = +// fake_heap + (REGION_SIZE_IN_WORDS * (NUM_REGIONS / 2) + +// REGION_SIZE_IN_WORDS - 1); +// +// // Set/get by address tests: invert some value; first retrieve one +// int actual_value = array.get_by_index(NUM_REGIONS / 2); +// array.set_by_index(NUM_REGIONS / 2, ~actual_value); +// // Get the same value by address, should correspond to the start of the "region" +// int value = array.get_by_address(region_start_address); +// ASSERT_EQ(value, ~actual_value); +// // Get the same value by address, at one HeapWord before the start +// value = array.get_by_address(region_start_address - 1); +// ASSERT_EQ(DEFAULT_VALUE, value); +// // Get the same value by address, at the end of the "region" +// value = array.get_by_address(region_end_address); +// ASSERT_EQ(value, ~actual_value); +// // Make sure the next value maps to another index +// value = array.get_by_address(region_end_address + 1); +// ASSERT_EQ(DEFAULT_VALUE, value); +// +// // Reset the value in the array +// array.set_by_address(region_start_address + +// (region_end_address - region_start_address) / 2, +// actual_value); +// +// // The entire array should have the default value again +// for (int* current = bottom; current < end; current++) { +// ASSERT_EQ(DEFAULT_VALUE, *current); +// } +// +// // Set/get by index tests: invert some value +// size_t index = NUM_REGIONS / 2; +// actual_value = array.get_by_index(index); +// array.set_by_index(index, ~actual_value); +// +// value = array.get_by_index(index); +// ASSERT_EQ(~actual_value, value); +// +// value = array.get_by_index(index - 1); +// ASSERT_EQ(DEFAULT_VALUE, value); +// +// value = array.get_by_index(index + 1); +// ASSERT_EQ(DEFAULT_VALUE, value); +// +// array.set_by_index(0, 0); +// value = array.get_by_index(0); +// ASSERT_EQ(0, value); +// +// array.set_by_index(array.length() - 1, 0); +// value = array.get_by_index(array.length() - 1); +// ASSERT_EQ(0, value); +// +// array.set_by_index(index, 0); +// +// // The array should have three zeros, and default values otherwise +// size_t num_zeros = 0; +// for (int* current = bottom; current < end; current++) { +// ASSERT_TRUE(*current == DEFAULT_VALUE || *current == 0); +// if (*current == 0) { +// num_zeros++; +// } +// } +// ASSERT_EQ((size_t) 3, num_zeros); } diff --git a/test/hotspot/gtest/utilities/test_unsigned5.cpp b/test/hotspot/gtest/utilities/test_unsigned5.cpp index da3927e5bb2a5..2233c762d0c9d 100644 --- a/test/hotspot/gtest/utilities/test_unsigned5.cpp +++ b/test/hotspot/gtest/utilities/test_unsigned5.cpp @@ -27,152 +27,6 @@ #include "utilities/unsigned5.hpp" #include "unittest.hpp" -TEST_VM(unsigned5, max_encoded_in_length) { - int maxlen = UNSIGNED5::MAX_LENGTH; - EXPECT_EQ(maxlen, 5); - for (int i = 0; i <= 190; i++) { - uint32_t interesting = i; - EXPECT_EQ(UNSIGNED5::encoded_length(interesting), 1); - EXPECT_EQ(UNSIGNED5::encoded_length(~interesting), maxlen); - } - for (int len = 1; len <= maxlen; len++) { - uint32_t interesting = UNSIGNED5::max_encoded_in_length(len); - EXPECT_EQ(UNSIGNED5::encoded_length(interesting-1), len); - EXPECT_EQ(UNSIGNED5::encoded_length(interesting), len); - if (len < 5) { - EXPECT_EQ(UNSIGNED5::encoded_length(interesting+1), len+1); - EXPECT_EQ(UNSIGNED5::encoded_length(interesting*2), len+1); - } - const int offset = -123; - const int good_limit = offset + len; - const int bad_limit = good_limit - 1; - EXPECT_TRUE(UNSIGNED5::fits_in_limit(interesting, offset, good_limit)); - EXPECT_TRUE(!UNSIGNED5::fits_in_limit(interesting, offset, bad_limit)); - } -} - -// Call FN on a nice list of "interesting" uint32_t values to encode/decode. -// For each length in [1..5], the maximum encodable value of that -// length is "interesting", as are one more and one less than that -// value. For each nybble (aligned 4-bit field) of a uint32_t, each -// possible value (in [0..15]) stored in that nybble is "interesting". -// Also "interesting" are some other values created by perturbing -// lower bits of that nybble-bearing number, by subtracting a power -// of -7 (up to -7^7). That makes just over 1000 distinct numbers. -// -// Calls to this function are repeatable, so you can call it to pack -// an output array, and then call it again to read an input array -// verifying that the retrieved values match the stored ones. -template -inline int enumerate_cases(FN fn) { - // boundary values around the maximum encoded in each byte-length - for (int len = 1; len <= 5; len++) { - uint32_t interesting = UNSIGNED5::max_encoded_in_length(len); - int res = fn(interesting-1); - if (res) return res; - res = fn(interesting); - if (res) return res; - if (interesting < (uint32_t)-1) { - res = fn(interesting+1); - if (res) return res; - } - } - // for each nybble, for each value in the nybble - for (uint32_t npos = 0; npos < 32; npos += 4) { - for (uint32_t nval = 0; nval <= 15; nval++) { - uint32_t interesting = nval << npos; - int res = fn(interesting); - if (res) return res; - // mix in some crazy-looking values: powers of -7 to -7^7 - for (int pon7 = 1; pon7 < 1000000; pon7 *= -7) { - uint32_t interesting2 = interesting - pon7; - res = fn(interesting2); - if (res) return res; - } - } - } - return 0; -} - -TEST_VM(unsigned5, transcode_single) { - const int limit = UNSIGNED5::MAX_LENGTH; - u_char buffer[limit + 1]; - auto each_case = [&](uint32_t value) -> uint32_t { - //printf("case %08X len=%d\n", value, UNSIGNED5::encoded_length(value)); - int offset = 0; - UNSIGNED5::write_uint(value, buffer, offset, limit); - int length = offset; - EXPECT_TRUE(length <= UNSIGNED5::MAX_LENGTH); - EXPECT_EQ(length, UNSIGNED5::encoded_length(value)) << "for value=" << value; - buffer[length] = 0; - offset = 0; - uint32_t check = UNSIGNED5::read_uint(buffer, offset, limit); - EXPECT_EQ(offset, length) << "for value=" << value; - EXPECT_EQ(value, check); - return 0; - }; - auto z = enumerate_cases(each_case); - EXPECT_TRUE(!z); -} - -static int count_cases() { - int case_count = 0; - auto inc_case_count = [&](uint32_t){ ++case_count; return 0; }; - enumerate_cases(inc_case_count); - return case_count; -} - -TEST_VM(unsigned5, transcode_multiple) { - int case_count = count_cases(); - const int limit = 200; - ASSERT_TRUE(limit < case_count*UNSIGNED5::MAX_LENGTH); - u_char buffer[limit + 1]; - //printf("%d cases total\n", case_count); //1166 cases total - for (int sublimit = limit - 20; sublimit < limit; sublimit++) { - int offset = 0; - int count = 0; - // write each number into an array - auto write_case = [&](uint32_t value) -> uint32_t { - if (!UNSIGNED5::fits_in_limit(value, offset, sublimit)) - return value|1; - UNSIGNED5::write_uint(value, buffer, offset, sublimit); - count++; - return 0; - }; - auto done = enumerate_cases(write_case); - EXPECT_TRUE(done) << "must have hit the sublimit"; - EXPECT_TRUE(count < case_count); - int length = offset; - EXPECT_TRUE(length <= sublimit && length + UNSIGNED5::MAX_LENGTH > sublimit) - << "length=" << length << " sublimit=" << sublimit; - for (int i = length; i <= sublimit; i++) { - buffer[i] = 0; - } - if (sublimit == limit-1) { - UNSIGNED5::print_count(case_count + 1, &buffer[0], sublimit); - } - //printf("encoded %d values in %d bytes: [[%s]]\n", count, length, buffer); - // now read it all back - offset = 0; - int count2 = 0; - auto read_back_case = [&](uint32_t value) -> uint32_t { - int clen = UNSIGNED5::check_length(buffer, offset, sublimit); - if (clen == 0) return value|1; - EXPECT_EQ(clen, UNSIGNED5::encoded_length(value)); - int begin = offset; - uint32_t check = UNSIGNED5::read_uint(buffer, offset, sublimit); - EXPECT_EQ(offset, begin + clen); - EXPECT_EQ(value, check); - count2++; - return 0; - }; - auto done2 = enumerate_cases(read_back_case); - EXPECT_EQ(done, done2); - EXPECT_EQ(count, count2); - EXPECT_EQ(offset, length); - } -} - inline void init_ints(int len, int* ints) { for (int i = 0; i < len; i++) { ints[i] = (i * ((i&2) ? i : 1001)) ^ -(i & 1); @@ -272,10 +126,6 @@ TEST_VM(unsigned5, reader) { void start_code_quality_unsigned5() { } -uint32_t code_quality_max_encoded_in_length(int i) { - return UNSIGNED5::max_encoded_in_length(i); // should compile like 5-switch -} - int code_quality_encoded_length(uint32_t x) { return UNSIGNED5::encoded_length(x); // should compile to 4-way comparison }