diff src/share/vm/memory/metaspaceShared.hpp @ 23905:cb4af293fe70 jdk8u101-b07

8153312: Constrain AppCDS behavior Reviewed-by: iklam, acorn, mschoene
author jiangli
date Wed, 27 Apr 2016 14:41:55 -0400
parents 4cb90023bf2b
children
line wrap: on
line diff
--- a/src/share/vm/memory/metaspaceShared.hpp	Mon May 02 14:24:36 2016 -0700
+++ b/src/share/vm/memory/metaspaceShared.hpp	Wed Apr 27 14:41:55 2016 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -55,6 +55,7 @@
   static bool _check_classes_made_progress;
   static bool _has_error_classes;
   static bool _archive_loading_failed;
+  static bool _remapped_readwrite;
  public:
   enum {
     vtbl_list_size         = 17,   // number of entries in the shared space vtable list.
@@ -123,6 +124,10 @@
   // sharing is enabled. Simply returns true if sharing is not enabled
   // or if the remapping has already been done by a prior call.
   static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);
+  static bool remapped_readwrite() {
+    CDS_ONLY(return _remapped_readwrite);
+    NOT_CDS(return false);
+  }
 
   static void print_shared_spaces();