RFR: 8376703: Some coding in libjimage seems to be not called at all or not called from PRODUCT code [v2]
Matthias Baesken
mbaesken at openjdk.org
Mon Feb 2 18:49:51 UTC 2026
On Sat, 31 Jan 2026 16:24:58 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> > but this is not unused/uncalled in our codebase. I think it is inlined at the 1 or 2 points were it is used. But the method is still generated into the library even in case that it is always inlined ; it may be difficult to address this with the usual linker settings on Linux (means without linktime-gc or LTO or similar stuff ) .
>
> That is a bit unnerving but if someone were to use this warning to remove code that is used then there would be build or test failures.
Sure, we cannot remove such code. I tested a little bit and in some C coding, with always-inline attributes added I could force that such a function is always inlined **_AND_** was removed from the lib. But this seems not to work well with C++ methods.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29502#issuecomment-3837015503
More information about the core-libs-dev
mailing list