Re: RFR: 8345678: compute_modifiers should not be in create_mirror [v4]

2024-12-16 Thread Frederic Parain
On Fri, 13 Dec 2024 21:37:55 GMT, Coleen Phillimore wrote: >> This moves the modifier_flag computation to when InstanceKlass, >> ObjArrayKlass and TypeArrayKlass are created. >> >> Tested with jck:vm and tier1-4. > > Coleen Phillimore has updated the pull request incrementally with one > addit

Re: RFR: 8345678: compute_modifiers should not be in create_mirror [v3]

2024-12-13 Thread Frederic Parain
On Thu, 12 Dec 2024 14:51:02 GMT, Coleen Phillimore wrote: >> This moves the modifier_flag computation to when InstanceKlass, >> ObjArrayKlass and TypeArrayKlass are created. >> >> Tested with jck:vm and tier1-4. > > Coleen Phillimore has updated the pull request with a new target base due to

Re: RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock [v3]

2024-03-07 Thread Frederic Parain
On Thu, 7 Mar 2024 13:21:09 GMT, Coleen Phillimore wrote: >> This change creates a new sort of native recursive lock that can be held >> during JNI and Java calls, which can be used for synchronization while >> creating objArrayKlasses at runtime. >> >> Passes tier1-7. > > Coleen Phillimore ha

Re: RFR: JDK-8318563: GetClassFields should not use random access to field [v3]

2024-01-11 Thread Frederic Parain
On Wed, 10 Jan 2024 22:34:57 GMT, Alex Menkov wrote: >> FieldStream/FilteredFieldStream classes from reflectionUtils.hpp iterate >> class fields in the reverse order and use field indexes to access instead of >> forward iteration. This is performance ineffective (see >> [JDK-8317692](https://b

Re: RFR: 8317692: jcmd GC.heap_dump performance regression after JDK-8292818 [v5]

2023-10-19 Thread Frederic Parain
On Wed, 18 Oct 2023 11:25:19 GMT, Hannes Greule wrote: >> See the bug description for more information. >> >> This implementation brings down the time to take a heap dump on the example >> application in the bug report to <2 seconds on my machine. > > Hannes Greule has updated the pull request

Re: GC.heap_dump performance regression in Java 21

2023-10-06 Thread Frederic Parain
Hi Hannes, Thank you for the analysis and the proposed solution. The changes look reasonable to me, and I agree with Alex that we should either fix or get rid of the old FieldStream implementation. If we keep it, this kind of performance issue will happen again. Regards, Fred On 10/2/2

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

Re: RFR: 8310906: Fix -Wconversion warnings in runtime, oops and some code header files. [v4]

2023-06-28 Thread Frederic Parain
On Wed, 28 Jun 2023 13:17:21 GMT, Coleen Phillimore wrote: >> This is another version of PR https://github.com/openjdk/jdk/pull/14659 but >> I've added a pointer delta function in globalDefinitions.hpp to use for >> these pointer diff calculations that return int everywhere. If the name is >>

Re: RFR: 8310906: Fix -Wconversion warnings in runtime, oops and some code header files.

2023-06-26 Thread Frederic Parain
On Mon, 26 Jun 2023 17:47:25 GMT, Coleen Phillimore wrote: > More casts for size of address differences in same code space, > checked_casts<> and type changes to fix -Wconversion warnings. See CR for > details. > Tested with tier1-4. Changes requested by fparain (Reviewer). src/hotspot/cpu/a

Re: RFR: 8309673: Refactor ref_at methods in Serviceability ConstantPool

2023-06-09 Thread Frederic Parain
On Thu, 8 Jun 2023 21:42:24 GMT, Matias Saavedra Silva wrote: > The accessor methods in constantpool.cpp were previously cleaned up to allow > for different types of indices to be used, distinguishing them by the > bytecode. This patch adds the same changes to the hotspot serviceability > cod

Re: RFR: 8308655: Narrow types of ConstantPool and ConstMethod returns [v2]

2023-05-24 Thread Frederic Parain
On Wed, 24 May 2023 18:19:33 GMT, Coleen Phillimore wrote: >> This change uses a number of ways to eliminate -Wconversion warnings in the >> metadata files in the oops directory. >> >> 1. narrow return types to u2 if the accessor is for a field or value that's >> u2 (u2 is most common for con

Re: RFR: 8308655: Narrow types of ConstantPool and ConstMethod returns

2023-05-24 Thread Frederic Parain
On Tue, 23 May 2023 01:18:07 GMT, Coleen Phillimore wrote: > This change uses a number of ways to eliminate -Wconversion warnings in the > metadata files in the oops directory. > > 1. narrow return types to u2 if the accessor is for a field or value that's > u2 (u2 is most common for constMet

Re: RFR: 8306851: Move Method access flags [v3]

2023-04-28 Thread Frederic Parain
On Thu, 27 Apr 2023 14:21:23 GMT, Coleen Phillimore wrote: >> This change moves the flags from AccessFlags to either ConstMethodFlags or >> MethodFlags, depending on whether they are set at class file parse time, >> which makes them essentially const, or at runtime, which makes them needing >>

Re: RFR: 8306123: Move InstanceKlass writeable flags

2023-04-19 Thread Frederic Parain
On Tue, 18 Apr 2023 17:11:25 GMT, Coleen Phillimore wrote: > Please review this patch to move the writeable Klass AccessFlags to > InstanceKlassFlags. > Tested with tier1-4. Nice clean up. Looks good to me. - Marked as reviewed by fparain (Reviewer). PR Review: https://git.openjd

Re: RFR: 8305490: CommandProcessor command "dumpclass" produces classes with invalid field descriptors

2023-04-04 Thread Frederic Parain
On Tue, 4 Apr 2023 07:44:40 GMT, Adam Sotona wrote: > CommandProcessor command "dumpclass" produces classes with invalid field > descriptors. > > Proposed patch fixes > `sun.jvm.hotspot.oops.InstanceKlass::getFieldSignatureIndex` to return > correct `getSignatureIndex` instead of invalid `ge

Integrated: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-17 Thread Frederic Parain
On Fri, 3 Mar 2023 14:50:34 GMT, Frederic Parain wrote: > Please review this change re-implementing the FieldInfo data structure. > > The FieldInfo array is an old data structure storing fields metadata. It has > poor extension capabilities, a complex management code becaus

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v7]

2023-03-17 Thread Frederic Parain
On Fri, 17 Mar 2023 15:58:35 GMT, Frederic Parain wrote: >> Please review this change re-implementing the FieldInfo data structure. >> >> The FieldInfo array is an old data structure storing fields metadata. It has >> poor extension capabilities, a complex management

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v7]

2023-03-17 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request with a new target base due to a merge or a rebase. The pull reque

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v6]

2023-03-17 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v5]

2023-03-15 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request incrementally with one additional commit since the last revisio

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-15 Thread Frederic Parain
On Tue, 14 Mar 2023 01:25:01 GMT, Chris Plummer wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes includes and style > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oop

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-14 Thread Frederic Parain
On Tue, 14 Mar 2023 15:10:04 GMT, Doug Simon wrote: >> Access to internal modifiers is needed in >> `HotSpotResolvedJavaFieldTest.testEquivalenceForInternalFields()`. I moved >> the declaration of the method to `HotSpotResolvedJavaField`. Does this >> change work for you? > > Just use reflecti

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-14 Thread Frederic Parain
On Tue, 14 Mar 2023 15:11:36 GMT, Doug Simon wrote: >> Without this declaration, builds fail on Windows with this error: >> `error C2375: 'c2v_getDeclaredFieldsInfo': redefinition; different linkage` > > Strange - thats not needed for other `JVMCIEnv` methods called from > `jvmciCompilerToVM.cpp

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-14 Thread Frederic Parain
On Mon, 13 Mar 2023 21:35:17 GMT, Doug Simon wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes includes and style > > src/hotspot/share/jvmci/jvmciEnv.hpp line 149: > &

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-14 Thread Frederic Parain
On Mon, 13 Mar 2023 21:44:59 GMT, Doug Simon wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes includes and style > > src/hotspot/share/jvmci/vmStructs_jvmci.cpp line 416:

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-14 Thread Frederic Parain
On Mon, 13 Mar 2023 21:53:37 GMT, Doug Simon wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes includes and style > > src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/meta/Res

Re: RFR: 8301995: Move invokedynamic resolution information out of ConstantPoolCacheEntry [v2]

2023-03-13 Thread Frederic Parain
On Thu, 9 Mar 2023 21:18:19 GMT, Matias Saavedra Silva wrote: >> The current structure used to store the resolution information for >> invokedynamic, ConstantPoolCacheEntry, is difficult to interpret due to its >> ambigious fields f1 and f2. This structure can hold information for fields, >>

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v3]

2023-03-13 Thread Frederic Parain
On Mon, 13 Mar 2023 17:59:03 GMT, Chris Plummer wrote: >> The contended flag is required to be able to decode the compressed stream, >> because it signals the presence of an optional part of a field description. >> The only flag that was not required for the decoding of the stream and was >> n

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v4]

2023-03-13 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v3]

2023-03-13 Thread Frederic Parain
On Mon, 13 Mar 2023 16:41:05 GMT, Coleen Phillimore wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> SA additional caching from Chris Plummer > > src/hotspot/share/runtime/vmStr

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v3]

2023-03-13 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request incrementally with one additional commit since the last revisio

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams [v2]

2023-03-13 Thread Frederic Parain
d JVMCI, which all used to access the old FieldInfo array, have > been updated too to deal with the new FieldInfo format. > > Tested with mach5, tier 1 to 7. > > Thank you. Frederic Parain has updated the pull request incrementally with one additional commit since the last revis

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-10 Thread Frederic Parain
On Wed, 8 Mar 2023 16:25:07 GMT, Coleen Phillimore wrote: >> Please review this change re-implementing the FieldInfo data structure. >> >> The FieldInfo array is an old data structure storing fields metadata. It has >> poor extension capabilities, a complex management code because of lack of >

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-09 Thread Frederic Parain
On Wed, 8 Mar 2023 16:05:57 GMT, Coleen Phillimore wrote: >> Please review this change re-implementing the FieldInfo data structure. >> >> The FieldInfo array is an old data structure storing fields metadata. It has >> poor extension capabilities, a complex management code because of lack of >

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-09 Thread Frederic Parain
On Wed, 8 Mar 2023 15:50:05 GMT, Coleen Phillimore wrote: >> Please review this change re-implementing the FieldInfo data structure. >> >> The FieldInfo array is an old data structure storing fields metadata. It has >> poor extension capabilities, a complex management code because of lack of >

Re: RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-09 Thread Frederic Parain
On Wed, 8 Mar 2023 15:46:12 GMT, Coleen Phillimore wrote: >> Please review this change re-implementing the FieldInfo data structure. >> >> The FieldInfo array is an old data structure storing fields metadata. It has >> poor extension capabilities, a complex management code because of lack of >

Re: RFR: 8301995: Move invokedynamic resolution information out of ConstantPoolCacheEntry

2023-03-09 Thread Frederic Parain
On Mon, 27 Feb 2023 21:37:34 GMT, Matias Saavedra Silva wrote: > The current structure used to store the resolution information for > invokedynamic, ConstantPoolCacheEntry, is difficult to interpret due to its > ambigious fields f1 and f2. This structure can hold information for fields, > met

RFR: 8292818: replace 96-bit representation for field metadata with variable-sized streams

2023-03-06 Thread Frederic Parain
Please review this change re-implementing the FieldInfo data structure. The FieldInfo array is an old data structure storing fields metadata. It has poor extension capabilities, a complex management code because of lack of stong typing and semantic overloading, and a poor memory efficiency. The