RFR: 8295060: Port PrintDeoptimizationDetails to UL [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Oct 18 13:21:30 UTC 2022


On Thu, 13 Oct 2022 02:24:40 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I should've said "crosses initialization error", not "crossing."
>> 
>> Check out this SO question: https://stackoverflow.com/questions/11578936/getting-a-bunch-of-crosses-initialization-error
>> 
>> So `LogTarget(Debug, deoptimization) lt;` is the error here. I *think* that we can inline it if we introduce a surrounding  scope, is that preferable to you?
>> 
>> So:
>> 
>> 
>> case T_OBJECT:
>> *addr = value->get_int(T_OBJECT);
>> { // Scope off LogTarget
>>     LogTarget(Debug, deoptimization) lt;
>>     if (lt.is_enabled()) {
>>       LogStream ls(lt);
>>       ls.print(" - Reconstructed expression %d (OBJECT): ", i);
>>       oop o = cast_to_oop((address)(*addr));
>>       if (o == NULL) {
>>         ls.print_cr("NULL");
>>       } else {
>>         ResourceMark rm;
>>         ls.print_raw_cr(o->klass()->name()->as_C_string());
>>       }
>>     }
>> }
>
> Yes adding the scope is fine and preferable. Thanks.

Fixed

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

PR: https://git.openjdk.org/jdk/pull/10645


More information about the hotspot-dev mailing list