diff -r 9d3abb1b7b1f -r 35ebea32a23c src/hotspot/share/code/nmethod.cpp --- a/src/hotspot/share/code/nmethod.cpp Mon Nov 05 12:36:23 2018 +0100 +++ b/src/hotspot/share/code/nmethod.cpp Mon Nov 05 12:36:23 2018 +0100 @@ -42,6 +42,7 @@ #include "logging/logStream.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" +#include "oops/access.inline.hpp" #include "oops/method.inline.hpp" #include "oops/methodData.hpp" #include "oops/oop.inline.hpp" @@ -1334,6 +1335,13 @@ CodeCache::free(this); } +oop nmethod::oop_at(int index) const { + if (index == 0) { + return NULL; + } + return NativeAccess::oop_load(oop_addr_at(index)); +} + // // Notify all classes this nmethod is dependent on that it is no // longer dependent. This should only be called in two situations.