RFR: JDK-8302656: Missing spaces in output of -XX:+CIPrintMethodCodes

Tobias Holenstein tholenstein at openjdk.org
Mon Feb 20 08:38:36 UTC 2023


On Fri, 17 Feb 2023 17:52:08 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> When printing bytecode and method data with `-XX:+CIPrintMethodCodes` we got some lines with missing whitespace: 
>> ``` 
>>   11760bci: 1895VirtualCallData count(0) nonprofiled_count(0) entries(0) 
>> ``` 
>> 
>> The reason for this is the use of `st->fill_to(6);` which fills up the stream with whitespace up to length 6. In our case we have 2 whitespaces before and then a  numbers >=1000 which already adds up to 6+ characters in the stream.
>> 
>> **Solution**: Always add a whitespace afterwards. Now 
>> 
>> 
>>   0    bci: 2    VirtualCallData    count(0) nonprofiled_count(0) entries(0)
>>   48   bci: 19   VirtualCallData    count(0) nonprofiled_count(0) entries(0)
>>   552  bci: 109  VirtualCallData    count(0) nonprofiled_count(0) entries(0)
>>   7320 bci: 1207 VirtualCallData    count(0) nonprofiled_count(0) entries(0)
>>   11760 bci: 1895 VirtualCallData count(0) nonprofiled_count(0) entries(0)
>
> Good and trivial.

Thank you @vnkozlov and @TobiHartmann for the reviews!

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

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


More information about the hotspot-dev mailing list