RFR: 8307517: Add VMErrorCallback infrastructure to extend hs_err dumping

Stefan Karlsson stefank at openjdk.org
Fri May 5 16:45:34 UTC 2023


On Fri, 5 May 2023 13:47:57 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> This looks quite neat but I'm not clear on the need for the VMErrorCallbackMark - can't the callback link/unlink itself at construction/destruction?

Yes it could.

It has a couple of drawbacks, but it's unclear to me if those are important:
1) The linking of the callbacks happens before they have been fully constructed
2) It makes a strong tie between the lifecycle of the callback and the linking/unlinking. For some callbacks that might not be preferable.

The main advantage is that there's one less class and the linking-site can become a one-liner. 

I can go either way, so it would be good if the reviewers could chime in with their preference. This is what it would look like:
https://github.com/openjdk/jdk/compare/master...stefank:jdk:8307517_VMErrorCallback_2

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13824#issuecomment-1536507888


More information about the hotspot-dev mailing list