RFR: 8204531: Remove unused chars following '\0'
Yasumasa Suenaga
yasuenag at gmail.com
Thu Jun 7 12:43:22 UTC 2018
Hi all,
Please review this change:
webrev:
http://cr.openjdk.java.net/~ysuenaga/JDK-8204531/webrev.00/
JBS:
https://bugs.openjdk.java.net/browse/JDK-8204531
We can use `jhsdb jsnap` to check all PerfData.
String values in PerfData are defined as jbyte array, but JSnap cannot handle it well as following:
```
$ jhsdb jsnap --pid 28542 --all | less
sun.gc.cause=No GC^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
```
You can see this value via `less` and `vim` on Linux. `^@` shows it is non-ascii character.
PerfDataEntry has null-terminated C string. So we should restore as it in Java layer.
Thanks,
Yasumasa
More information about the serviceability-dev
mailing list