RFR: 8369560: Slowdebug build without CDS fails

Johan Sjölen jsjolen at openjdk.org
Mon Oct 13 06:45:02 UTC 2025


On Fri, 10 Oct 2025 13:51:42 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Slowdebug builds without CDS fail, this was noticed on AIX.
> On Linux x86_64 (when using --with-debug-level=slowdebug --disable-cds ) I get a little better error messages , pointing already to code locations :
> 
> 
> /jdk/src/hotspot/share/oops/trainingData.hpp:155: error: undefined reference to 'TrainingData::TrainingDataLocker::_snapshot'
> /jdk/src/hotspot/share/classfile/vmClasses.cpp:123: error: undefined reference to 'AOTLinkedClassBulkLoader::preload_classes(JavaThread*)'
> collect2: error: ld returned 1 exit status

Changes requested by jsjolen (Reviewer).

src/hotspot/share/oops/trainingData.cpp line 475:

> 473: #if INCLUDE_CDS
> 474:     TrainingDataLocker::snapshot();
> 475: #endif

Is this actually needed? Seems like `snapshot()` already protects us.


    static void snapshot() {
#if INCLUDE_CDS
      assert_locked();
      _snapshot = true;
#endif
    }

-------------

PR Review: https://git.openjdk.org/jdk/pull/27744#pullrequestreview-3330150623
PR Review Comment: https://git.openjdk.org/jdk/pull/27744#discussion_r2425339193


More information about the hotspot-dev mailing list