On Tue, 8 Jun 2021 17:15:29 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> I thought about that but not sure of performance impact. Is the worst 
>> problem that more than one warnings will be printed for a single caller? 
>> It's not really harmless.
>> 
>> As for the frame, if the warning message only contain the caller class name 
>> and its code source, why is it worth using a key of multiple frames? The 
>> message will look the same.
>
>> I thought about that but not sure of performance impact. Is the worst 
>> problem that more than one warnings will be printed for a single caller? 
>> It's not really harmless.
>> 
>> As for the frame, if the warning message only contain the caller class name 
>> and its code source, why is it worth using a key of multiple frames? The 
>> message will look the same.
> 
> WeakHashMap access needs synchronization. Whether we need to cache to avoid 
> excessive warnings isn't clear. If the SM is enabled once and never 
> disabled/re-enabled then caching isn't interesting.  On the other hand if 
> there are programs that are enabling/disabling to execute subsets of code 
> then maybe it is. Maybe we should just drop this and see if there is any 
> feedback on the repeated warning?

Not sure what you meant by "WeakHashMap access synchronization", it's just a 
noun without any other parts. Do you think synchronization is necessary?

For the cache, I'm OK to drop it at the moment.

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

PR: https://git.openjdk.java.net/jdk/pull/4400

Reply via email to