On Mon, 16 Nov 2026 11:43:24 GMT, Serguei Spitsyn <[email protected]> wrote:

>> Alan Bateman has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains 17 additional 
>> commits since the last revision:
>> 
>>  - Drop: Constructor invocations in caller frames are not considered.
>>  - Update comment
>>  - Ignore this-escape
>>  - Merge branch 'master' into WatchedField
>>  - Add @bug to test
>>  - Merge branch 'master' into WatchedField
>>  - Improve wording, drop some commas
>>  - Spec/docs improvements
>>  - Merge branch 'master' into WatchedField
>>  - Add fast path
>>  - ... and 7 more: https://git.openjdk.org/jdk/compare/513d3a15...10f1e57f
>
> test/hotspot/jtreg/serviceability/jvmti/WatchedField/WatchStrictInitFields.java
>  line 879:
> 
>> 877: 
>> 878:     Watch watch(Class<?> clazz, String fieldName) {
>> 879:         long fieldID = fieldID(clazz, fieldName);
> 
> Q: Can the `fieldID` be requested with the `fieldID()` when the class has not 
> been prepared yet, e.g. when the method `watch()` is called at line 851?

Right now, the JUnit discovery is causing all these test classes to be loaded 
and linked. So if a test class were missed then it would mean that 
GetClassFields fails with JVMTI_ERROR_CLASS_NOT_PREPARED. I can add a 
getDeclaredFields to watch to make it explicit if that helps.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33841#discussion_r4587454611

Reply via email to