harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4661) [drlvm][jvmti] MethodEntry and MethodExit event callbacks could be called only when needed
Date Mon, 27 Aug 2007 18:51:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523082
] 

Gregory Shimansky commented on HARMONY-4661:
--------------------------------------------

BTW I forgot to write that there is a mistake in the VM patch. Functions added in C_interface.cpp
should be marked as VMEXPORT, just like all other in this file. Otherwise Jitrino fails to
link on windows.

> [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.


Mime
View raw message