You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/07/27 14:00:53 UTC
[jira] Created: (HARMONY-4561) [drlvm][jit] Code regions that are
reachable by exception paths only are ignored by inliner.
[drlvm][jit] Code regions that are reachable by exception paths only are ignored by inliner.
--------------------------------------------------------------------------------------------
Key: HARMONY-4561
URL: https://issues.apache.org/jira/browse/HARMONY-4561
Project: Harmony
Issue Type: Bug
Components: DRLVM
Reporter: Mikhail Fursov
Assignee: Mikhail Fursov
For the 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);
}
}
}
public class Test2 {
public static TException test(TException thr) {
return thr;
}
}
public class TException extends RuntimeException {
}
this region is marked as HOT after edge profile annotation but Test2.call is not inlined.
}catch(TException throwable){
TException ts = Test2.test(throwable);
}
Moreover, if I annotate Test2.test method with @inline pragma this call is also not inlined.
This makes me think that our inliner ignores code that is reachable by exceptions only paths in its analysis.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4561) [drlvm][jit] Code regions that are
reachable by exception paths only are ignored by inliner.
Posted by "Pavel Ozhdikhin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516073 ]
Pavel Ozhdikhin commented on HARMONY-4561:
------------------------------------------
This should help to enable inlining on the exception path:
-XX:jit.arg.inline.skip_exception_path=false
> [drlvm][jit] Code regions that are reachable by exception paths only are ignored by inliner.
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-4561
> URL: https://issues.apache.org/jira/browse/HARMONY-4561
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Mikhail Fursov
> Assignee: Mikhail Fursov
>
> For the 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);
> }
> }
> }
> public class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> public class TException extends RuntimeException {
> }
> this region is marked as HOT after edge profile annotation but Test2.call is not inlined.
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> Moreover, if I annotate Test2.test method with @inline pragma this call is also not inlined.
> This makes me think that our inliner ignores code that is reachable by exceptions only paths in its analysis.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-4561) [drlvm][jit] Code regions that are
reachable by exception paths only are ignored by inliner.
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516353 ]
Mikhail Fursov commented on HARMONY-4561:
-----------------------------------------
Pavel, you are right.
I propose fixing this bug by
1) setting this option to 'false' by default. Node hotness derived from edge profile is enough to avoid inlining on hot paths
or
2) remove this option completely and simplify inlined method analysis: use direct pass over all nodes instead of dominator tree
Any votes?
> [drlvm][jit] Code regions that are reachable by exception paths only are ignored by inliner.
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-4561
> URL: https://issues.apache.org/jira/browse/HARMONY-4561
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Mikhail Fursov
> Assignee: Mikhail Fursov
>
> For the 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);
> }
> }
> }
> public class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> public class TException extends RuntimeException {
> }
> this region is marked as HOT after edge profile annotation but Test2.call is not inlined.
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> Moreover, if I annotate Test2.test method with @inline pragma this call is also not inlined.
> This makes me think that our inliner ignores code that is reachable by exceptions only paths in its analysis.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-4561) [drlvm][jit] Code regions that are
reachable by exception paths only are ignored by inliner.
Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Fursov resolved HARMONY-4561.
-------------------------------------
Resolution: Fixed
Committed revision 565339
> [drlvm][jit] Code regions that are reachable by exception paths only are ignored by inliner.
> --------------------------------------------------------------------------------------------
>
> Key: HARMONY-4561
> URL: https://issues.apache.org/jira/browse/HARMONY-4561
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Reporter: Mikhail Fursov
> Assignee: Mikhail Fursov
>
> For the 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);
> }
> }
> }
> public class Test2 {
> public static TException test(TException thr) {
> return thr;
> }
> }
> public class TException extends RuntimeException {
> }
> this region is marked as HOT after edge profile annotation but Test2.call is not inlined.
> }catch(TException throwable){
> TException ts = Test2.test(throwable);
> }
> Moreover, if I annotate Test2.test method with @inline pragma this call is also not inlined.
> This makes me think that our inliner ignores code that is reachable by exceptions only paths in its analysis.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.