Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is OpenJDK "fastdebug" build mode? How is it different from "release"?

Tags:

java

What are the differences between OpenJDK "fastdebug" and "release" builds? Could an application run significantly slower on "fastdebug" than on "release"?

I've heard that "fastdebug" is somehow "good", and could find a lot of messages on the Internet from people looking for "fastdebug" builds of various OpenJDK versions and for various platforms, or explaining how to prepare those builds manually, but having trouble finding anywhere a clear description of what does "fastdebug" essentially mean.

like image 611
leventov Avatar asked Nov 13 '18 11:11

leventov


1 Answers

See the definition here:

###############################################################################
# Set the debug level
#    release: no debug information, all optimizations, no asserts.
#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
#    fastdebug: debug information (-g), all optimizations, all asserts
#    slowdebug: debug information (-g), no optimizations, all asserts
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],

Yes, fastdebug can and will run slower than release, because it would assert a lot along the way. Enabled asserts are the reason why users seek fastdebug builds when suspecting the JVM bug: what fails cryptically in release builds, frequently asserts meaningfully in fastdebug. Additionally, fastdebug allows better debugging, because it usually ships with debug symbols, and it has access to "develop" JVM flags that are not settable in release builds.

like image 165
Aleksey Shipilev Avatar answered Nov 19 '22 05:11

Aleksey Shipilev