<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jun 5, 2008, at 12:11 AM, Rémi Forax wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">It allows wildcards (prefix or suffix)<span class="Apple-converted-space"> </span>so all entries are matched</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">each time the runtime want to know if it can inline a method.</font></p></blockquote><div><br></div><div>Yes. This has not been a problem, since the compiler does not perform such queries very often. It does not consume a significant fraction of CPU cycles, compared to the running application.</div><div><br></div><div>If it were a problem, or if it did not scale well to many marked methods, we would want to index the oracle. At that point it would make sense to add a bit to the methodOop layout, saying whether the method was known to the oracle's index.</div><br><blockquote type="cite"><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Futhermore, compilerOracle only offers a hint</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">at least with c1, INLINE_LEVEL, INLINE_SIZE etc have a</font></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">higher priority than compilerOracle inline directive (should_inline).</font></p></blockquote><br></div><div>We could add a must_inline or force_inline command to the oracle, then, unless there is some performance problem I've missed.</div><div><br></div><div>Actually, it is best to change the semantics of the existing inline command. Let's try that first. If a question arises about compatibility, we can make new tuning variables which will govern methods hand-marked for inlining, instead of the existing variables:</div><div><br></div><div>InlineSmallCodeWhenRequested</div><div>MaxInlineSizeWhenRequested</div><div>MaxInlineLevelWhenRequested</div><div><br></div><div>The inline command in the oracle is a new feature, not yet in wide use, so this is a reasonable change.</div><div><br></div><div>I see your point about adding a programmatic API. (The oracle is currently a flat file.) So let's add an Unsafe method, but have it take a string and pass it to the oracle to parse. Take the incoming Java string, comvert to utf8 (there's a function in javaClasses.cpp) and pass the resulting C string to CompilerOracle::parse_from_line.</div><div><br></div><div>What do you think?</div><div><br></div><div>-- John</div></body></html>