-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: 27
-
Component/s: core-libs
-
None
-
generic
-
generic
libjimage has a few unused functions/methods; those are listed when logging elimination with -Wl,--gc-sections -Wl,--print-gc-sections .
Maybe we could remove them (or with if are still needed for completeness put them into #if 0 ).
A few examples :
ImageFileReaderTable::contains(ImageFileReader*)
ImageFileReader::reader_to_ID(ImageFileReader*)
ImageFileReader::id_check(unsigned long long)
ImageFileReader::id_to_reader(unsigned long long)
ImageFileReader::read_at(unsigned char*, unsigned long long, unsigned long long)
ImageFileReader::find_location(char const*, ImageLocation&)
When removing those methods on AIX and Linux we get slightly smaller libjimage.so (product build) :
AIX : 181298 -> 175507
Linuxppc64le : 225024 -> 224632
Linuxx86_64 : 154432 -> 154032
Linux Alpine : 175056 -> 170560
On Windows and macOS we see no effect, seems the default compiler + linker options are good enough there to eliminated the code in product builds .
For completeness, some results for fastdebug builds (sizes of libjimage.so and debuginfo) :
AIX : 208 K -> 200 K ; no separate debuginfo currently
Linuxppc64le : 228 K -> 224 K ; 700 K -> 692 K
Maybe we could remove them (or with if are still needed for completeness put them into #if 0 ).
A few examples :
ImageFileReaderTable::contains(ImageFileReader*)
ImageFileReader::reader_to_ID(ImageFileReader*)
ImageFileReader::id_check(unsigned long long)
ImageFileReader::id_to_reader(unsigned long long)
ImageFileReader::read_at(unsigned char*, unsigned long long, unsigned long long)
ImageFileReader::find_location(char const*, ImageLocation&)
When removing those methods on AIX and Linux we get slightly smaller libjimage.so (product build) :
AIX : 181298 -> 175507
Linuxppc64le : 225024 -> 224632
Linuxx86_64 : 154432 -> 154032
Linux Alpine : 175056 -> 170560
On Windows and macOS we see no effect, seems the default compiler + linker options are good enough there to eliminated the code in product builds .
For completeness, some results for fastdebug builds (sizes of libjimage.so and debuginfo) :
AIX : 208 K -> 200 K ; no separate debuginfo currently
Linuxppc64le : 228 K -> 224 K ; 700 K -> 692 K
- links to
-
Review(master)
openjdk/jdk/29502