RFR: 8376568: Change Thread::getStackTrace to use handshake op for all cases [v2]

Alan Bateman alanb at openjdk.org
Fri Jan 30 09:01:58 UTC 2026


On Fri, 30 Jan 2026 04:40:11 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> A null `java_thread` is only possible for the unmounted vthread case. The oop should always be a valid `java.lang.Thread` though. Maybe `thread_oop` should be initialized to `nullptr` and the assert at line 1914 be just `assert(thread_oop != nullptr, "Missing Thread oop");`?
>
> Okay so `!is_virtual => java_thread != nullptr`.

> Maybe thread_oop should be initialized to nullptr and the assert at line 1914 be just assert(thread_oop != nullptr, "Missing Thread oop");?

That would be simpler again, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29461#discussion_r2745279902


More information about the core-libs-dev mailing list