RFR: 8263709: Cleanup THREAD/TRAPS/CHECK usage in JRT_ENTRY routines [v2]

David Holmes dholmes at openjdk.java.net
Thu Apr 8 23:40:18 UTC 2021


On Thu, 8 Apr 2021 12:18:12 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixed CHECK on return statement.
>
> src/hotspot/share/c1/c1_Runtime1.cpp line 180:
> 
>> 178: static void deopt_caller() {
>> 179:   if ( !caller_is_deopted()) {
>> 180:     JavaThread* current = JavaThread::current();
> 
> It looks like both of these functions could be passed JavaThread from the callers.  You could leave this as a cleanup though.  It would eliminate two explicit JavaThread::current calls.

That's a good additional cleanup - thanks. Fixed.

> src/hotspot/share/c1/c1_Runtime1.cpp line 695:
> 
>> 693:   NOT_PRODUCT(_throw_class_cast_exception_count++;)
>> 694:   ResourceMark rm(current);
>> 695: char* message = SharedRuntime::generate_class_cast_message(current, object->klass());
> 
> Is this indentation off?

Fixed. (My emacs can't figure out how to indent when these macros are used. :( )

> src/hotspot/share/interpreter/interpreterRuntime.cpp line 1157:
> 
>> 1155: JRT_END
>> 1156: 
>> 1157: JRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *current, oopDesc* obj,
> 
> nit: JavaThread* current

Fixed

> src/hotspot/share/interpreter/interpreterRuntime.cpp line 1237:
> 
>> 1235: JRT_END
>> 1236: 
>> 1237: JRT_ENTRY(void, InterpreterRuntime::post_method_entry(JavaThread *current))
> 
> Also move the star here and one below.

Fixed all.

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

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


More information about the hotspot-runtime-dev mailing list