harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5409) [drlvm]jit] Object.getClass implementation by vmmagics
Date Tue, 29 Jan 2008 08:13:34 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-5409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikhail Fursov updated HARMONY-5409:
------------------------------------

    Attachment: getclass.diff

Evgeniya, I fixed problems found in initial patch.
Check "getclass.diff" file.


The testcase I used:
public class TT {

    static {
        Object o = Object.class;
    }
     public static void main(String[] args) {
        Object o = new Object();
        Class c = null                 ;
        long t = System.currentTimeMillis();
        for (int i = 0; i < 100*1000*1000; i ++) {
            c = o.getClass();
        }   
        System.out.println("result:" +c.getName() + " time ="+(System.currentTimeMillis()-t));

    }
}


The command line params to run it in -Xem:opt mode: 
-Xem:opt -XX:jit.CS_OPT.arg.optimizer.inline.bonus_methods=java/lang/Object::getClass,java/lang/VMClassRegistry::getClass

It shows significant (>10times) improvement for getClass operation.

> [drlvm]jit] Object.getClass implementation by vmmagics
> ------------------------------------------------------
>
>                 Key: HARMONY-5409
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5409
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Evgeniya Maenkova
>         Attachments: getclass.diff, getClass_patch, SimpleGetClassTest.java
>
>
> Object.getClass implemented by vmmagics can give significant speedup (8x):
> $ /cygdrive/w/UBS/Builds/egm_r613191_getClass/bin/java -Xem:server SimpleGetClassTest
10000
> Warmup start...
> Warmup end....
> result:2016
> Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1
> $ /cygdrive/w/UBS/Builds/egm_r613191/bin/java -Xem:server SimpleGetClassTest 10000
> Warmup start...
> Warmup end....
> result:16016

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


Mime
View raw message