-
Enhancement
-
Resolution: Fixed
-
P4
-
17, 21, 22
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8329900 | 21.0.4 | Aleksey Shipilev | P4 | Resolved | Fixed | b01 |
Heap dumping performance is something our users frequently complain about. Modern JDKs already implement parallel heap dumps from diagnostic commands, which is nice. But there are single-threaded improvements that we can easily do.
If you profile current heap dumping code, then you would see that walking the class data looking for fields takes the overwhelming majority of execution time. It got much worse in JDK 21 withJDK-8292818, where looking for field data involves re-parsing the class metadata stream all the time. See `jdk21-heapdump-png` for sample profile for sample reproducer (`HeapDump.java`) on JDK 21.
Since heap dumping code runs sporadically, we can cache some class metadata that heap dumping code needs on hot paths.
If you profile current heap dumping code, then you would see that walking the class data looking for fields takes the overwhelming majority of execution time. It got much worse in JDK 21 with
Since heap dumping code runs sporadically, we can cache some class metadata that heap dumping code needs on hot paths.
- backported by
-
JDK-8329900 Improve heap dump performance with class metadata caching
- Resolved
- relates to
-
JDK-8292818 replace 96-bit representation for field metadata with variable-sized streams
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/d5f44dca
-
Commit openjdk/jdk/03db8281
-
Review openjdk/jdk21u-dev/8
-
Review openjdk/jdk21u/388
-
Review openjdk/jdk/16545
(2 links to)