The following code implements frame::frame_size in src/cpu/x86/vm/frame_x86.cpp: int frame::frame_size() const { RegisterMap map(JavaThread::current(), false); frame sender = this->sender(&map); return sender.sp() - sp(); } It builds the RegisterMap from the current thread. This should only works for the top frame. This will cause an assertion failure in JavaThread::current() in that the current thread is not a java thread.
|