< prev index next >

src/hotspot/share/cds/cdsConfig.cpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -26,22 +26,33 @@
  #include "cds/archiveHeapLoader.hpp"
  #include "cds/cdsConfig.hpp"
  #include "cds/heapShared.hpp"
  #include "classfile/classLoaderDataShared.hpp"
  #include "logging/log.hpp"
+ #include "runtime/arguments.hpp"
+ #include "runtime/globals.hpp"
  
  bool CDSConfig::_is_dumping_static_archive = false;
  bool CDSConfig::_is_dumping_dynamic_archive = false;
  
  // The ability to dump the FMG depends on many factors checked by
  // is_dumping_full_module_graph(), but can be unconditionally disabled by
  // _dumping_full_module_graph_disabled. (Ditto for loading the FMG).
  bool CDSConfig::_dumping_full_module_graph_disabled = false;
  bool CDSConfig::_loading_full_module_graph_disabled = false;
  
+ bool CDSConfig::is_valhalla_preview() {
+   return Arguments::enable_preview() && EnableValhalla;
+ }
+ 
+ 
  #if INCLUDE_CDS_JAVA_HEAP
  bool CDSConfig::is_dumping_heap() {
+   if (is_valhalla_preview()) {
+     // Not working yet -- e.g., HeapShared::oop_hash() needs to be implemented for value oops
+     return false;
+   }
    // heap dump is not supported in dynamic dump
    return is_dumping_static_archive() && HeapShared::can_write();
  }
  
  bool CDSConfig::is_dumping_full_module_graph() {
< prev index next >