Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 22526 invoked from network); 24 Apr 2007 16:30:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 16:30:44 -0000 Received: (qmail 88655 invoked by uid 500); 24 Apr 2007 16:30:47 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 88621 invoked by uid 500); 24 Apr 2007 16:30:47 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 88606 invoked by uid 99); 24 Apr 2007 16:30:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 09:30:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 09:30:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3EA1471407D for ; Tue, 24 Apr 2007 09:30:16 -0700 (PDT) Message-ID: <21791630.1177432216254.JavaMail.jira@brutus> Date: Tue, 24 Apr 2007 09:30:16 -0700 (PDT) From: "Eugene S. Ostrovsky (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3730) [drlvm][jvmti] SINGLE_STEP events are not reported in JIT mode In-Reply-To: <25406025.1177349175439.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene S. Ostrovsky updated HARMONY-3730: ----------------------------------------- Attachment: H3730-Regression-test.patch Added file: H3730-Regression-test.patch Test for the issue. Passes with interpreter fails on jit. It seems that jit makes wrong single step when stepping through the native stack frame. I.e. step from the last bytecode of the method which was called from native method. > [drlvm][jvmti] SINGLE_STEP events are not reported in JIT mode > -------------------------------------------------------------- > > Key: HARMONY-3730 > URL: https://issues.apache.org/jira/browse/HARMONY-3730 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Windows/x86, Linux/x86, harmony-jdk-r531438 > Reporter: Ivan Popov > Attachments: H3730-Regression-test.patch, TestClass.java > > > 'Step Return' sometime works incorrectly in Eclipse debugger when Harmony is launched in JIT mode. To reproduce this use attached TestClass.java example: > 1. Load TestClass.java into Eclipse > 2. Set breakpoint to line 26 > 3. Launch this class under debugger (Run->Debug...) > 4. After stopped at breakpoint line click 'Step Return' > In -Xint mode the application will be stopped at line 19 (or in some system calls before this line, if classlib is compiled with debug info). But in JIT mode this code is executed without steps and application is stopped at Exception constructor in line 21 or even in system shutdown code. This incorrect behavior causes problem with Eclipse Scrapbook functionality, details are here: http://thread.gmane.org/gmane.comp.java.harmony.devel/26043/focus=26079. > The problem is that SINGLE_STEP events are not generated for the executed code in this case. Below are details. > After the application is stopped at breakpoint the stack is the following: > Thread [main] (Suspended (breakpoint at line 26 in TestClass)) > TestClass.hello() line: 26 > VMReflection.invokeMethod(long, Object, Object[]) line: not available [native method] > Method.invoke(Object, Object[]) line: 381 > TestClass.run() line: 17 > TestClass.main(String[]) line: 7 > After user clicked 'Step Return', JDWP agent sets NotifyFramePop hook for the current frame hello() and resumes VM. When current method hello() returns, agent receives FRAME_POP event. Then it turns on SINGLE_STEP event and waits for step event is received for the next instruction in the calling method. > In -Xint mode it works well, I see the following JVMTI events are generated: > EVENT: [RequestManager.cpp:1417] FRAME_POP event: class=LTestClass; method=hello loc=8 by_exception=0 > EVENT: [RequestManager.cpp:1344] STEP event: class=Ljava/lang/reflect/Method; method=invoke location=77 > Code of native method VMReflection.invokeMethod() is skipped and application is stopped in Method.invoke(). > But in JIT mode the following JVMTI events are generated: > EVENT: [RequestManager.cpp:1417] FRAME_POP event: class=LTestClass; method=hello loc=8 by_exception=0 > EVENT: [RequestManager.cpp:1344] STEP event: class=Ljava/lang/Exception; method= location=0 > In this case not only code of native method VMReflection.invokeMethod() is skipped, but also all subsequent code until constructor of Exception is invoked. > I think this happens because SINGLE_STEP event is turned on while native method is on top of the thread stack. This causes JVMTI not to generate step events even after returning from native method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.