comparison 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
comparison
equal deleted inserted replaced
23902:432c2a4b018e 23905:cb4af293fe70
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
53 static int _max_alignment; 53 static int _max_alignment;
54 static bool _link_classes_made_progress; 54 static bool _link_classes_made_progress;
55 static bool _check_classes_made_progress; 55 static bool _check_classes_made_progress;
56 static bool _has_error_classes; 56 static bool _has_error_classes;
57 static bool _archive_loading_failed; 57 static bool _archive_loading_failed;
58 static bool _remapped_readwrite;
58 public: 59 public:
59 enum { 60 enum {
60 vtbl_list_size = 17, // number of entries in the shared space vtable list. 61 vtbl_list_size = 17, // number of entries in the shared space vtable list.
61 num_virtuals = 200, // maximum number of virtual functions 62 num_virtuals = 200, // maximum number of virtual functions
62 // If virtual functions are added to Metadata, 63 // If virtual functions are added to Metadata,
121 // JVM/TI RedefineClasses() support: 122 // JVM/TI RedefineClasses() support:
122 // Remap the shared readonly space to shared readwrite, private if 123 // Remap the shared readonly space to shared readwrite, private if
123 // sharing is enabled. Simply returns true if sharing is not enabled 124 // sharing is enabled. Simply returns true if sharing is not enabled
124 // or if the remapping has already been done by a prior call. 125 // or if the remapping has already been done by a prior call.
125 static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); 126 static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);
127 static bool remapped_readwrite() {
128 CDS_ONLY(return _remapped_readwrite);
129 NOT_CDS(return false);
130 }
126 131
127 static void print_shared_spaces(); 132 static void print_shared_spaces();
128 133
129 static bool try_link_class(InstanceKlass* ik, TRAPS); 134 static bool try_link_class(InstanceKlass* ik, TRAPS);
130 static void link_one_shared_class(Klass* obj, TRAPS); 135 static void link_one_shared_class(Klass* obj, TRAPS);