RFE: 4508774: Implementation for GetOperandStack
jan.siersch at uni-ulm.de
Mon Feb 10 09:21:28 PST 2014
this post is about a feature request for JVMTI to allow access to the
As part of a project I'm working on, I have implemented a set of
functions, namely GetOperand<Type>, which provide the requested
functionality, and I would like to provide this implementation to the
OpenJDK project. As I am not a regular contributor to the OpenJDK
project, I do not have an account for the bug tracker and cannot post my
I have attached a diff with the modified hotspot source code to this
e-mail. This implementation adds a new function category "Operand Stack"
to JVMTI that contains 5 functions (GetOperandObject, GetOperandInt,
GetOperandLong, GetOperandFloat, GetOperandDouble) which can be used the
same way as the corresponding GetLocal<Type> functions.
All changes to the source files are purely additive. No existing
functions are modified. One new VM Operation "GetOperand" is added and
implemented. The changes are based on the "JDK 7 Updates Master" branch.
I have compiled OpenJDK locally with these changes and had no problems
However this implementation still has one drawback: the functions are
not type-safe, as I was unable to find the necessary information within
hotspot to do proper type-checking of operands. For me this is not a
problem, because in my project I have a way of inferring operand types
externally, but for proper production code type-checking should be added
(there is a FIXME in the added source for this purpose).
I hope someone reading this list has the time to look at this code and
if they find it suitable, to integrate it into the OpenJDK project.
About licensing: you may use this code in whatever way, shape or form
you see fit.
More information about the hotspot-dev