A call “nm libjvm.so” on Linux x86_64 showed me those symbols NOT
starting with JVM_ / JNI_ prefix .
nm images/jdk/lib/server/libjvm.so | grep " T "
000000000088aff0 T AsyncGetCallTrace
0000000000785c30 T blob
0000000000786e20 T debug
0000000000785e20 T disnm
0000000000785cd0 T dump_vtable
0000000000787010 T events
00000000007871f0 T find
0000000000787710 T findbcp
0000000000787470 T findclass
00000000007870a0 T findm
00000000007875c0 T findmethod
0000000000787150 T findnm
0000000000787330 T findpc
0000000000786f80 T flush
0000000000787a70 T help
0000000000b12010 T jio_fprintf
0000000000b120a0 T jio_printf
0000000000b11ab0 T jio_snprintf
0000000000b11ff0 T jio_vfprintf
0000000000b11a70 T jio_vsnprintf
....
0000000000786ed0 T ndebug
0000000000785d60 T nm
0000000000e646e0 T numa_error
0000000000e646d0 T numa_warn
00000000007866f0 T pfl
0000000000786300 T pp
0000000000785ed0 T printnm
0000000000786520 T ps
0000000000786bb0 T psd
00000000007868b0 T psf
0000000000786ce0 T pss
0000000000786a70 T threads
0000000000787800 T u5decode
0000000000787980 T u5p
0000000000785ff0 T universe
0000000000786120 T verify
Most of them are from debug.cpp .
But some like AsyncGetCallTrace or numa_error / numa_warn are from other
coding .
Regarding the debug.cpp functions , maybe reference/call them them from a
JVM_all_debug_helpers function that is exported ?
This would probably solve issues with those exported names .
Btw. was the export on Windows also done to avoid elimination of those
functions by the linker ?
Best regards, Matthias
From: Baesken, Matthias
Sent: Friday, 6 March 2026 15:35
To: Erik Joelsson <[email protected]>; [email protected]
Cc: David Holmes <[email protected]>
Subject: Exporting debug helpers and 8375311: Some builds are missing debug
helpers and exporting debug-helpers
Hi , recently I did https://bugs.openjdk.org/browse/JDK-8375311
to prevent elimination of the “debug helpers” provided by debug.cpp (can
happen on Linux with LTO or other “aggressive” linking ) .
But now I noticed this older change :
https://bugs.openjdk.org/browse/JDK-8327049
Only export debug.cpp functions on Windows
... where in the review
https://github.com/openjdk/jdk/pull/18062
it was stated :
“We spotted a problem with an Oracle-internal testing tool that exported a
function named debug, which ended up calling the exported debug function from
Hotspot instead. But the problem could theoretically apply to any code out
there that links with libjvm.so and has conflicting symbols defined. Normally,
the symbols exported from Hotspot are named JVM_<foo> to minimize the risk of
this theoretical conflict becoming real, but the functions in debug.cpp has
much shorter and more common names (for simple usage in the debugger), so the
risk of actual conflicts are much higher.”
So I wonder – is this issue still there with this “internal testing tool” ?
On the other hand , renaming the debug helpers (e.g. with a prefix) might
solve such clashes also on Windows (where we export them for some time
already) - but developers would probably not like long names there, I guess ?
So what do you think about it ?
How to deal with such exported symbols (or symbols that are needed for
special purposes but are seen as “dead” by linkers) .
Best regards, Matthias