You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Strigun (JIRA)" <ji...@apache.org> on 2007/07/26 14:53:40 UTC
[jira] Created: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
----------------------------------------------------------------
Key: HARMONY-4549
URL: https://issues.apache.org/jira/browse/HARMONY-4549
Project: Harmony
Issue Type: Bug
Components: DRLVM
Reporter: Vladimir Strigun
The test below shows that exception throwing/catching operations works slower on Harmony in comparison win Sun.
Results of test execution:
java client: 1200 msec
java server: 1000
harmony server: 5700 msec
Small test:
public class TestExceptions {
public static void main(String[] args) {
//warmup VM first
tryRaiseExceptions(1);
long start = System.currentTimeMillis();
tryRaiseExceptions(1000000);
long res = System.currentTimeMillis() -start;
System.out.println("completed in "+res+" msec");
}
public static void tryRaiseExceptions(int n) {
for(int i=0; i<n; i++)
try{
throw new TException();
}catch(TException throwable){
TException ts = Test2.test(throwable);
}
}
}
class Test2 {
public static TException test(TException thr) {
return thr;
}
}
class TException extends RuntimeException {}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov reassigned HARMONY-4549:
---------------------------------------
Assignee: Mikhail Fursov
> [drlvm][jit][opt][perf]throwing/catching exceptions works slowly
> ----------------------------------------------------------------
>
> Key: HARMONY-4549
> URL: https://issues.apache.org/jira/browse/HARMONY-4549
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Vladimir Strigun
> Assignee: Mikhail Fursov
> Attachments: throwopt.patch
>
>
> The test below shows that exception throwing/catching operations works slower on Harmony in comparison win Sun.
> Results of test execution:
> java client: 1200 msec
> java server: 1000
> harmony server: 5700 msec
> Small test:
> public class TestExceptions {
> public static void main(String[] args) {
> //warmup VM first
> tryRaiseExceptions(1);
> long start = System.currentTimeMillis();
> tryRaiseExceptions(1000000);
> long res = System.currentTimeMillis() -start;
> System.out.println("completed in "+res+" msec");
> }
> public static void tryRaiseExceptions(int n) {
> for(int i=0; i<n; i++)
> try{
> throw new TException();
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> }
> }
> class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> class TException extends RuntimeException {}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
Posted by "Evgueni Brevnov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgueni Brevnov updated HARMONY-4549:
-------------------------------------
Attachment: throwopt.patch
New optimization (attached) gives ~15% improvement on the above test case.
Successfully passed 'build test' & specJBB2005 & jython on Windows2003 x86.
> [drlvm][jit][opt][perf]throwing/catching exceptions works slowly
> ----------------------------------------------------------------
>
> Key: HARMONY-4549
> URL: https://issues.apache.org/jira/browse/HARMONY-4549
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Vladimir Strigun
> Attachments: throwopt.patch
>
>
> The test below shows that exception throwing/catching operations works slower on Harmony in comparison win Sun.
> Results of test execution:
> java client: 1200 msec
> java server: 1000
> harmony server: 5700 msec
> Small test:
> public class TestExceptions {
> public static void main(String[] args) {
> //warmup VM first
> tryRaiseExceptions(1);
> long start = System.currentTimeMillis();
> tryRaiseExceptions(1000000);
> long res = System.currentTimeMillis() -start;
> System.out.println("completed in "+res+" msec");
> }
> public static void tryRaiseExceptions(int n) {
> for(int i=0; i<n; i++)
> try{
> throw new TException();
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> }
> }
> class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> class TException extends RuntimeException {}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516010 ]
Mikhail Fursov commented on HARMONY-4549:
-----------------------------------------
After Test2.test method is inlined the 'throwable' variable will become a dead code.
the 'throw new TException()' can be replaced by a simple branch instruction without any VM call.
I propose closing this issue only after no exception at all is thrown in generated code for the example in this test.
BTW:
after we have no exception thrown in the example above we can file another performance issue: empty loop elimination. AFAIK Jitrino.OPT does not have this optimization today.
> [drlvm][jit][opt][perf]throwing/catching exceptions works slowly
> ----------------------------------------------------------------
>
> Key: HARMONY-4549
> URL: https://issues.apache.org/jira/browse/HARMONY-4549
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Vladimir Strigun
>
> The test below shows that exception throwing/catching operations works slower on Harmony in comparison win Sun.
> Results of test execution:
> java client: 1200 msec
> java server: 1000
> harmony server: 5700 msec
> Small test:
> public class TestExceptions {
> public static void main(String[] args) {
> //warmup VM first
> tryRaiseExceptions(1);
> long start = System.currentTimeMillis();
> tryRaiseExceptions(1000000);
> long res = System.currentTimeMillis() -start;
> System.out.println("completed in "+res+" msec");
> }
> public static void tryRaiseExceptions(int n) {
> for(int i=0; i<n; i++)
> try{
> throw new TException();
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> }
> }
> class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> class TException extends RuntimeException {}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov resolved HARMONY-4549.
-------------------------------------
Resolution: Fixed
committed revision 469255
> [drlvm][jit][opt][perf]throwing/catching exceptions works slowly
> ----------------------------------------------------------------
>
> Key: HARMONY-4549
> URL: https://issues.apache.org/jira/browse/HARMONY-4549
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Vladimir Strigun
> Assignee: Mikhail Fursov
> Attachments: throwopt.patch
>
>
> The test below shows that exception throwing/catching operations works slower on Harmony in comparison win Sun.
> Results of test execution:
> java client: 1200 msec
> java server: 1000
> harmony server: 5700 msec
> Small test:
> public class TestExceptions {
> public static void main(String[] args) {
> //warmup VM first
> tryRaiseExceptions(1);
> long start = System.currentTimeMillis();
> tryRaiseExceptions(1000000);
> long res = System.currentTimeMillis() -start;
> System.out.println("completed in "+res+" msec");
> }
> public static void tryRaiseExceptions(int n) {
> for(int i=0; i<n; i++)
> try{
> throw new TException();
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> }
> }
> class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> class TException extends RuntimeException {}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.