author | david |
Tue, 29 Sep 2015 11:02:08 +0200 | |
changeset 33105 | 294e48b4f704 |
parent 31345 | 1bba15125d8d |
child 34242 | e530decd7c63 |
child 34257 | 4be3504cc03b |
permissions | -rw-r--r-- |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
1 |
/* |
30578 | 2 |
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
4 |
* |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
8 |
* |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
13 |
* accompanied this code). |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
14 |
* |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
18 |
* |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
21 |
* questions. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
22 |
* |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
23 |
*/ |
30578 | 24 |
|
25 |
#ifndef SHARE_VM_MEMORY_METASPACESHARED_HPP |
|
26 |
#define SHARE_VM_MEMORY_METASPACESHARED_HPP |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
27 |
|
28363
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
28 |
#include "classfile/compactHashtable.hpp" |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
29 |
#include "memory/allocation.hpp" |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
30 |
#include "memory/memRegion.hpp" |
30291
54cdc5c1a9cb
8068352: Move virtualspace.* out of src/share/vm/runtime to memory directory
coleenp
parents:
28363
diff
changeset
|
31 |
#include "memory/virtualspace.hpp" |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
32 |
#include "utilities/exceptions.hpp" |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
33 |
#include "utilities/macros.hpp" |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
34 |
|
26304
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
35 |
#define LargeSharedArchiveSize (300*M) |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
36 |
#define HugeSharedArchiveSize (800*M) |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
37 |
#define ReadOnlyRegionPercentage 0.4 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
38 |
#define ReadWriteRegionPercentage 0.55 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
39 |
#define MiscDataRegionPercentage 0.03 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
40 |
#define MiscCodeRegionPercentage 0.02 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
41 |
#define LargeThresholdClassCount 5000 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
42 |
#define HugeThresholdClassCount 40000 |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
43 |
|
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
44 |
#define SET_ESTIMATED_SIZE(type, region) \ |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
45 |
Shared ##region## Size = FLAG_IS_DEFAULT(Shared ##region## Size) ? \ |
26408
d6defe172e25
8056175: Change "8048150: Allow easy configurations for large CDS archives" triggers conversion warning with older GCC
ccheung
parents:
26304
diff
changeset
|
46 |
(uintx)(type ## SharedArchiveSize * region ## RegionPercentage) : Shared ## region ## Size |
26304
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
47 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
48 |
class FileMapInfo; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
49 |
|
28363
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
50 |
class MetaspaceSharedStats VALUE_OBJ_CLASS_SPEC { |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
51 |
public: |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
52 |
MetaspaceSharedStats() { |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
53 |
memset(this, 0, sizeof(*this)); |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
54 |
} |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
55 |
CompactHashtableStats symbol; |
31345
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
56 |
CompactHashtableStats string; |
28363
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
57 |
}; |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
58 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
59 |
// Class Data Sharing Support |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
60 |
class MetaspaceShared : AllStatic { |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
61 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
62 |
// CDS support |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
63 |
static ReservedSpace* _shared_rs; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
64 |
static int _max_alignment; |
28363
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
65 |
static MetaspaceSharedStats _stats; |
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
66 |
static bool _link_classes_made_progress; |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
67 |
static bool _check_classes_made_progress; |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
68 |
static bool _has_error_classes; |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
69 |
static bool _archive_loading_failed; |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
70 |
public: |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
71 |
enum { |
27404
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
72 |
vtbl_list_size = 17, // number of entries in the shared space vtable list. |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
73 |
num_virtuals = 200, // maximum number of virtual functions |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
74 |
// If virtual functions are added to Metadata, |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
75 |
// this number needs to be increased. Also, |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
76 |
// SharedMiscCodeSize will need to be increased. |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
77 |
// The following 2 sizes were based on |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
78 |
// MetaspaceShared::generate_vtable_methods() |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
79 |
vtbl_method_size = 16, // conservative size of the mov1 and jmp instructions |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
80 |
// for the x64 platform |
33c0f343cd5c
8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize
ccheung
parents:
26408
diff
changeset
|
81 |
vtbl_common_code_size = (1*K) // conservative size of the "common_code" for the x64 platform |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
82 |
}; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
83 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
84 |
enum { |
28018
abc067cd68fd
8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified
ccheung
parents:
27404
diff
changeset
|
85 |
min_ro_size = NOT_LP64(8*M) LP64_ONLY(9*M), // minimum ro and rw regions sizes based on dumping |
abc067cd68fd
8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified
ccheung
parents:
27404
diff
changeset
|
86 |
min_rw_size = NOT_LP64(7*M) LP64_ONLY(12*M) // of a shared archive using the default classlist |
abc067cd68fd
8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified
ccheung
parents:
27404
diff
changeset
|
87 |
}; |
abc067cd68fd
8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified
ccheung
parents:
27404
diff
changeset
|
88 |
|
abc067cd68fd
8065050: vm crashes during CDS dump when very small SharedMiscDataSize is specified
ccheung
parents:
27404
diff
changeset
|
89 |
enum { |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
90 |
ro = 0, // read-only shared space in the heap |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
91 |
rw = 1, // read-write shared space in the heap |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
92 |
md = 2, // miscellaneous data for initializing tables, etc. |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
93 |
mc = 3, // miscellaneous code - vtable replacement. |
31345
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
94 |
max_strings = 2, // max number of string regions in string space |
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
95 |
num_non_strings = 4, // number of non-string regions |
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
96 |
first_string = num_non_strings, // index of first string region |
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
97 |
n_regions = max_strings + num_non_strings // total number of regions |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
98 |
}; |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
99 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
100 |
// Accessor functions to save shared space created for metadata, which has |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
101 |
// extra space allocated at the end for miscellaneous data and code. |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
102 |
static void set_max_alignment(int alignment) { |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
103 |
CDS_ONLY(_max_alignment = alignment); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
104 |
} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
105 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
106 |
static int max_alignment() { |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
107 |
CDS_ONLY(return _max_alignment); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
108 |
NOT_CDS(return 0); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
109 |
} |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
110 |
|
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
111 |
static void prepare_for_dumping() NOT_CDS_RETURN; |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
112 |
static void preload_and_dump(TRAPS) NOT_CDS_RETURN; |
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
113 |
static int preload_and_dump(const char * class_list_path, |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
114 |
GrowableArray<Klass*>* class_promote_order, |
27677 | 115 |
TRAPS) NOT_CDS_RETURN_(0); |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
116 |
|
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
117 |
static ReservedSpace* shared_rs() { |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
118 |
CDS_ONLY(return _shared_rs); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
119 |
NOT_CDS(return NULL); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
120 |
} |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
121 |
|
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
122 |
static void set_shared_rs(ReservedSpace* rs) { |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
123 |
CDS_ONLY(_shared_rs = rs;) |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
124 |
} |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
125 |
|
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
126 |
static void set_archive_loading_failed() { |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
127 |
_archive_loading_failed = true; |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
128 |
} |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
129 |
static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); |
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
130 |
static void initialize_shared_spaces() NOT_CDS_RETURN; |
31345
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
131 |
static void fixup_shared_string_regions() NOT_CDS_RETURN; |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
132 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
133 |
// Return true if given address is in the mapped shared space. |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
134 |
static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
135 |
|
31345
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
136 |
static bool is_string_region(int idx) NOT_CDS_RETURN_(false); |
1bba15125d8d
8015086: add interned strings to the shared archive.
jiangli
parents:
30579
diff
changeset
|
137 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
138 |
static void generate_vtable_methods(void** vtbl_list, |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
139 |
void** vtable, |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
140 |
char** md_top, char* md_end, |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
141 |
char** mc_top, char* mc_end); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
142 |
static void serialize(SerializeClosure* sc); |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
143 |
|
28363
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
144 |
static MetaspaceSharedStats* stats() { |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
145 |
return &_stats; |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
146 |
} |
047115468f16
8059510: Compact symbol table layout inside shared archive.
jiangli
parents:
28023
diff
changeset
|
147 |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
148 |
// JVM/TI RedefineClasses() support: |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
149 |
// Remap the shared readonly space to shared readwrite, private if |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
150 |
// sharing is enabled. Simply returns true if sharing is not enabled |
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
151 |
// or if the remapping has already been done by a prior call. |
13975
2f7431485cfa
7189254: Change makefiles for more flexibility to override defaults
jprovino
parents:
13728
diff
changeset
|
152 |
static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
153 |
|
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
154 |
static void print_shared_spaces(); |
26135
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
155 |
|
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
156 |
static bool try_link_class(InstanceKlass* ik, TRAPS); |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
157 |
static void link_one_shared_class(Klass* obj, TRAPS); |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
158 |
static void check_one_shared_class(Klass* obj); |
82b516c550f7
8046070: Class Data Sharing clean up and refactoring
iklam
parents:
13975
diff
changeset
|
159 |
static void link_and_cleanup_shared_classes(TRAPS); |
26304
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
160 |
|
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
161 |
static int count_class(const char* classlist_file); |
a28e6335ce60
8048150: Allow easy configurations for large CDS archives
ccheung
parents:
26135
diff
changeset
|
162 |
static void estimate_regions_size() NOT_CDS_RETURN; |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
diff
changeset
|
163 |
}; |
30578 | 164 |
#endif // SHARE_VM_MEMORY_METASPACESHARED_HPP |