According to javadoc for InspectedFrame.getLocal(I) HotSpotStackFrameReference.getLocal should return an object from the locals list. But it looks like it works only for interpreted frames:
The following output shows that at compilation levels 3 and 4 frames HotSpotStackFrameReference object doesn't contain locals
HotSpotStackFrameReference [stackPointer=140707345981904, frameNumber=0, bci=14, method=HotSpotMethod<MaterializeVirtualObjectsTest.testFrame(Object, Integer, Executable)>, locals=[compiler.jvmci.MaterializeVirtualObjectsTest@78084af3, two, 1100, private void compiler.jvmci.MaterializeVirtualObjectsTest.testFrame(java.lang.Object,java.lang.Integer,java.lang.reflect.Executable), two], localIsVirtual=null]
Has virtual: false
Is compiled: false, level: 0
HotSpotStackFrameReference [stackPointer=140707345981864, frameNumber=0, bci=14, method=HotSpotMethod<MaterializeVirtualObjectsTest.testFrame(Object, Integer, Executable)>, locals=[null, null, null, null, null], localIsVirtual=null]
Has virtual: false
Is compiled: true, level: 3
HotSpotStackFrameReference [stackPointer=140707345981952, frameNumber=0, bci=14, method=HotSpotMethod<MaterializeVirtualObjectsTest.testFrame(Object, Integer, Executable)
>, locals=[null, null, null, null, null], localIsVirtual=null]
Has virtual: false
Is compiled: true, level: 4