building libjvm with -Os for space optimization - was : RE: RFR: 8234525: enable link-time section-gc for linux s390x to remove unused code
Baesken, Matthias
matthias.baesken at sap.com
Tue Dec 17 16:17:32 UTC 2019
Hello, a small update from my side . I had (on Linux) for a couple of days our jdk11u tests + benchmarks running with -Os instead of the usual settings (-O3) .
With have (independent of -Os / -O3) a bit of variance in our benchmarks ( jbb15 , jvm2008, jvm98 ) .
However the benchmark results of -Os vs. -O3 were comparable .
>we discussed doing the opposite for Mac OS X recently, where builds are
>currently set to -Os by default. -O3 helped various networking
>(micro)benchmarks by up to 20%.
What microbenchmarks do you have in mind that show much better performance with -O3 compared to -Os ?
Best regards, Matthias
>
> Hi Martin,
>
> On 2019-11-27 19:03, Doerr, Martin wrote:
> > Hi Claes,
> >
> > that kind of surprises me. I'd expect files which rather benefit from -O3 to
> be far less than those which benefit from -Os.
> > Most performance critical code lives inside the code cache and is not
> dependent on C++ compiler optimizations.
> > I'd expect GC code, C2's register allocation and a few runtime files to be the
> most performance critical C++ code.
> > So the list of files for -Os may become long.
>
> that might very well be the end result, and once/if we've gone down this
> path long enough to see that -O3 becomes the exception, we can re-
> examine the default. Changing the default and then trying to recuperate
> would be hard/impossible to do incrementally.
>
> >
> > Yeah, I think we should use native profiling information to find out what's
> really going on >
> > Your idea to change file by file and check for performance regression
> makes sense to me, though
> Hopefully we don't have to do one RFE per file.. :-)
>
> /Claes
More information about the build-dev
mailing list