[riscv-port-jdk17u:riscv-port] RFR: 8276799: Implementation of JEP 422: Linux/RISC-V Port

Feilong Jiang fjiang at openjdk.org
Thu Feb 16 13:28:16 UTC 2023


On Tue, 7 Feb 2023 11:20:37 GMT, Yadong Wang <yadongwang at openjdk.org> wrote:

> This PR backports the implementation of RISC-V port into jdk17u. 
> 
> It based on the initial implementation of JEP-422 with some modifications for jdk17u:
> 1.	The initial patch
>     8276799: Implementation of JEP 422: Linux/RISC-V Port
> 2.	 remove features that do not belong to jdk17u
>     revert 8277417: C1 LIR instruction for load-klass
>     revert 8278387: Implement UseHeavyMonitors consistently
>     revert 8227369: pd_disjoint_words_atomic() needs to be atomic
>     revert 8258192: Obsolete the CriticalNatives flag
>     revert 8281632: riscv: Improve interpreter stack banging
>     revert 8283364: Intrinsify countPositives
> 3.	add features that belongs to jdk17u
>     enable the biased locking
> 4.	 Wrap modifications to shared code under RISCV and revert changes to other platforms
> isolate modification to other platforms
> 5.	Patches for making compilation pass
> 8282306: os::is_first_C_frame(frame*) crashes on invalid link access
> 8282477: vmassert(_last_Java_pc == NULL, "already walkable"); fails with async profiler

Overall looks good, thanks.

src/hotspot/cpu/riscv/riscv.ad line 2367:

> 2365:     __ add(tmp, disp_hdr, (ObjectMonitor::owner_offset_in_bytes() - markWord::monitor_value));
> 2366:     __ cmpxchg(/*memory address*/tmp, /*expected value*/zr, /*new value*/xthread, Assembler::int64, Assembler::aq,
> 2367:              Assembler::rl, /*result*/flag); // cas succeeds if flag == zr(expected)

Indentation here could be improved too.

src/hotspot/cpu/riscv/riscv.ad line 2422:

> 2420:     // object.
> 2421: 
> 2422:     __ cmpxchg(/*memory address*/oop, /*expected value*/box, /*new value*/disp_hdr, Assembler::int64, Assembler::relaxed,

Could you adjust the indentation here to align with https://github.com/openjdk/riscv-port-jdk17u/blob/47916a22eed5c92d56a330a481635c355274062f/src/hotspot/cpu/riscv/riscv.ad#L2335-L2336

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

Marked as reviewed by fjiang (no project role).

PR: https://git.openjdk.org/riscv-port-jdk17u/pull/1


More information about the riscv-port-dev mailing list