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

Tobias Hartmann thartmann at openjdk.org
Mon Feb 20 07:33:24 UTC 2023


On Thu, 16 Feb 2023 13:39:58 GMT, Tobias Holenstein <tholenstein 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)

Looks good.

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-dev mailing list