RFR: Minor changes
Sergey Ponomarev
github.com+415502+stokito at openjdk.java.net
Thu Oct 8 09:57:51 UTC 2020
Some non critical changes:
1. Currently the repo has `.hgignore` file but don't have a `.gitignore`. I copied it from `.hgignore` but not sure if
we can remove it as not used. 2. I shamelessly added my IdeJOL plugin to README. There is also mentioned that we can
create an issue here on GitHub but currently the Issues tab is disabled. The same is for JMH repo. Can you open the
issues tab? 3. I noted that in `StringCompress` we have a minor bug where in println format pattern we have less
placeholders than params. While investigated it turned out that it will be better to swap "model" and "hprof file"
columns for better output. Now it looks like: "total", "String", "String+bool", "String+oop", "char[]-2b",
"char[]-1b", "char[]-1b-comp", "savings(same)", "savings(bool)",
"savings(oop)", "model", "hprof file" 3918376,
59992, 59992, 59992, 0, 0, 0, 0.000,
0.000, 0.000, "VM Layout Simulation (X32 model, 8-byte aligned)", "~/empty.hprof"
4323184, 119984, 119984, 119984, 0, 0, 0,
0.000, 0.000, 0.000, "VM Layout Simulation (X64 model, 8-byte aligned)",
"~/empty.hprof" 4056392, 119984, 119984, 119984, 0, 0,
0, 0.000, 0.000, 0.000, "VM Layout Simulation (X64 model (compressed oops), 8-byte
aligned)", "~/empty.hprof" 4116336, 119984, 119984, 119984, 0, 0,
0, 0.000, 0.000, 0.000, "VM Layout Simulation (X64 model (compressed oops), 16-byte
aligned)", "~/empty.hprof"
Also I tried to add a unit test for heap dump analyzer because it currently doesn't have any coverage.
The test should analyze a heap dump and compare results. But got few problems that want to discuss and since there is a
closed Issues tab then I'll write it here. First if all I made a heap dump of a "Hello World" application on JDK14 and
the resulted file even gzipped is more than 900Kb. I don't want to add such a big file into test resources. So here I
see two solutions: 1. Create a synthetic heap dump with only few rows.
2. Start a small application and get it's thread dump. This wont work because each time we'll get some classes changed.
Can you create a small heap dump file for a testing?
Another problem I faced when tried to test `StringComprees` with my empty thread dump and got an exception
`org.openjdk.jol.heap.HeapDumpException: String.value array 34355822528 is not char[] in empty.hprof.gz, skipping` This
is probably a bug in the JOL itself so I'll attach the
[empty.hprof.gz](https://github.com/openjdk/jol/files/5346882/empty.hprof.gz) for you to reproduce.
-------------
Commit messages:
- README.md: Add related projects
- README.md: add link to unresolved bugs
- StringCompress: swap "model" and "hprof file"
- StringCompress: histo: extend non-compressible column
- .gitignore
- ObjectShapes: use generic
Changes: https://git.openjdk.java.net/jol/pull/7/files
Webrev: https://webrevs.openjdk.java.net/?repo=jol&pr=7&range=00
Stats: 28 lines in 4 files changed: 14 ins; 0 del; 14 mod
Patch: https://git.openjdk.java.net/jol/pull/7.diff
Fetch: git fetch https://git.openjdk.java.net/jol pull/7/head:pull/7
PR: https://git.openjdk.java.net/jol/pull/7
More information about the jol-dev
mailing list