You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Shipilev (JIRA)" <ji...@apache.org> on 2008/05/15 22:02:55 UTC

[jira] Created: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

[drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
--------------------------------------------------------------------------

                 Key: HARMONY-5829
                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
             Project: Harmony
          Issue Type: Sub-task
            Reporter: Aleksey Shipilev




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


[jira] Updated: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev updated HARMONY-5829:
--------------------------------------

    Attachment: vm-kernel-serializable-externalizable-cache-V2-rc1.patch

vm-kernel-serializable-externalizable-cache-V2-rc1.patch
The patch that fixes degradation:
 - declaring classes as static

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Closed: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev closed HARMONY-5829.
-------------------------------------


Thanks, Nathan.
Confirmed, closing issue.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598686#action_12598686 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Aha! I see your objection now, thanks. I support the idea to make resolvedProperties to be volatile. I don't think other fields really need to be volatile as they will always have the same value, as guaranteed by contract.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600110#action_12600110 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

That's strange! I had checked SPECjvm2008:serial right after the commit and see no degradation.
I will take a look, Sergey, thanks.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Updated: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev updated HARMONY-5829:
--------------------------------------

             Component/s: DRLVM
    Estimated Complexity: Novice
             Description: Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.
              Patch Info: [Patch Available]

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601017#action_12601017 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Nathan, I was aware about other changes, V2-rc1 patch is against the HEAD. I had checked twice that V2-rc1 fixes the performance problem there.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Reopened: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev reopened HARMONY-5829:
---------------------------------------


Reopening, issue was reproduced.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600997#action_12600997 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

I know what the bytecode looks like - this is the defined behavior of the compiler.

What's the rush? Relax. There's no hurry here - all of this code is in development.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597896#action_12597896 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Nathan, the synchronization is not needed here. In case of several threads concurrently requesting these properties and then caching the values in corresponding fields, the field values would not depend on order of execution, e.g. there is no race condition in this code. Caching of non-changeable data is free.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Resolved: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Nathan Beyer resolved HARMONY-5829.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M7

I've applied a modified version of the third patch at r659908 and r659909. Please verify that it was applied as expected.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599864#action_12599864 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

The tabs should be gone with r660225.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598546#action_12598546 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

> But this is what I call "positive race condition": calculation (and assignment) may be performed more than once but the result remains the same for all calculations. So, the correctness of the operation is not compromized here.

I think "benign" is what you want to say, it's a "benign race condition". I'm not keen on promoting such things; I'd prefer to see the fields be volatile and use local copies.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Resolved: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Nathan Beyer resolved HARMONY-5829.
-----------------------------------

    Resolution: Fixed

replaced the XXX.class instances with constants on r661936; please verify

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Alexey Varlamov commented on HARMONY-5829:
------------------------------------------

Aleksey, a couple of minor notices:
 - (SERIALIZABLE.equals(this)) is apparently equivalent to (SERIALIZABLE == this);
 - "transient" keyword is not really meaningful for any fields of j.l.Class instances, due to special handling of classes in serialization.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Pavel Pervov commented on HARMONY-5829:
---------------------------------------

Nathan, Aleksey,

There IS the race condition in intializing cached values.

But this is what I call "positive race condition": calculation (and assignment) may be performed more than once but the result remains the same for all calculations. So, the correctness of the operation is not compromized here.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597644#action_12597644 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

Class fields (static) shouldn't be declared 'transient' - it doesn't apply or make much sense.

There needs to be some amount of data protection for the instance fields; either locks or volatile reads/writes, which will add overhead that I assume with reduce the suggested increase. Caching is never free.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Alexey Varlamov commented on HARMONY-5829:
------------------------------------------

I agree, native support allows to get rid of those "resolvedXXX" fields. What about adding appropriate constructor to j.l.Class, for initialization in native?

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Sergey Dmitriev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601103#action_12601103 ] 

Sergey Dmitriev commented on HARMONY-5829:
------------------------------------------

Guys, let me jump in here. We have a performance degradation on SPECjvm2008:serial on r659908. What happens if we apply the fix for this degradation to this concrete revision (659908) - will the degradation disappear? I think this is the right way to work out the degradation.

I don't know how precise will be the approach to check the HEAD or some other revision. By the way we have a commit now which introduces the SPECjvm2008 crash (see HARMONY-5852) so we cannot check the HEAD.


> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Updated: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev updated HARMONY-5829:
--------------------------------------

    Attachment: vm-kernel-serializable-externalizable-cache-rc2.patch

vm-kernel-serializable-externalizable-cache-rc2.patch
RC2:
 - cleaned up a little

I tried to initialize the fields during class initialization both in Java and in native, but haven't succeed yet.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600688#action_12600688 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Nathan, we must fix the degradation now. 
The patch is also makes other class literals loaded to static fields just not to break the style of entire class.

We can open another issue about class literal performance. Java bytecode disassembly shows the difference is only:
 - slow version: ldc #... // class java/io/Serializable
 - fast version: getstatic #...; //Field SERIALIZABLE:Ljava/lang/Class;



> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600662#action_12600662 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

Is there any larger, more strategic fix that can be looked at with regard to the use of '.class' constants? Isn't this something the JIT should be able to optimize away?

Also, the patch seems to create some unrelated constants; is the getGenericInterfaces method related to serialization?

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598677#action_12598677 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

I don't think it's overkill, I think it's correct. After reviewing the memory model, I believe the fields needs to be volatile, at least 'resolvedProperties' field and use the appropriate access paradigms for volatile fields [1].

[1] http://www.ibm.com/developerworks/java/library/j-jtp06197.html#2.0

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599642#action_12599642 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

I'm going to take this issue - I'm applying a variation of Aleksey's third patch.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597365#action_12597365 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Pavel, if you think it's more convenient, let's move it there.
There should be no performance difference between pure Java and Java+native solutions. 

Can you point me to class initialization routine I should extend?

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Pavel Pervov commented on HARMONY-5829:
---------------------------------------

Aleksey, I think I'll try to implement native caching now.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Pavel Pervov commented on HARMONY-5829:
---------------------------------------

Alexey, I'm afraid you can't execute Java during bootstrap. So, you'll have to add special bootstrap phase where you'll execute all these constructors...

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598882#action_12598882 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

Rather than doing multiple checks and repeating the code, how about wrapping the code in a utility method. The 'resolveProperties' method could just be invoked every time and just let it short-circuit. Eventually, the JIT should be able to inline the method.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Updated: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev updated HARMONY-5829:
--------------------------------------

    Attachment: vm-kernel-serializable-externalizable-cache-rc3.patch

vm-kernel-serializable-externalizable-cache-rc3.patch
 - resolvedProperties is volatile now
 - checking is the part of resolving method now

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599808#action_12599808 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

Thanks, Nathan.
It seems like there are some TABs instead of spaces in the commit.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Assigned: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Nathan Beyer reassigned HARMONY-5829:
-------------------------------------

    Assignee: Nathan Beyer  (was: Pavel Pervov)

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601324#action_12601324 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

I'm working on it - the patch didn't get all XXX.class references. Mostly it's the general blow up of DRLVM that's holding things up.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Pavel Pervov commented on HARMONY-5829:
---------------------------------------

Aleksey, Is it better to move this caching to class creation/preparation in native?

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598672#action_12598672 ] 

Aleksey Shipilev commented on HARMONY-5829:
-------------------------------------------

I think we are guaranteeing the correctness there, so specifically eliminating benign race condition just to secure the field already secured is overkill.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Assigned: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Pavel Pervov reassigned HARMONY-5829:
-------------------------------------

    Assignee: Pavel Pervov

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Closed: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Nathan Beyer closed HARMONY-5829.
---------------------------------

    Estimated Complexity: Moderate  (was: Novice)

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Updated: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Aleksey Shipilev updated HARMONY-5829:
--------------------------------------

    Attachment: vm-kernel-serializable-externalizable-cache-rc1.patch

vm-kernel-serializable-externalizable-cache-rc1.patch
Proposed patch.

Patch is pretty trivial, but gives +15% on MT/SerialBench on 2-core Core2.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601008#action_12601008 ] 

Nathan Beyer commented on HARMONY-5829:
---------------------------------------

There have been other changes since the revision mentioned as "degrading". What's the result of the test at HEAD? If that's still not working, then try r660328.

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Sergey Dmitriev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601580#action_12601580 ] 

Sergey Dmitriev commented on HARMONY-5829:
------------------------------------------

Yes, Nathan, now 1-JUN Harmony shows no less score than 25-MAY revision on SPECjvm2008.serial.




> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch, vm-kernel-serializable-externalizable-cache-V2-rc1.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

Posted by "Sergey Dmitriev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600107#action_12600107 ] 

Sergey Dmitriev commented on HARMONY-5829:
------------------------------------------

Guys we have a degradation on SPECjvm2008.serial right after the 659908 commit.

Tigerton machine,
Harmony Windows IA32 build,
-Xem:server -Xms2000m -Xmx2000m,
-ikv.

HARMONY WINDOWS IA32 r659907:

  Benchmark:   serial
  Run mode:    timed run
  Test type:   multi
  Threads:     16
  Warmup:      120s
  Iterations:  1
  Run length:  240s

Warmup (120s) begins: Tue May 27 16:05:14 GMT+04:00 2008
Warmup (120s) ends:   Tue May 27 16:07:53 GMT+04:00 2008
Warmup (120s) result: 40.07 ops/m

Iteration 1 (240s) begins: Tue May 27 16:07:54 GMT+04:00 2008
Iteration 1 (240s) ends:   Tue May 27 16:12:26 GMT+04:00 2008
Iteration 1 (240s) result: 44.17 ops/m

Valid run!
Score on serial: 44.17 ops/m




HARMONY WINDOWS IA32 r659908:

  Benchmark:   serial
  Run mode:    timed run
  Test type:   multi
  Threads:     16
  Warmup:      120s
  Iterations:  1
  Run length:  240s

Warmup (120s) begins: Tue May 27 16:13:20 GMT+04:00 2008
Warmup (120s) ends:   Tue May 27 16:17:28 GMT+04:00 2008
Warmup (120s) result: 11.16 ops/m

Iteration 1 (240s) begins: Tue May 27 16:17:28 GMT+04:00 2008
Iteration 1 (240s) ends:   Tue May 27 16:22:57 GMT+04:00 2008
Iteration 1 (240s) result: 11.51 ops/m

Valid run!
Score on serial: 11.51 ops/m



> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Nathan Beyer
>             Fix For: 5.0M7
>
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch, vm-kernel-serializable-externalizable-cache-rc3.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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


[jira] Commented: (HARMONY-5829) [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching

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

Alexey Varlamov commented on HARMONY-5829:
------------------------------------------

Re bootstrap phase, there is already special handling of primordial classes, I believe it should be enough. During that phase, invoking constructors can be deffered or replaced with direct field assignments.
Anyway, I suggested to use Java constructor mainly for consistency and clarity; if it is too tricky or troublesome - just skip this idea

> [drlvm][kernel][performance] j.l.Class Serializable/Externalizable caching
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-5829
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5829
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Pavel Pervov
>         Attachments: vm-kernel-serializable-externalizable-cache-rc1.patch, vm-kernel-serializable-externalizable-cache-rc2.patch
>
>
> Serialization workloads relies on Class.isAssignableFrom(...) when looking up Serializable and Externalizable properties (that is, implementation of interfaces). For now, DRLVM kernel classes perform lookups on each invocation. This issue caches the mentioned properties in Class fields and does not go to native VMClassRegistry for resolution.

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