On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Fri, 7 Feb 2025 19:58:12 GMT, Vladimir Ivanov wrote:
> Good point. Moreover, it seems most of intrinsics on Class queries can be
> replaced with a flag bit check on the mirror. (Do we have 16 unused bits in
> Class::modifiers after this change?)
Yes, I think so. isArray and isPrimitive def
On Fri, 7 Feb 2025 19:13:07 GMT, Coleen Phillimore wrote:
> I think the intrinsic for isInterface can be removed
Good point. Moreover, it seems most of intrinsics on Class queries can be
replaced with a flag bit check on the mirror. (Do we have 16 unused bits in
Class::modifiers after this cha
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
On Thu, 6 Feb 2025 14:31:28 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Thu, 6 Feb 2025 14:31:28 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Thu, 6 Feb 2025 13:08:31 GMT, Coleen Phillimore wrote:
>> Does `static final` help here?
>
> Yes. Yes it does.
Cases when a class mirror is a compile-time constant are already
well-optimized. Non constant cases are the ones where missing optimization
opportunities arise.
In this particul
On Thu, 6 Feb 2025 12:08:59 GMT, Coleen Phillimore wrote:
>> If Class had other fields smaller than `int`, would be consider making this
>> something like `char` to save space (allowing all the sub-word fields to be
>> compacted)?
>
> I thought of doing this since I made modifiers u2 in the Hot
On Wed, 5 Feb 2025 21:26:29 GMT, Dean Long wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix copyright and param name
>
> src/hotspot/share/oops/instanceKlass.hpp line 1128:
>
>> 1126: #endif
>> 1127:
>> 1
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
On Wed, 5 Feb 2025 21:24:25 GMT, Dean Long wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix copyright and param name
>
> src/hotspot/share/compiler/compileLog.cpp line 116:
>
>> 114: print(" unload
On Thu, 6 Feb 2025 04:37:17 GMT, Chen Liang wrote:
>> OK, if the extra load turns out to be a problem in the future, we could look
>> into why the compilers are generating the load when the Class is
>> known/constant. If the old intrinsic was able to pull the constant out of
>> the Klass, the
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Wed, 5 Feb 2025 21:44:37 GMT, Dean Long wrote:
>> @DanHeidinga Great explanation, thank you!
>
> If Class had other fields smaller than `int`, would be consider making this
> something like `char` to save space (allowing all the sub-word fields to be
> compacted)?
I thought of doing this si
On Wed, 5 Feb 2025 20:23:05 GMT, Dean Long wrote:
>> Name Cnt Base Error Test Error Unit Change
>> getAppArrayModifiers 30 0.923 ± 0.004 1.260 ± 0.001 ns/op 0.73x (p
>> = 0.000*)
>> getAppArrayModifiersFinal 30 0.922 ± 0.000 1.260 ± 0.001 ns/op 0.73x (p
On Thu, 12 Dec 2024 10:16:01 GMT, Viktor Klang wrote:
>> @viktorklang-ora `@Stable` is not about how the field was set, but about the
>> JIT observing a non-default value at compile time. If it observes a
>> non-default value, it can treat it as a compile time constant.
>
> @DanHeidinga Great
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Wed, 5 Feb 2025 19:42:02 GMT, Coleen Phillimore wrote:
>> test/micro/org/openjdk/bench/java/lang/reflect/Clazz.java line 73:
>>
>>> 71: public int getAppArrayModifiers() {
>>> 72: return clazzArray.getClass().getModifiers();
>>> 73: }
>>
>> I'm guessing this is the benchmark
On Wed, 5 Feb 2025 01:10:39 GMT, Dean Long wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix copyright and param name
>
> test/micro/org/openjdk/bench/java/lang/reflect/Clazz.java line 73:
>
>> 71: publ
On Tue, 4 Feb 2025 14:43:51 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
On Tue, 4 Feb 2025 13:36:44 GMT, Alan Bateman wrote:
>> Coleen Phillimore has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix copyright and param name
>
> src/hotspot/share/oops/arrayKlass.hpp line 2:
>
>> 1: /*
>> 2: * Copyright (c) 1
On Tue, 4 Feb 2025 14:40:47 GMT, Coleen Phillimore wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so there's no real need for the jdk code to call into the VM to get
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Wed, 11 Dec 2024 18:17:43 GMT, Dan Heidinga wrote:
>> Yeah, I was just thinking whether something set from inside the VM which is
>> marked @Stable is constant-folded :)
>
> @viktorklang-ora `@Stable` is not about how the field was set, but about the
> JIT observing a non-default value at c
On Wed, 11 Dec 2024 15:06:54 GMT, Viktor Klang wrote:
>> I don't think this needs to be stable - finals in java.lang is trusted by
>> the JIT compiler.
>
> Yeah, I was just thinking whether something set from inside the VM which is
> marked @Stable is constant-folded :)
@viktorklang-ora `@Stab
On Wed, 11 Dec 2024 15:06:54 GMT, Viktor Klang wrote:
>> I don't think this needs to be stable - finals in java.lang is trusted by
>> the JIT compiler.
>
> Yeah, I was just thinking whether something set from inside the VM which is
> marked @Stable is constant-folded :)
I don't think @Stable w
On Wed, 11 Dec 2024 14:52:48 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/lang/Class.java line 1006:
>>
>>> 1004: private final transient int modifiers; // Set by the VM
>>> 1005:
>>> 1006: // package-private
>>
>> @coleenp Could this field be @Stable, or does that only
On Wed, 11 Dec 2024 10:24:03 GMT, Viktor Klang wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so ther
On Tue, 17 Dec 2024 15:54:48 GMT, ExE Boss wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so there's
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Wed, 11 Dec 2024 18:15:57 GMT, Dan Heidinga wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so ther
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Mon, 9 Dec 2024 21:35:42 GMT, ExE Boss wrote:
>> yes. it is needed.
>
> This is **C++**, so yes.
> Suggestion:
>
> macro(_modifiers_offset, k, vmSymbols::modifiers_name(),
> int_signature,false);
I see, there's a trailing semi somewhere in the expansion of this macro so it
On Mon, 9 Dec 2024 20:27:52 GMT, Coleen Phillimore wrote:
>> src/hotspot/share/classfile/javaClasses.cpp line 1504:
>>
>>> 1502: macro(_reflectionData_offset, k, "reflectionData",
>>> java_lang_ref_SoftReference_signature, false); \
>>> 1503: macro(_signers_offset, k,
On Mon, 9 Dec 2024 19:46:43 GMT, Chen Liang wrote:
>> The Class.getModifiers() method is implemented as a native method in
>> java.lang.Class to access a field that we've calculated when creating the
>> mirror. The field is final after that point. The VM doesn't need it
>> anymore, so there's
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote:
> The Class.getModifiers() method is implemented as a native method in
> java.lang.Class to access a field that we've calculated when creating the
> mirror. The field is final after that point. The VM doesn't need it anymore,
> so ther
50 matches
Mail list logo