Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API [v2]

2024-09-06 Thread Chen Liang
On Thu, 5 Sep 2024 15:39:07 GMT, Chen Liang wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> for

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API [v2]

2024-09-05 Thread Adam Sotona
On Thu, 5 Sep 2024 15:39:07 GMT, Chen Liang wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> for

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API [v2]

2024-09-05 Thread Claes Redestad
On Thu, 5 Sep 2024 15:39:07 GMT, Chen Liang wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> for

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API [v2]

2024-09-05 Thread Chen Liang
> Currently, raw bytecode access goes through multiple wrappers, include one > from ClassFile API and another ByteBuffer for merged big endian value reads. > We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) > for safer access. > > RawBytecodeHelper is also restructure

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Chen Liang
On Thu, 5 Sep 2024 14:04:19 GMT, Shaojin Wen wrote: >> Yes, things like storing `endBci()` to a local variable can be great if it >> both reduces code size and improves interpreter/C1 speed - but don't over-do >> it as it's likely never-ending work for a kind of optimizations leyden might >> m

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Shaojin Wen
On Thu, 5 Sep 2024 13:40:51 GMT, Claes Redestad wrote: >> C2 needs 1 calls to inline this method, so wenshao is worried. However, >> this method call is almost always followed by a huge switch to handle >> different opcode, so I doubt how much of a difference inlining brings. >> >> But wen

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Claes Redestad
On Thu, 5 Sep 2024 13:31:21 GMT, Chen Liang wrote: >> I don't think we should worry too much about making C1 inline more >> aggressively. > > C2 needs 1 calls to inline this method, so wenshao is worried. However, > this method call is almost always followed by a huge switch to handle > di

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Chen Liang
On Thu, 5 Sep 2024 13:22:53 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/RawBytecodeHelper.java >> line 235: >> >>> 233: * we have a valid opcode. >>> 234: */ >>> 235: public boolean next() { >> >> In C1, this cannot be inlined. See if you

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Claes Redestad
On Thu, 5 Sep 2024 06:24:46 GMT, Shaojin Wen wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> fo

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-05 Thread Adam Sotona
On Wed, 4 Sep 2024 22:41:38 GMT, Chen Liang wrote: > Currently, raw bytecode access goes through multiple wrappers, include one > from ClassFile API and another ByteBuffer for merged big endian value reads. > We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) > for saf

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-04 Thread Shaojin Wen
On Wed, 4 Sep 2024 22:41:38 GMT, Chen Liang wrote: > Currently, raw bytecode access goes through multiple wrappers, include one > from ClassFile API and another ByteBuffer for merged big endian value reads. > We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) > for saf

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-04 Thread Chen Liang
On Thu, 5 Sep 2024 02:31:48 GMT, ExE Boss wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> for s

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-04 Thread ExE Boss
On Wed, 4 Sep 2024 22:41:38 GMT, Chen Liang wrote: > Currently, raw bytecode access goes through multiple wrappers, include one > from ClassFile API and another ByteBuffer for merged big endian value reads. > We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) > for saf

RFR: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-04 Thread Chen Liang
Currently, raw bytecode access goes through multiple wrappers, include one from ClassFile API and another ByteBuffer for merged big endian value reads. We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) for safer access. RawBytecodeHelper is also restructured so we avoi