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/03/23 22:39:24 UTC

[jira] Created: (HARMONY-5640) [drlvm][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

[drlvm][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
---------------------------------------------------------------------------------------

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


Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Updated: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Aleksey Shipilev updated HARMONY-5640:
--------------------------------------

    Issue Type: Sub-task  (was: Improvement)
        Parent: HARMONY-5632

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Sub-task
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Assigned: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Tim Ellison reassigned HARMONY-5640:
------------------------------------

    Assignee: Tim Ellison

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Updated: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Aleksey Shipilev updated HARMONY-5640:
--------------------------------------

    Patch Info: [Patch Available]
       Summary: [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization  (was: [drlvm][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization)

Moving to Classlib/LUNI as proposed patch belongs there.

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>         Attachments: 0008-serial-resolveClass.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Updated: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Aleksey Shipilev updated HARMONY-5640:
--------------------------------------

    Attachment: serial-resolveClass-RC1.patch

serial-resolveClass-RC1.patch
Proposed patch, clean, presumably does not break specification.

1. Saves resolved class in ObjectStreamClass field.
2. Returns already resolved class on fast path.

Eliminates excessive call to classloader. 

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Updated: (HARMONY-5640) [drlvm][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Aleksey Shipilev updated HARMONY-5640:
--------------------------------------

    Attachment: 0008-serial-resolveClass.patch

0008-serial-resolveClass.patch
Proof-of-concept patch.

Eliminates huge amount of calls to classloader on SerialBench, up to +5% boosts on SerialBench (8-core Clovertown).

Breaks specification a little, due to visibility extensions.

> [drlvm][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>         Attachments: 0008-serial-resolveClass.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Resolved: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Tim Ellison resolved HARMONY-5640.
----------------------------------

    Resolution: Fixed

Thanks Aleksey.

Patch applied to LUNI module at repo revision r646048 (just removed some evil tabs).

Please check it was applied as you expected.


> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Commented: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Alexey Varlamov commented on HARMONY-5640:
------------------------------------------

Looks good to me, thanks!

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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


[jira] Closed: (HARMONY-5640) [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization

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

Aleksey Shipilev closed HARMONY-5640.
-------------------------------------

    Estimated Complexity: Novice  (was: Moderate)

Thanks, Tim.
Applied as expected.

> [classlib][luni][performance] ObjectInputStream.resolveClass(ObjectStreamClass ...) optimization
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5640
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5640
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: Aleksey Shipilev
>            Assignee: Tim Ellison
>         Attachments: 0008-serial-resolveClass.patch, serial-resolveClass-RC1.patch
>
>
> Current implementation of OIS.resolveClass() tries to map ObjectStreamClass to Class. To do that, it extracts the class name from OSC and asks ClassLoader for such the class. The proposal is to cache the Class in OSC field and simply return it on the fastpath.

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