RFR: 8369736 - Add management interface for AOT cache creation [v4]
    Dan Heidinga 
    heidinga at openjdk.org
       
    Mon Nov  3 21:35:01 UTC 2025
    
    
  
On Mon, 3 Nov 2025 11:01:23 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Mat Carter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated test based on comments
>
> src/jdk.management/share/classes/jdk/management/HotSpotAOTCacheMXBean.java line 104:
> 
>> 102:        * </pre></blockquote>
>> 103:        *
>> 104:        * @return {@code true} if a recording was in progress and has been ended successfully; {@code false} otherwise.
> 
> Someone is bound to ask what happens if the "endRecording" operation is performed concurrently and there is recording in progress. Does one or all return true? I don't think it matters, the bigger issue here is that returning false means the recording has already ended or it failed. If it failed, why did it fail? I realize the intention is to add some properties and further operations to this MXBean but I think it would be good to think through if starting with a boolean returning operation is going to be problematic in the future.
I see a couple of cases for when `endRecording` is called:
1) Within the same process to generate a cache - given the api will only return `true` to one caller, that caller is the only one who can be responsible for taking further action (copying the cache somewhere, etc).  Already ended or failed makes no difference operationally.
2) From a monitoring process - again only the successful case matters.  All failures (already ended or failed) are indistinguishable.  No further action can be taken by the observer.  It's only the success case that matters
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28010#discussion_r2487912197
    
    
More information about the serviceability-dev
mailing list