RFR: 8162427: fix indent in CompileTask::print_tty

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jul 25 11:53:02 UTC 2016


Hi Chris,

pushed it:
http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/95a1164892be

Best regards,
Tobias

On 23.07.2016 00:47, Christian Thalinger wrote:
> 
>> On Jul 22, 2016, at 12:39 PM, Christian Thalinger <cthalinger at twitter.com> wrote:
>>
>>
>>> On Jul 22, 2016, at 9:41 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>>>
>>> I would like to avoid going through RFE approval process for this small change with explanation.
>>> Please, convert it to bug.
>>
>> Done.
>>
>>> Fix is good.
>>
>> jprt submit… oh, wait! :-)
> 
> Here is the changeset:
> 
> 
> 
> 
>>
>>>
>>> Thanks,
>>> Vladimir
>>>
>>> On 7/22/16 11:24 AM, Christian Thalinger wrote:
>>>> Most annoying code snippet ever:
>>>>
>>>> void CompileTask::print_tty() {
>>>> ttyLockerttyl; // keep the following output all in one block
>>>> // print compiler name if requested
>>>> if (CIPrintCompilerName) tty->print("%s:", CompileBroker::compiler_name(comp_level()));
>>>>    print(tty);
>>>> }
>>>>
>>>> The indent of print "suggests" it is under the if but of course it's not. Use braces!
>>>>
>>>> Here is the patch:
>>>>
>>>> diff -r 479631362b49 src/share/vm/compiler/compileTask.cpp
>>>> --- a/src/share/vm/compiler/compileTask.cppThu Jun 16 20:57:05 2016 +0000
>>>> +++ b/src/share/vm/compiler/compileTask.cppFri Jul 22 08:22:35 2016 -1000
>>>> @@ -186,8 +186,10 @@
>>>> void CompileTask::print_tty() {
>>>>   ttyLocker ttyl;  // keep the following output all in one block
>>>>   // print compiler name if requested
>>>> -  if (CIPrintCompilerName) tty->print("%s:", CompileBroker::compiler_name(comp_level()));
>>>> -    print(tty);
>>>> +  if (CIPrintCompilerName) {
>>>> +    tty->print("%s:", CompileBroker::compiler_name(comp_level()));
>>>> +  }
>>>> +  print(tty);
>>>> }
>>>>
>>>>
>>>> // ------------------------------------------------------------------
>>>>
>>
> 


More information about the hotspot-compiler-dev mailing list