Mercurial > hg > truffle
comparison src/share/vm/memory/metaspaceShared.hpp @ 6856:9855b7e559ae
Merge
author | collins |
---|---|
date | Fri, 12 Oct 2012 10:49:39 -0700 |
parents | fb19af007ffc |
children | 6e0cb14ce59b |
comparison
equal
deleted
inserted
replaced
6842:b9a9ed0f8eeb | 6856:9855b7e559ae |
---|---|
54 md = 2, // miscellaneous data for initializing tables, etc. | 54 md = 2, // miscellaneous data for initializing tables, etc. |
55 mc = 3, // miscellaneous code - vtable replacement. | 55 mc = 3, // miscellaneous code - vtable replacement. |
56 n_regions = 4 | 56 n_regions = 4 |
57 }; | 57 }; |
58 | 58 |
59 static void set_max_alignment(int alignment) KERNEL_RETURN; | 59 // Accessor functions to save shared space created for metadata, which has |
60 static int max_alignment() KERNEL_RETURN_(0); | 60 // extra space allocated at the end for miscellaneous data and code. |
61 static void set_max_alignment(int alignment) { | |
62 CDS_ONLY(_max_alignment = alignment); | |
63 } | |
61 | 64 |
62 static void preload_and_dump(TRAPS) KERNEL_RETURN; | 65 static int max_alignment() { |
63 static ReservedSpace* shared_rs(); | 66 CDS_ONLY(return _max_alignment); |
64 static void set_shared_rs(ReservedSpace* rs) KERNEL_RETURN; | 67 NOT_CDS(return 0); |
68 } | |
65 | 69 |
66 static bool map_shared_spaces(FileMapInfo* mapinfo) KERNEL_RETURN_(false); | 70 static void preload_and_dump(TRAPS) NOT_CDS_RETURN; |
67 static void initialize_shared_spaces() KERNEL_RETURN; | 71 |
72 static ReservedSpace* shared_rs() { | |
73 CDS_ONLY(return _shared_rs); | |
74 NOT_CDS(return NULL); | |
75 } | |
76 | |
77 static void set_shared_rs(ReservedSpace* rs) { | |
78 CDS_ONLY(_shared_rs = rs;) | |
79 } | |
80 | |
81 static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false); | |
82 static void initialize_shared_spaces() NOT_CDS_RETURN; | |
68 | 83 |
69 // Return true if given address is in the mapped shared space. | 84 // Return true if given address is in the mapped shared space. |
70 static bool is_in_shared_space(const void* p) KERNEL_RETURN_(false); | 85 static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false); |
71 | 86 |
72 static void generate_vtable_methods(void** vtbl_list, | 87 static void generate_vtable_methods(void** vtbl_list, |
73 void** vtable, | 88 void** vtable, |
74 char** md_top, char* md_end, | 89 char** md_top, char* md_end, |
75 char** mc_top, char* mc_end); | 90 char** mc_top, char* mc_end); |
77 | 92 |
78 // JVM/TI RedefineClasses() support: | 93 // JVM/TI RedefineClasses() support: |
79 // Remap the shared readonly space to shared readwrite, private if | 94 // Remap the shared readonly space to shared readwrite, private if |
80 // sharing is enabled. Simply returns true if sharing is not enabled | 95 // sharing is enabled. Simply returns true if sharing is not enabled |
81 // or if the remapping has already been done by a prior call. | 96 // or if the remapping has already been done by a prior call. |
82 static bool remap_shared_readonly_as_readwrite() KERNEL_RETURN_(true); | 97 static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); |
83 | 98 |
84 static void print_shared_spaces(); | 99 static void print_shared_spaces(); |
85 }; | 100 }; |
86 #endif // SHARE_VM_MEMORY_METASPACE_SHARED_HPP | 101 #endif // SHARE_VM_MEMORY_METASPACE_SHARED_HPP |