RFR: 8358696: Assert with extreme values for -XX:BciProfileWidth [v8]

Saranya Natarajan snatarajan at openjdk.org
Wed Aug 20 10:31:23 UTC 2025


On Tue, 19 Aug 2025 14:01:17 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Saranya Natarajan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   additions for  linux-riscv64
>
> Can you add this patch, please?
> 
> diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc.hpp b/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
> index d3969427db3..ac3825d152f 100644
> --- a/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
> +++ b/src/hotspot/cpu/ppc/interp_masm_ppc.hpp
> @@ -228,7 +228,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
>  
>    // Interpreter profiling operations
>    void set_method_data_pointer_for_bcp();
> -  void test_method_data_pointer(Label& zero_continue);
> +  void test_method_data_pointer(Label& zero_continue, bool may_be_far = false);
>    void verify_method_data_pointer();
>  
>    void set_mdp_data_at(int constant, Register value);
> diff --git a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
> index 29fb54250c2..7557709653a 100644
> --- a/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
> +++ b/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
> @@ -1249,10 +1249,14 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
>  }
>  
>  // Test ImethodDataPtr. If it is null, continue at the specified label.
> -void InterpreterMacroAssembler::test_method_data_pointer(Label& zero_continue) {
> +void InterpreterMacroAssembler::test_method_data_pointer(Label& zero_continue, bool may_be_far) {
>    assert(ProfileInterpreter, "must be profiling interpreter");
>    cmpdi(CR0, R28_mdx, 0);
> -  beq(CR0, zero_continue);
> +  if (may_be_far) {
> +    bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CR0, Assembler::equal), zero_continue);
> +  } else {
> +    beq(CR0, zero_continue);
> +  }
>  }
>  
>  void InterpreterMacroAssembler::verify_method_data_pointer() {
> @@ -1555,7 +1559,7 @@ void InterpreterMacroAssembler::profile_ret(TosState state, Register return_bci,
>      uint row;
>  
>      // If no method data exists, go to profile_continue.
> -    test_method_data_pointer(profile_continue);
> +    test_method_data_pointer(profile_continue, true);
>  
>      // Update the total ret count.
>      increment_mdp_data_at(in_bytes(CounterData::count_offset()), scratch1, scratch2 );

@TheRealMDoerr : Thank you for the patch.  I have added the changes suggested by you. Could you review if it looks good ?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26139#issuecomment-3205435266


More information about the hotspot-compiler-dev mailing list