harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Berezhniuk (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3836) [drlvm] Performance patch for VM properties
Date Thu, 10 May 2007 13:08:15 GMT
[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.

View raw message