<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/">https://cr.openjdk.java.net/~manc/8220388/webrev.01/</a></div><div><br></div><div dir="ltr"><div><div dir="ltr" class="gmail-m_7352077760953250501gmail-m_-6952971563726023722gmail-m_5536005708956113936gmail_signature"><div dir="ltr">-Man</div></div></div></div></div></div></div></div>