RFR: 8268349: Provide more detail in JEP 411 warning messages

Alan Bateman alanb at openjdk.java.net
Tue Jun 8 18:31:18 UTC 2021


On Tue, 8 Jun 2021 18:22:55 GMT, Weijun Wang <weijun at 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.
>> 
>> 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.

I think it would be simpler to start out without the caller cache. Sorry the sentence got garbled, I was trying to repeat what I said above that WeakHashMap is not synchronized so you would need to add synchronization to use it.

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

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


More information about the net-dev mailing list