The HeapDumper strategy interface makes some assumptions that are HotSpot-specific. This became apparent while implementing support for dumping the heap on OpenJ9. For example, HotSpot requires a file location for the heap dump that much end with .hprof while OpenJ9 take an optional file location pattern and returns the location that it actually used. The live parameter is also HotSpot-specific.

We need to evolve HeapDumper to remove these assumptions. It's not clear to me how to do so in a backwards-compatible manner so this may need to wait till 3.0.

Comment From: philwebb

We're going to change HeapDumper to return a File and leave the implementation to decide on the file extension. We're also going to pass Boolean rather than boolean for live so that the implementation can throw an exception if the flag isn't supported.