RFE: 4508774: Implementation for GetOperandStack (original) (raw)
Jan Siersch jan.siersch at uni-ulm.de
Mon Feb 10 09:21:28 PST 2014
- Previous message: RFR: 8034094: SA agent can't compile when jni_x86.h is used
- Next message: RFE: 4508774: Implementation for GetOperandStack
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
this post is about a feature request for JVMTI to allow access to the operand stack: https://bugs.openjdk.java.net/browse/JDK-4508774
As part of a project I'm working on, I have implemented a set of functions, namely GetOperand, 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 code there.
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 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 with them.
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.
Regards, Jan
- Previous message: RFR: 8034094: SA agent can't compile when jni_x86.h is used
- Next message: RFE: 4508774: Implementation for GetOperandStack
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]