<div dir="ltr"><div dir="ltr">(Adding <span style="font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:12.8px"><a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>)</span><div><font face="Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:12.8px">Maybe some one from build-dev could review or comment on this change?</span></font></div><div><font face="Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-size:12.8px"><br></span></font></div><div>-Man</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 12:55 PM Man Cao <<a href="mailto:manc@google.com">manc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks for the suggestion.</div><div>Yes, I agree it makes sense to increase -inlinehint-threshold only for "release" build.</div><div>However, I'm not sure if adding per-file CXX flags in JvmOverrideFiles.gmk is a better approach.</div><div>The root problem is that Clang is more likely to ignore the "inline" keyword than GCC, causing unexpected performance problems. G1 pause time could be just one of many potential performance problems.</div><div>If we take the effort to identify which files need the -inlinehint-threshold flag, we'd better take a step further to identify the functions that should be ALWAYSINLINE.</div><div><br></div><div>Thus I think it is more maintainable to do one the following:</div><div>(1) Identify the functions that should be "ALWAYSINLINE" instead of "inline", and avoid adding "-inlinehint-threshold" for Clang altogether. This requires much more work.</div><div>(2) Increase "-inlinehint-threshold" for all files in "release" build for Clang.</div><div>Note that -inlinehint-threshold is different from -inline-threshold, as -inlinehint-threshold only affects methods marked as "inline" and shouldn't unnecessarily bloat up the binary size for release build.<br></div><div><br></div><div>So I added an extra guard "x$DEBUG_LEVEL" = xrelease;" in flags-cflags.m4:<br></div><div><a href="https://cr.openjdk.java.net/~manc/8220388/webrev.01/" target="_blank">https://cr.openjdk.java.net/~manc/8220388/webrev.01/</a></div><div><br></div><div dir="ltr"><div><div dir="ltr" class="gmail-m_4675029839093307070gmail-m_7352077760953250501gmail-m_-6952971563726023722gmail-m_5536005708956113936gmail_signature"><div dir="ltr">-Man</div></div></div></div></div></div></div></div>
</blockquote></div></div>