Commit 9606c9dd by Keith Seitz Committed by Keith Seitz

jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast from jthread to Thread *; it is no longer needed.

        * jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast
        from jthread to Thread *; it is no longer needed.
        (_Jv_JVMTI_GetFrameCount): Likewise.
        Fix small formatting typo.

From-SVN: r121878
parent 174c12c7
2007-02-12 Keith Seitz <keiths@redhat.com>
* jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast
from jthread to Thread *; it is no longer needed.
(_Jv_JVMTI_GetFrameCount): Likewise.
Fix small formatting typo.
2007-02-12 Tom Tromey <tromey@redhat.com> 2007-02-12 Tom Tromey <tromey@redhat.com>
* sources.am, Makefile.in: Rebuilt. * sources.am, Makefile.in: Rebuilt.
......
...@@ -256,7 +256,7 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt, ...@@ -256,7 +256,7 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
static jvmtiError JNICALL static jvmtiError JNICALL
_Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread, _Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
jint* frame_count) jint *frame_count)
{ {
REQUIRE_PHASE (env, JVMTI_PHASE_LIVE); REQUIRE_PHASE (env, JVMTI_PHASE_LIVE);
...@@ -265,12 +265,10 @@ _Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread, ...@@ -265,12 +265,10 @@ _Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
using namespace java::lang; using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread); THREAD_DEFAULT_TO_CURRENT (thread);
THREAD_CHECK_VALID (thread);
Thread *thr = reinterpret_cast<Thread *> (thread); THREAD_CHECK_IS_ALIVE (thread);
THREAD_CHECK_VALID (thr);
THREAD_CHECK_IS_ALIVE (thr);
_Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thr->frame); _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
(*frame_count) = frame->depth (); (*frame_count) = frame->depth ();
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} }
...@@ -826,10 +824,8 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread, ...@@ -826,10 +824,8 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
using namespace java::lang; using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread); THREAD_DEFAULT_TO_CURRENT (thread);
THREAD_CHECK_VALID (thread);
Thread *thr = reinterpret_cast<Thread *> (thread); THREAD_CHECK_IS_ALIVE (thread);
THREAD_CHECK_VALID (thr);
THREAD_CHECK_IS_ALIVE (thr);
jvmtiError jerr = env->GetFrameCount (thread, frame_count); jvmtiError jerr = env->GetFrameCount (thread, frame_count);
if (jerr != JVMTI_ERROR_NONE) if (jerr != JVMTI_ERROR_NONE)
...@@ -843,7 +839,7 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread, ...@@ -843,7 +839,7 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
ILLEGAL_ARGUMENT (start_depth >= (*frame_count)); ILLEGAL_ARGUMENT (start_depth >= (*frame_count));
ILLEGAL_ARGUMENT (start_depth < (-(*frame_count))); ILLEGAL_ARGUMENT (start_depth < (-(*frame_count)));
_Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thr->frame); _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
// If start_depth is negative use this to determine at what depth to start // If start_depth is negative use this to determine at what depth to start
// the trace by adding it to the length of the call stack. This allows the // the trace by adding it to the length of the call stack. This allows the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment