RFR: 8264126: Remove TRAPS/THREAD parameter for class loading functions [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Thu Mar 25 02:56:04 UTC 2021
On Wed, 24 Mar 2021 19:24:54 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/systemDictionary.cpp line 1842:
>>
>>> 1840: klass = Universe::typeArrayKlassObj(t);
>>> 1841: } else {
>>> 1842: MutexLocker mu(SystemDictionary_lock);
>>
>> Since this is a clean up RFE, I think it's better to avoid changes that may impact performance. I would avoid adding calls to Thread::current() -- except for cases inside logging code. Maybe change TRAPS to Thread* current and move it to the first parameter? I.e., how you changed SystemDictionaryShared::check_linking_constraints().
>
> This will not impact performance though, since we're already taking a lock. Modern Thread::current() is relatively cheap. It looks a lot nicer without the thread parameter.
Ok, I added it back as requested by Ioi and David. It still looks worse and will have no benefit for performance.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3176
More information about the hotspot-dev
mailing list