On Sun, 26 Apr 2026 19:52:12 GMT, Markus Grönlund <[email protected]> wrote:

> Attempting to add an injected field did not work because you cannot reflect 
> an injected field, not even using Unsafe. So I cannot read the value of an 
> injected field from Java. Either we go with the encoding in the slot field, 
> or I will add a separate non-final field "jfrEpoch" to 
> java.lang.reflect.Field. Thoughts?

I assume an injected field would be feasible if all the access were via JVM 
funtions rather than reflect/Unsafe but that would add complexity as it might 
end up needing instrinics. In that case, an explicit field would be better so 
the slot field is not overridden.

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

PR Comment: https://git.openjdk.org/jdk/pull/30922#issuecomment-4325267363

Reply via email to