RFR: 8193513: add support for printing a stack trace on class loading [v2]

Doug Simon dnsimon at openjdk.org
Wed Jun 21 14:48:06 UTC 2023


On Wed, 21 Jun 2023 12:49:39 GMT, David Holmes <dholmes at openjdk.org> wrote:

> you are only showing Java frames

I'm not aware of a way to print the native frames (outside of hs-err logging). It would be great if such a mechanism exists.

> if it it might not match too many things

If you make the filter a FQN, you can be very specific.

>> When I use `-XX:TraceClassLoadingCause=*`, it all works which suggests there's always a current thread by the time class loading occurs. That said, I will add a null check just to be sure.
>
> Sorry my mistake, yes we have JavaThread::current() before loading any Java classes - but it won't have an associated threadObj().

That doesn't matter as we're not printing the thread name.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14553#discussion_r1237129281
PR Review Comment: https://git.openjdk.org/jdk/pull/14553#discussion_r1237130958


More information about the hotspot-dev mailing list