On Wed, 3 Apr 2024 15:49:00 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:
>> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Removed not_used state of nmethod > > src/hotspot/share/runtime/frame.cpp line 208: > >> 206: address frame::raw_pc() const { >> 207: if (is_deoptimized_frame()) { >> 208: nmethod* nm = cb()->as_nmethod_or_null(); > > Prexisting: It's weird that this code is using the `_or_null()` version when > the code below does not null check the returned value. Before [JDK-6921352](https://bugs.openjdk.org/browse/JDK-6921352) it was: return ((nmethod*) cb())->deopt_handler_begin() - pc_return_offset; I will add assert with check for null. We definitely expect here only nmethod. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18554#discussion_r1550243895