EVALUATION
Decided to add the following ForceEarlyReturn JVMTI functions:
jvmtiError ForceEarlyReturnObject(jvmtiEnv* env, jthread thread, jobject value);
jvmtiError ForceEarlyReturnInt(jvmtiEnv* env, jthread thread, jint value);
jvmtiError ForceEarlyReturnLong(jvmtiEnv* env, jthread thread, jlong value);
jvmtiError ForceEarlyReturnFloat(jvmtiEnv* env, jthread thread, jfloat value);
jvmtiError ForceEarlyReturnDouble(jvmtiEnv* env, jthread thread, jdouble value);
jvmtiError ForceEarlyReturnVoid(jvmtiEnv* env, jthread thread);
For details, please, see the description.
###@###.### 2005-04-11 20:01:04 GMT
|
|
|
SUGGESTED FIX
6 new functions are added to JVMTI Spec:
jvmtiError ForceEarlyReturnObject(jvmtiEnv* env, jthread thread, jobject value);
jvmtiError ForceEarlyReturnInt(jvmtiEnv* env, jthread thread, jint value);
jvmtiError ForceEarlyReturnLong(jvmtiEnv* env, jthread thread, jlong value);
jvmtiError ForceEarlyReturnFloat(jvmtiEnv* env, jthread thread, jfloat value);
jvmtiError ForceEarlyReturnDouble(jvmtiEnv* env, jthread thread, jdouble value);
jvmtiError ForceEarlyReturnVoid(jvmtiEnv* env, jthread thread);
These functions allow an agent to force a method to return at any point during its execution. The method which will return early is referred to as the called method. The called method is the current method (as defined by the Frames section in the Java Virtual Machine Specification) for the specified thread at the time the function is called.
The specified thread must be the current thread or must be suspended. The return occurs when the thread is resumed. Between calling one of these functions and resuming the thread, the state of the stack is undefined.
No further instructions are executed in the called method. Specifically, finally blocks are not executed. Note: this can cause inconsistent states in the application.
The JVMTI events like ExitEvent are generated as in usual return.
A lock acquired by calling the called method (if it is a synchronized method) and locks acquired by entering synchronized blocks within the called method are released. Note: this does not apply to native locks or java.util.concurrent.locks locks.
The called method must be a non-native Java programming language method. Forcing return on a thread with only one frame on the stack causes the thread to exit when resumed.
###@###.### 2005-04-11 20:08:55 GMT
###@###.### 2005-04-26 07:04:34 GMT
|
|
|
|