RFR: JDK-8302656: Missing spaces in output of -XX:+CIPrintMethodCodes
Tobias Holenstein
tholenstein at openjdk.org
Fri Feb 17 14:45:55 UTC 2023
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)
-------------
Commit messages:
- JDK-8302656: Missing spaces in output of -XX:+CIPrintMethodCodes
Changes: https://git.openjdk.org/jdk/pull/12591/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12591&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8302656
Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/12591.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12591/head:pull/12591
PR: https://git.openjdk.org/jdk/pull/12591
More information about the hotspot-dev
mailing list