Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-07-05 Thread Coleen Phillimore
On Mon, 3 Jul 2023 01:20:08 GMT, David Holmes wrote: >> JvmtiRawMonitor _recursions is an int. Maybe it shouldn't be. You could >> file an RFE to change that if it's wrong. >> >> >> volatile int _recursions; // recursion count, 0 for first entry > > Sorry, yes was looking at the wrong

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-07-05 Thread Coleen Phillimore
On Fri, 30 Jun 2023 13:10:06 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-07-02 Thread David Holmes
On 3/07/2023 10:55 am, David Holmes wrote: On Fri, 30 Jun 2023 13:10:06 GMT, Coleen Phillimore wrote: Please review change for mostly fixing return types in the constant pool and metadata to fix -Wconversion warnings in JVMTI code. The order of preference for changes are: 1. change the type

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-07-02 Thread David Holmes
On Fri, 30 Jun 2023 12:49:50 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiRawMonitor.cpp line 385: >> >>> 383: OrderAccess::fence(); >>> 384: >>> 385: int save = _recursions; >> >> `_recursions` is `intx` > > JvmtiRawMonitor _recursions is an int. Maybe it shouldn't be.

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-07-02 Thread David Holmes
On Fri, 30 Jun 2023 13:10:06 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-07-02 Thread David Holmes
On Fri, 30 Jun 2023 13:10:06 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-30 Thread Coleen Phillimore
On Fri, 30 Jun 2023 02:18:14 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a comment about u1 cast to new_index for the ldc bytecode. > > Sorry Coleen but this raises a lot of questions

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-06-30 Thread Coleen Phillimore
On Fri, 30 Jun 2023 02:11:11 GMT, David Holmes wrote: >> I had to change these two lines because BytecodeStream::get_index_u2 returns >> an int, so got the warning and this didn't need to be declared with u2. >> get_index_u2() could be fixed to return a u2 but I didn't want to go that >> far

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-30 Thread Coleen Phillimore
On Fri, 30 Jun 2023 01:52:40 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a comment about u1 cast to new_index for the ldc bytecode. > > src/hotspot/share/oops/constMethod.hpp line 327

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-30 Thread Coleen Phillimore
On Thu, 29 Jun 2023 17:29:50 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v4]

2023-06-30 Thread Coleen Phillimore
> Please review change for mostly fixing return types in the constant pool and > metadata to fix -Wconversion warnings in JVMTI code. The order of preference > for changes are: 1. change the types to more distinct types (fields in the > constant pool are u2 because that's their size in the clas

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread David Holmes
On Thu, 29 Jun 2023 19:44:58 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/methodComparator.cpp line 79: >> >>> 77: case Bytecodes::_instanceof : { >>> 78: int cpi_old = s_old->get_index_u2(); >>> 79: int cpi_new = s_new->get_index_u2(); >> >> These constant pool access

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread David Holmes
On Thu, 29 Jun 2023 17:29:50 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread David Holmes
On Thu, 29 Jun 2023 19:51:43 GMT, Coleen Phillimore wrote: >> src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 2195: >> >>> 2193: case Bytecodes::_ldc: >>> 2194: { >>> 2195: u1 cp_index = *(bcp + 1); >> >> Constant pool indices are usually u2, why does this need to be a

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread Coleen Phillimore
On Thu, 29 Jun 2023 17:29:50 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread Coleen Phillimore
On Thu, 29 Jun 2023 17:23:44 GMT, Matias Saavedra Silva wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a comment about u1 cast to new_index for the ldc bytecode. > > src/hotspot/share/prims/jvmtiRedefine

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread Matias Saavedra Silva
On Thu, 29 Jun 2023 17:29:50 GMT, Coleen Phillimore wrote: >> Please review change for mostly fixing return types in the constant pool and >> metadata to fix -Wconversion warnings in JVMTI code. The order of >> preference for changes are: 1. change the types to more distinct types >> (fields

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v3]

2023-06-29 Thread Coleen Phillimore
> Please review change for mostly fixing return types in the constant pool and > metadata to fix -Wconversion warnings in JVMTI code. The order of preference > for changes are: 1. change the types to more distinct types (fields in the > constant pool are u2 because that's their size in the clas

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v2]

2023-06-29 Thread Coleen Phillimore
On Thu, 29 Jun 2023 14:34:06 GMT, Frederic Parain wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fred's comments. > > src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp line 399: > >> 397: int length

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code [v2]

2023-06-29 Thread Coleen Phillimore
> Please review change for mostly fixing return types in the constant pool and > metadata to fix -Wconversion warnings in JVMTI code. The order of preference > for changes are: 1. change the types to more distinct types (fields in the > constant pool are u2 because that's their size in the clas

Re: RFR: 8311077: Fix -Wconversion warnings in jvmti code

2023-06-29 Thread Frederic Parain
On Thu, 29 Jun 2023 12:17:23 GMT, Coleen Phillimore wrote: > Please review change for mostly fixing return types in the constant pool and > metadata to fix -Wconversion warnings in JVMTI code. The order of preference > for changes are: 1. change the types to more distinct types (fields in the

RFR: 8311077: Fix -Wconversion warnings in jvmti code.

2023-06-29 Thread Coleen Phillimore
Please review change for mostly fixing return types in the constant pool and metadata to fix -Wconversion warnings in JVMTI code. Tested with tier1-4. - Commit messages: - Fix -Wconversion warnings in jvmti code. Changes: https://git.openjdk.org/jdk/pull/14710/files Webrev: https: