You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Berezhniuk (JIRA)" <ji...@apache.org> on 2007/05/10 15:08:15 UTC

[jira] Created: (HARMONY-3836) [drlvm] Performance patch for VM properties

[drlvm] Performance patch for VM properties
-------------------------------------------

                 Key: HARMONY-3836
                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
             Project: Harmony
          Issue Type: Improvement
            Reporter: Ilya Berezhniuk


There are hundreds places where VM or user code access VM properties.
Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).

Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.

I've prepared patch changing properties behaviour in the following way:
- property value is returned as 'const char*' instead of 'char*';
- property hash contains String* instead of PropValue*;
- String*s are allocated in loader_env->string_pool.

Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Commented: (HARMONY-3836) [drlvm] Performance patch for VM properties

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495000 ] 

Mikhail Fursov commented on HARMONY-3836:
-----------------------------------------

JIT and EM parts are OK.

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Commented: (HARMONY-3836) [drlvm] Performance patch for VM properties

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

Alexey Varlamov commented on HARMONY-3836:
------------------------------------------

Gregory, are you going to commit this patch soon? I'd prefer we get some consensus first, see a discussion on dev-list.

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Assigned To: Gregory Shimansky
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Commented: (HARMONY-3836) [drlvm] Performance patch for VM properties

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495646 ] 

Ilya Berezhniuk commented on HARMONY-3836:
------------------------------------------

2.16% and 2.41% gain is for default heap size. The gain for large heap size is much lower.

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Assigned To: Gregory Shimansky
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Commented: (HARMONY-3836) [drlvm] Performance patch for VM properties

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496329 ] 

Gregory Shimansky commented on HARMONY-3836:
--------------------------------------------

I saw the discussion and will wait for the final patch.

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Assigned To: Gregory Shimansky
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Updated: (HARMONY-3836) [drlvm][init] Performance patch for VM properties

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

Gregory Shimansky updated HARMONY-3836:
---------------------------------------

    Summary: [drlvm][init] Performance patch for VM properties  (was: [drlvm] Performance patch for VM properties)

> [drlvm][init] Performance patch for VM properties
> -------------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Assigned To: Gregory Shimansky
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Assigned: (HARMONY-3836) [drlvm] Performance patch for VM properties

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

Gregory Shimansky reassigned HARMONY-3836:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Assigned To: Gregory Shimansky
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Updated: (HARMONY-3836) [drlvm] Performance patch for VM properties

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

Ilya Berezhniuk updated HARMONY-3836:
-------------------------------------

    Attachment: prop4.diff

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>         Attachments: prop4.diff
>
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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


[jira] Updated: (HARMONY-3836) [drlvm] Performance patch for VM properties

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

Ilya Berezhniuk updated HARMONY-3836:
-------------------------------------

    Component/s: DRLVM

> [drlvm] Performance patch for VM properties
> -------------------------------------------
>
>                 Key: HARMONY-3836
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3836
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Ilya Berezhniuk
>
> There are hundreds places where VM or user code access VM properties.
> Every time when property value is returned, it's returned as a copy of original string; then this copy is freed afted use. But I've found only 4 places where such copying is actually required in code (i.e. returned string is modified).
> Looks like string copying is used to ensure that returned string will not be freed, when another thread changes property value. This way can be replaced with storing property values in String_Pool.
> I've prepared patch changing properties behaviour in the following way:
> - property value is returned as 'const char*' instead of 'char*';
> - property hash contains String* instead of PropValue*;
> - String*s are allocated in loader_env->string_pool.
> Performance gain with this patch was measured with SpecJBB2005 on Windows XP (HT machine), with 2 consequent run for every mode.
> Average gain is 2.16% for default mode and 2.41% for server mode.

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