RFR: Minor changes
Aleksey Shipilev
shade at openjdk.java.net
Thu Oct 8 10:09:49 UTC 2020
On Thu, 8 Oct 2020 09:54:23 GMT, Sergey Ponomarev <github.com+415502+stokito at openjdk.org> wrote:
> 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.
This looks fine, with minor comments. _In the future_, please don't hesitate to split PRs by area and have a
descriptive synopsis for them. For now, changing the synopsis to something like: "Cleanups: README typos and links,
.gitignore, leftover JDK migrations, column widths" is enough.
Say "/integrate" once bots clear the pre-integration checks.
(The previous review should have been explicit approval)
README.md line 166:
> 164:
> 165: * [IntelliJ IDEA JOL Plugin](https://github.com/stokito/IdeaJol) can estimate object size and has an inspection to
> find heavy classes 166: * Heap dump `*.hprof` files analysers:
Heap dump decoding is very experimental in JOL, and hardly a target for current development. So listing heap dump
analyzers looks excessive.
-------------
PR: https://git.openjdk.java.net/jol/pull/7Marked as reviewed by shade (Committer).
More information about the jol-dev
mailing list