You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Maksim Ananjev (JIRA)" <ji...@apache.org> on 2008/02/06 13:43:13 UTC

[jira] Created: (HARMONY-5464) [drlvm] vm hepler improvement for better performance

[drlvm] vm hepler improvement for better performance
----------------------------------------------------

                 Key: HARMONY-5464
                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
             Project: Harmony
          Issue Type: Improvement
          Components: DRLVM
         Environment: Hope it works everywhere
            Reporter: Maksim Ananjev
         Attachments: xml_derby_fix_osr_enable_commented.patch

The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body.

The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566535#action_12566535 ] 

Maksim Ananjev commented on HARMONY-5464:
-----------------------------------------

Alexey.

I have solid level of confidence about this patch. I tested in debug and release mode on Apache Xerces J, Linux 32 bit. Сould you please provide more details on the assertion i.e. platform and command line? 

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

    Summary: [drlvm] vm helper improvement for better performance  (was: [drlvm] vm hepler improvement for better performance)

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

    Estimated Complexity:   (was: Moderate)

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm hepler improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

    Attachment: xml_derby_fix_osr_enable_commented.patch

> [drlvm] vm hepler improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>         Attachments: xml_derby_fix_osr_enable_commented.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body.
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-5464.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M5

Maksim, it was my local misconfiguration, sorry for the trouble.
Applied at revision: 619775, thanks!


> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>             Fix For: 5.0M5
>
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm hepler improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

       Priority: Minor  (was: Major)
    Description: 
The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed

The patch also includes osr_path enabling because it depends on this feature.

  was:
The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body.

The patch also includes osr_path enabling because it depends on this feature.


> [drlvm] vm hepler improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Priority: Minor
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm hepler improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

    Attachment: HARMONY_5464.patch

> [drlvm] vm hepler improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566525#action_12566525 ] 

Alexey Varlamov commented on HARMONY-5464:
------------------------------------------

Re (2): this is general issue for using hardware NPE, I don't think this JIRA is suitable for discussion - what about raising the topic on dev@ ?

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566508#action_12566508 ] 

Maksim Ananjev commented on HARMONY-5464:
-----------------------------------------

Pavel, thanks for your attention.

1. There is no difference in terms of Java specification and no difference in trems of user code semantics. But there is an important difference from the point of view of the implementation. Imagine the code that invokes virtual method inside the loop. We can improve performance by hoisting loading of vtable outside the loop. It's profitable if the loop is executed more than once. However if "load interface vtable" instruction throws NPE this transformation becomes invalid. Today we have the difference in behavior of inlined and non-inlined versions of this helper. Non-inlined version returns null address, but inlines versions throw NPE. This patch unifies the behavior.

2. Null address is guaranteed to be invalid 

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566522#action_12566522 ] 

Alexey Varlamov commented on HARMONY-5464:
------------------------------------------

Maksim, are you sure the patch is workable? 
I've got an assertion on HelloWorld: 
Exception raised while initializing helper class org/apache/harmony/drlvm/VMHelper

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5464) [drlvm] vm hepler improvement for better performance

Posted by "Maksim Ananjev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Ananjev updated HARMONY-5464:
------------------------------------

    Attachment:     (was: xml_derby_fix_osr_enable_commented.patch)

> [drlvm] vm hepler improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Priority: Minor
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-5464:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566488#action_12566488 ] 

Pavel Pervov commented on HARMONY-5464:
---------------------------------------

Maksim,

I do not really understand the difference between throwing NPE from inside the helper and causing signal handler to throw NPE as a result of a call to invalid address. BTW, is it guaranteed that referenced address will be inaccessible to read by the VM?

Could you, please, clarify those for me?

Thanks.

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5464) [drlvm] vm helper improvement for better performance

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566519#action_12566519 ] 

Pavel Pervov commented on HARMONY-5464:
---------------------------------------

Ok, now I see that.

Re (2): we actually use NULL as the base for interface vtable and then address the method relative to that NULL. May it happen that the referenced address belongs to readable area?..

> [drlvm] vm helper improvement for better performance
> ----------------------------------------------------
>
>                 Key: HARMONY-5464
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5464
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>         Environment: Hope it works everywhere
>            Reporter: Maksim Ananjev
>            Assignee: Alexey Varlamov
>            Priority: Minor
>         Attachments: HARMONY_5464.patch
>
>
> The issue deals with "load interface vtable support".  Returning zero address and not generating NPE if the object is null is safe in terms of preserving program semantics(the exception will be generatedon the first method invocation) and allows profitable code transformations such as hoisting vm helper outside the loop body. This is our current convention which touches all variants of this helper. If it changes, all variants must be fixed
> The patch also includes osr_path enabling because it depends on this feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.