[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-compiler-dev
Subject:    Re: inconsistent inlining behavior with CompileOnly
From:       Pavel Punegov <pavel.punegov () oracle ! com>
Date:       2016-06-29 16:07:49
Message-ID: 1D293D8B-2A54-48D8-A948-2FF88E1EE21C () oracle ! com
[Download RAW message or body]

Hi Roland,

I think CompilerControl could help you if you want to compile only m1 and m2 but \
disable inlining for other methods.

You could use similar directives file:
  1 [{
  2     match: ["Test::m1", "Test::m2"],
  3     inline: ["-Test::m1_notinlined", "-Test::m2_notinlined"]
  4 },
  5 {
  6     match: "*.*",
  7     c1: {
  8         Exclude: true,
  9     },
 10     c2: {
 11         Exclude: true,
 12     }
 13 }]

$ /Users/ppunegov/Temp/repr/jdk/bin/java -XX:+UnlockDiagnosticVMOptions \
-XX:CompilerDirectivesFile=directives.json -XX:-BackgroundCompilation \
-XX:+PrintCompilation -XX:+PrintInlining -XX:-TieredCompilation Test 2 compiler \
directives added

### Excluding compile: static Test::m1_notinlined
made not compilable on levels 0 1 2 3 4  Test::m1_notinlined (1 bytes)   excluded by \
CompileCommand  113    1    b        Test::m1 (4 bytes)
                            @ 0   Test::m1_notinlined (1 bytes)   not compilable \
(disabled)  114    2    b        Test::m2 (8 bytes)
                            @ 4   Test::m2_notinlined (1 bytes)   disallowed by \
CompileCommand ### Excluding compile: static Test::main
made not compilable on levels 0 1 2 3 4  Test::main (39 bytes)   excluded by \
CompileCommand ### Excluding compile: static Test::m2_notinlined
made not compilable on levels 0 1 2 3 4  Test::m2_notinlined (1 bytes)   excluded by \
CompileCommand



— Pavel.

> On 29 Jun 2016, at 17:12, Roland Westrelin <rwestrel@redhat.com> wrote:
> 
> Hi Vladimir,
> 
> > For "exclude" command such behavior is expected. Disabling compilation
> > of a method is used to workaround compiler bugs and it doesn't matter
> > whether the problematic method is the root of a compilation or being
> > inlined - compiler shouldn't try to compile the method at all.
> 
> That makes sense indeed.
> 
> Roland.
> 


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space;" class="">Hi Roland,<div class=""><br \
class=""></div><div class="">I think CompilerControl could help you if you want to \
compile only m1 and m2 but disable inlining for other methods.</div><div class=""><br \
class=""></div><div class="">You could use similar directives file:</div><span \
class="">&nbsp; 1&nbsp;[{<br class=""></span><span class="">&nbsp;&nbsp;2&nbsp;&nbsp; \
&nbsp;&nbsp;match:&nbsp;["Test::m1",&nbsp;"Test::m2"],<br class=""></span><span \
class="">&nbsp;&nbsp;3&nbsp;&nbsp; \
&nbsp;&nbsp;inline:&nbsp;["-Test::m1_notinlined",&nbsp;"-Test::m2_notinlined"]<br \
class=""></span><span class="">&nbsp;&nbsp;4&nbsp;},<br class=""></span><span \
class="">&nbsp;&nbsp;5&nbsp;{<br class=""></span><span \
class="">&nbsp;&nbsp;6&nbsp;&nbsp; &nbsp;&nbsp;match:&nbsp;"*.*",<br \
class=""></span><span class="">&nbsp;&nbsp;7&nbsp;&nbsp; &nbsp;&nbsp;c1:&nbsp;{<br \
class=""></span><span class="">&nbsp;&nbsp;8&nbsp;&nbsp; &nbsp; &nbsp; \
&nbsp;&nbsp;Exclude:&nbsp;true,<br class=""></span><span \
class="">&nbsp;&nbsp;9&nbsp;&nbsp; &nbsp;&nbsp;},<br class=""></span><span \
class="">&nbsp;10&nbsp;&nbsp; &nbsp;&nbsp;c2:&nbsp;{<br class=""></span><span \
class="">&nbsp;11&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Exclude:&nbsp;true,<br \
class=""></span><span class="">&nbsp;12&nbsp;&nbsp; &nbsp;&nbsp;}<br \
class=""></span><span class="">&nbsp;13&nbsp;}]<br class=""></span><span class=""><br \
class=""></span><span class="">$&nbsp;/Users/ppunegov/Temp/repr/jdk/bin/java \
-XX:+UnlockDiagnosticVMOptions -XX:CompilerDirectivesFile=directives.json \
-XX:-BackgroundCompilation -XX:+PrintCompilation -XX:+PrintInlining \
-XX:-TieredCompilation Test<br class=""></span><span class="">2 compiler directives \
added<br class=""></span><span class=""><br class=""></span><div class=""><span \
class="">### Excluding compile: static Test::m1_notinlined<br class="">made not \
compilable on levels 0 1 2 3 4&nbsp;&nbsp;Test::m1_notinlined (1 \
bytes)&nbsp;&nbsp;&nbsp;excluded by CompileCommand<br class="">&nbsp; \
&nbsp;&nbsp;113&nbsp; &nbsp;&nbsp;1&nbsp; &nbsp;&nbsp;b&nbsp; &nbsp; &nbsp; \
&nbsp;&nbsp;Test::m1 (4 bytes)<br class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;@ \
0&nbsp;&nbsp;&nbsp;Test::m1_notinlined (1 bytes)&nbsp;&nbsp;&nbsp;not compilable \
(disabled)<br class="">&nbsp; &nbsp;&nbsp;114&nbsp; &nbsp;&nbsp;2&nbsp; \
&nbsp;&nbsp;b&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Test::m2 (8 bytes)<br class="">&nbsp; \
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;&nbsp;@ 4&nbsp;&nbsp;&nbsp;Test::m2_notinlined (1 \
bytes)&nbsp;&nbsp;&nbsp;disallowed by CompileCommand<br class="">### Excluding \
compile: static Test::main<br class="">made not compilable on levels 0 1 2 3 \
4&nbsp;&nbsp;Test::main (39 bytes)&nbsp;&nbsp;&nbsp;excluded by CompileCommand<br \
class="">### Excluding compile: static Test::m2_notinlined<br class="">made not \
compilable on levels 0 1 2 3 4&nbsp;&nbsp;Test::m2_notinlined (1 \
bytes)&nbsp;&nbsp;&nbsp;excluded by CompileCommand<br class=""><br \
class=""></span><span class=""><br class=""></span><span class=""><br \
class=""></span><div class=""><div class=""> <div style="color: rgb(0, 0, 0); \
letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space;" class=""><div class="">— Pavel.</div></div> \
</div> <br class=""><div><blockquote type="cite" class=""><div class="">On 29 Jun \
2016, at 17:12, Roland Westrelin &lt;<a href="mailto:rwestrel@redhat.com" \
class="">rwestrel@redhat.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div class="">Hi Vladimir,<br \
class=""><br class=""><blockquote type="cite" class="">For "exclude" command such \
behavior is expected. Disabling compilation<br class="">of a method is used to \
workaround compiler bugs and it doesn't matter<br class="">whether the problematic \
method is the root of a compilation or being<br class="">inlined - compiler shouldn't \
try to compile the method at all.<br class=""></blockquote><br class="">That makes \
sense indeed.<br class=""><br class="">Roland.<br class=""><br \
class=""></div></div></blockquote></div><br class=""></div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic