Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 97172 invoked from network); 6 Oct 2006 17:09:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2006 17:09:18 -0000 Received: (qmail 40177 invoked by uid 500); 6 Oct 2006 17:09:17 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 40156 invoked by uid 500); 6 Oct 2006 17:09:17 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 40145 invoked by uid 99); 6 Oct 2006 17:09:17 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2006 10:09:17 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received: from [140.211.166.113] ([140.211.166.113:61229] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id A8/A6-24193-BBD86254 for ; Fri, 06 Oct 2006 10:09:15 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id D5ED51A981A; Fri, 6 Oct 2006 10:09:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r453679 - in /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti: jvmti_event.cpp jvmti_stack.cpp jvmti_step.cpp Date: Fri, 06 Oct 2006 17:09:12 -0000 To: harmony-commits@incubator.apache.org From: geirm@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061006170912.D5ED51A981A@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: geirm Date: Fri Oct 6 10:09:12 2006 New Revision: 453679 URL: http://svn.apache.org/viewvc?view=rev&rev=453679 Log: HARMONY-1709 The issue improves tracing for SingleStep and FramePop events and helps debugging breakpoints Ununtu 6 - smoke, c-unit, ~kernel Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp?view=diff&rev=453679&r1=453678&r2=453679 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp Fri Oct 6 10:09:12 2006 @@ -330,6 +330,9 @@ // Check that no environment has SingleStep enabled LMAutoUnlock lock(&ti->TIenvs_lock); bool disable = true; + TRACE2("jvmti.break.ss", + "SingleStep event is disabled locally for env: " + << env); for (TIEnv *ti_env = ti->getEnvironments(); ti_env; ti_env = ti_env->next) @@ -665,6 +668,7 @@ jboolean was_popped_by_exception, jvalue ret_val) { + // processing MethodExit event DebugUtilsTI *ti = VM_Global_State::loader_env->TI; tmn_suspend_enable(); jvmtiEvent event_type = JVMTI_EVENT_METHOD_EXIT; @@ -694,8 +698,13 @@ jthread thread = getCurrentThread(); JNIEnv *jni_env = (JNIEnv *)jni_native_intf; jvmtiEnv *jvmti_env = (jvmtiEnv*) ti_env; - if (NULL != ti_env->event_table.MethodExit) + if (NULL != ti_env->event_table.MethodExit) { + TRACE2("jvmti.stack", "Calling MethodExit callback for method: " + << class_get_name(method_get_class((Method*)method)) + << "." << method_get_name((Method*)method) + << method_get_descriptor((Method*)method)); ti_env->event_table.MethodExit(jvmti_env, jni_env, thread, method, was_popped_by_exception, ret_val); + } ti_env = next_env; } @@ -712,15 +721,30 @@ return; } + // processing PopFrame event VM_thread *curr_thread = p_TLS_vmthread; jint UNREF skip; jint depth = get_thread_stack_depth(curr_thread, &skip); +#ifndef NDEBUG + if( curr_thread->frame_pop_listener ) { + TRACE2("jvmti.stack", "Prepare to PopFrame callback for thread: " + << curr_thread << ", method: " << class_get_name(method_get_class((Method*)method)) + << "." << method_get_name((Method*)method) + << method_get_descriptor((Method*)method) + << ", depth: " << depth + << (was_popped_by_exception == JNI_TRUE ? " by exception" : "")); + } +#endif // NDEBUG + jvmti_frame_pop_listener *last = NULL; for( jvmti_frame_pop_listener *fpl = curr_thread->frame_pop_listener; fpl; last = fpl, (fpl = fpl ? fpl->next : curr_thread->frame_pop_listener) ) { + TRACE2("jvmti.stack", "-> Look through listener: " + << fpl << ", env: " << fpl->env << ", depth: " << fpl->depth); + if (fpl->depth == depth) { jvmti_frame_pop_listener *report = fpl; Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp?view=diff&rev=453679&r1=453678&r2=453679 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_stack.cpp Fri Oct 6 10:09:12 2006 @@ -790,7 +790,8 @@ jthread thread, jint depth) { - TRACE2("jvmti.stack", "NotifyFramePop called"); + TRACE2("jvmti.stack", "NotifyFramePop called: thread: " + << thread << ", depth: " << depth); SuspendEnabledChecker sec; jint state; jthread curr_thread = getCurrentThread(); Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp?view=diff&rev=453679&r1=453678&r2=453679 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_step.cpp Fri Oct 6 10:09:12 2006 @@ -706,13 +706,11 @@ // Function is always executed under global TI breakpoints lock JVMTISingleStepState *ss_state = vm_thread->ss_state; - TRACE2("jvmti.break.ss", "Remove single step breakpoints"); + TRACE2("jvmti.break.ss", "Remove single step breakpoints, intf: " + << (ss_state ? ss_state->predicted_breakpoints : NULL) ); - if (ss_state && ss_state->predicted_breakpoints) { - TRACE2("jvmti.break.ss", "Remove single step, intf: " - << ss_state->predicted_breakpoints); + if (ss_state && ss_state->predicted_breakpoints) ss_state->predicted_breakpoints->remove_all_reference(); - } } jvmtiError jvmti_get_next_bytecodes_from_native(VM_thread *thread, @@ -838,7 +836,11 @@ // invoke. Need to shift to the next bytecode if (NULL == call_ip) { - TRACE2("jvmti.break.ss", "SingleStep IP shifted in prediction to: " << call_ip); + TRACE2("jvmti.break.ss", "SingleStep IP shifted in prediction to: " + << class_get_name(method_get_class(func)) << "." + << method_get_name(func) + << method_get_descriptor(func) + << " :" << next_location << " :" << ip2); bc = next_location; ip = ip2; }