RFR: 8261479: CDS runtime code should check exceptions [v4]

David Holmes dholmes at openjdk.java.net
Wed Mar 24 02:07:42 UTC 2021


On Mon, 22 Mar 2021 21:00:35 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> src/hotspot/share/classfile/klassFactory.cpp line 219:
>> 
>>> 217: #if INCLUDE_CDS
>>> 218:   if (Arguments::is_dumping_archive()) {
>>> 219:     ClassLoader::record_result(THREAD, result, stream);
>> 
>> There are many non-exception related uses of THREAD in this method. This seems like a candidate for introducing:
>> JavaThread* current = THREAD->as_Java_thread()
>> and using "current" throughout instead of THREAD in those non-exception cases.
>
> I've made the changes as you suggested.

Just for completeness I reverted my position on this due to objections from Coleen about this kind of change (made elsewhere). So we stick with THREAD here.

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

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


More information about the hotspot-runtime-dev mailing list