JDK-6666494 : Add compiler option to reduce binaries linked with UpdateConf.cpp
  • Type: Enhancement
  • Component: install
  • Sub-Component: install
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-02-22
  • Updated: 2010-09-17
  • Resolved: 2008-06-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b21Fixed 7Fixed
Description
deploy/src/plugin/win32/regutils/UpdateConf.cpp is included and recompiled for several install binaries.  Each binary does not necessarily use all of the functions, but without the /Gy compiler option to enable function level linking along with the /OPT:REF linker option, the linker cannot eliminate functions that are never referenced.  http://msdn2.microsoft.com/en-us/library/bxwfs976(VS.80).aspx

Adding -Gy to CXXFLAGS in deploy/make/plugin/regutilsmsi/Makefile reduced the size of the DLL by 8 KB.

The following use UpdateConf.cpp:
plugin/jupdate/checker - jucheck.exe
plugin/jupdate/scheduler - jusched.exe
plugin/regutils - regutils.dll
plugin/regutilsmsi - regutilsmsi.dll
installer/bundles/windows/ishield/wrapper/wrapper.jdk/
installer/bundles/windows/ishield/wrapper/wrapper.jre/Makefile
installer/bundles/windows/ishield/wrapper/wrapper.jre/Makefile.sponsor
installer/bundles/windows/ishield/wrapper_online/jre/
installer/bundles/windows/ishield/wrapper_online/sdk/

Comments
SUGGESTED FIX added -Gy compiler option for jucheck.exe, jusched.exe, regutils.dll, and RegUtilsMSI.dll webrev: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6666494.0
23-02-2008

EVALUATION -Gy compiler option plus existing -OPT:REF linker option removes 4 to 12 KB of unused functions from each of these binaries: deploy/make/plugin/jupdate/checker/Makefile jucheck.exe 328 - 320 = 8 KB deploy/make/plugin/jupdate/scheduler/Makefile jusched.exe 140 - 128 = 12 KB deploy/make/plugin/regutils/Makefile regutils.dll 248 - 244 = 4 KB deploy/make/plugin/regutilsmsi/Makefile RegUtilsMSI.dll 300 - 292 = 8 KB I didn not see any savings with binaris build in the install workspace: wrapper-jdk\obj\wrapper.exe wrapper-jre\obj\wrapper.exe, wrapper-jre-sponsor\obj\wrapper.exe jinstall-jre\obj\jinstall.exe jinstall-sdk\obj\jinstall_sdk.exe jinstall-jkernel\obj\jinstall_jkernel.exe For these files, -Gy and -OPT:REF did not decrease the size of the executables.
22-02-2008