Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 61535 invoked from network); 27 Aug 2007 16:32:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2007 16:32:06 -0000 Received: (qmail 52031 invoked by uid 500); 27 Aug 2007 16:31:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 52013 invoked by uid 500); 27 Aug 2007 16:31:52 -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 51994 invoked by uid 99); 27 Aug 2007 16:31:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2007 09:31:51 -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; Mon, 27 Aug 2007 16:32:43 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 942BE71420E for ; Mon, 27 Aug 2007 09:31:30 -0700 (PDT) Message-ID: <11544934.1188232290596.JavaMail.jira@brutus> Date: Mon, 27 Aug 2007 09:31:30 -0700 (PDT) From: "Gregory Shimansky (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4661) [drlvm][jvmti] MethodEntry and MethodExit event callbacks could be called only when needed In-Reply-To: <13404399.1187712390445.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-4661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523040 ] Gregory Shimansky commented on HARMONY-4661: -------------------------------------------- George, thanks a lot for your help. I tried the updated patch and all tests passed for me on 32-bit platforms. Performance on simple debug scenarios in eclipse show over 3 times!! Unfortunately on 64-bit platforms your patch breaks compilation. Please try to fix these two errors: [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/cg_meth.cpp: In member function `void Jitrino::Jet::Compiler::gen_prolog()': [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/cg_meth.cpp:516: error: conversion from `int_ptr' to `const Jitrino::Jet::Opnd' is ambiguous [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:594: error: candidates are: Jitrino::Jet::Opnd::Opnd(long unsigned int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:584: error: Jitrino::Jet::Opnd::Opnd(long int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:574: error: Jitrino::Jet::Opnd::Opnd(unsigned int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:566: error: Jitrino::Jet::Opnd::Opnd(int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/cg_meth.cpp: In member function `void Jitrino::Jet::Compiler::gen_return(Jitrino::Jet::jtype)': [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/cg_meth.cpp:634: error: conversion from `int_ptr' to `const Jitrino::Jet::Opnd' is ambiguous [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:594: error: candidates are: Jitrino::Jet::Opnd::Opnd(long unsigned int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:584: error: Jitrino::Jet::Opnd::Opnd(long int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:574: error: Jitrino::Jet::Opnd::Opnd(unsigned int) [cc] /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/jitrino/src/jet/enc.h:566: error: Jitrino::Jet::Opnd::Opnd(int) > [drlvm][jvmti] MethodEntry and MethodExit event callbacks could be called only when needed > ------------------------------------------------------------------------------------------ > > Key: HARMONY-4661 > URL: https://issues.apache.org/jira/browse/HARMONY-4661 > Project: Harmony > Issue Type: Improvement > Components: DRLVM > Reporter: Gregory Shimansky > Assignee: Gregory Shimansky > Attachments: HARMONY-4661-JIT.patch, HARMONY-4661-JIT.patch, HARMONY-4661.patch > > > Currently when JIT compiles a method with flags exe_notify_method_entry or exe_notify_method_exit it hardcodes a call to VM helper at the beginning or end of method. This VM helper tries to determine whether there is some JVMTI environment that is subscribed to receiving such event at the moment. When there is no such environment nothing is done and the call to VM helper is not needed. > We could create global flags for MethodEntry and MethodExit events that would be checked in JITted code whether or not it is necessary to call VM helper, so that it would be called only when a flag is set. This would eliminate redundant calls to VM from JITted code when no JVMTI environment is registered to receiving an event and speed up debugging. > I suggest adding the following methods to VM interface > void get_method_entry_flag_address(char **flag_address); > void get_method_exit_flag_address(char **flag_address); > which JIT would call when a method is compiled with exe_notify_method_entry or exe_notify_method_exit flags, and hardcode a check for the flag inside of the method before calling VM helper. > VM would set these flags when some environment calls jvmtiSetEventNotificationMode enabling MethodEntry or MethodExit events and clear these flags when events are disabled. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.