On Mon, 27 Feb 2023 16:16:50 GMT, Jayathirth D V <j...@openjdk.org> wrote:
>> Under https://bugs.openjdk.org/browse/JDK-8264846 we moved to -O3 level of >> gcc optimizations from -O1 level for libawt build. This improved our >> J2DBench performance numbers in some options considerably. >> >> Recent changes done under https://bugs.openjdk.org/browse/JDK-8299337 causes >> difference in generated code by gcc and this is resulting in performance >> regression for bimg_misc-* J2DBench options in our performance servers. >> Under https://bugs.openjdk.org/browse/JDK-8299337 we have just removed >> unused variables and it is a cleanup task. >> >> We can force gcc to generate position independent code by using -fpic >> option.Also i have removed -fgcse-after-reload option for gcc, because this >> is by default covered under -O3 level of optimization introduced under >> https://bugs.openjdk.org/browse/JDK-8264846. >> >> With this change bimg_misc-* J2DBench option performance regression is >> resolved and there are no regression in other options of J2DBench or >> SwingMark and it is verified in our performance servers. > > Jayathirth D V has updated the pull request incrementally with one additional > commit since the last revision: > > Update comment make/modules/java.desktop/lib/Awt2dLibraries.gmk line 126: > 124: # about initializing a declared 'extern' cannot be turned off > individually. Only > 125: # applies to debug builds. This limitation in gcc is tracked in > 126: # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45977 The comment above needs to be moved inside the if block because it only applies to the first setting, not the second. make/modules/java.desktop/lib/Awt2dLibraries.gmk line 130: > 128: BUILD_LIBAWT_debug_mem.c_CFLAGS := -w > 129: # This option improves performance of FillRect/FillOval in Java2D by > 15% for some gcc > 130: LIBAWT_CFLAGS += -fpic So .. acc. to the eval in JBS we can get rid of -fgcse-after-reload because it is implied by -O3 And Erik says -fPIC is implied by -fpic So how is -fpic different than -fPIC in a way that helps here ? So far as I can tell the -fpic are using just limits the size of the global offset table that -fPIC will generate. Since we had an unlimited offset table before, then -fpic won't change anything. So what's the explanation ? ------------- PR: https://git.openjdk.org/jdk/pull/12761