Mercurial > hg > truffle
comparison src/share/vm/memory/oopFactory.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 8150fa46d2ed |
children | d8ce2825b193 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
26 #define SHARE_VM_MEMORY_OOPFACTORY_HPP | 26 #define SHARE_VM_MEMORY_OOPFACTORY_HPP |
27 | 27 |
28 #include "classfile/symbolTable.hpp" | 28 #include "classfile/symbolTable.hpp" |
29 #include "classfile/systemDictionary.hpp" | 29 #include "classfile/systemDictionary.hpp" |
30 #include "memory/universe.hpp" | 30 #include "memory/universe.hpp" |
31 #include "oops/klassOop.hpp" | |
32 #include "oops/objArrayKlass.hpp" | 31 #include "oops/objArrayKlass.hpp" |
33 #include "oops/oop.hpp" | 32 #include "oops/oop.hpp" |
34 #include "oops/typeArrayKlass.hpp" | 33 #include "oops/typeArrayKlass.hpp" |
35 #include "utilities/growableArray.hpp" | 34 #include "utilities/growableArray.hpp" |
36 | 35 |
50 static typeArrayOop new_intArray (int length, TRAPS) { return typeArrayKlass::cast(Universe::intArrayKlassObj ())->allocate(length, CHECK_NULL); } | 49 static typeArrayOop new_intArray (int length, TRAPS) { return typeArrayKlass::cast(Universe::intArrayKlassObj ())->allocate(length, CHECK_NULL); } |
51 static typeArrayOop new_longArray (int length, TRAPS) { return typeArrayKlass::cast(Universe::longArrayKlassObj ())->allocate(length, CHECK_NULL); } | 50 static typeArrayOop new_longArray (int length, TRAPS) { return typeArrayKlass::cast(Universe::longArrayKlassObj ())->allocate(length, CHECK_NULL); } |
52 | 51 |
53 // create java.lang.Object[] | 52 // create java.lang.Object[] |
54 static objArrayOop new_objectArray(int length, TRAPS) { | 53 static objArrayOop new_objectArray(int length, TRAPS) { |
54 assert(Universe::objectArrayKlassObj() != NULL, "Too early?"); | |
55 return objArrayKlass:: | 55 return objArrayKlass:: |
56 cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL); | 56 cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL); |
57 } | 57 } |
58 | 58 |
59 static typeArrayOop new_charArray (const char* utf8_str, TRAPS); | 59 static typeArrayOop new_charArray (const char* utf8_str, TRAPS); |
60 static typeArrayOop new_permanent_charArray (int length, TRAPS); | 60 static typeArrayOop new_tenured_charArray(int length, TRAPS); |
61 static typeArrayOop new_permanent_byteArray (int length, TRAPS); // used for class file structures | |
62 static typeArrayOop new_permanent_shortArray(int length, TRAPS); // used for class file structures | |
63 static typeArrayOop new_permanent_intArray (int length, TRAPS); // used for class file structures | |
64 | 61 |
65 static typeArrayOop new_typeArray(BasicType type, int length, TRAPS); | 62 static typeArrayOop new_typeArray(BasicType type, int length, TRAPS); |
66 static typeArrayOop new_typeArray_nozero(BasicType type, int length, TRAPS); | 63 static typeArrayOop new_typeArray_nozero(BasicType type, int length, TRAPS); |
67 | 64 static typeArrayOop new_metaDataArray(int length, TRAPS); |
68 // Constant pools | |
69 static constantPoolOop new_constantPool (int length, | |
70 bool is_conc_safe, | |
71 TRAPS); | |
72 static constantPoolCacheOop new_constantPoolCache(int length, | |
73 TRAPS); | |
74 | |
75 // Instance classes | |
76 static klassOop new_instanceKlass(Symbol* name, | |
77 int vtable_len, int itable_len, | |
78 int static_field_size, | |
79 unsigned int nonstatic_oop_map_count, | |
80 AccessFlags access_flags, | |
81 ReferenceType rt, | |
82 KlassHandle host_klass, TRAPS); | |
83 | |
84 // Methods | |
85 private: | |
86 static constMethodOop new_constMethod(int byte_code_size, | |
87 int compressed_line_number_size, | |
88 int localvariable_table_length, | |
89 int exception_table_length, | |
90 int checked_exceptions_length, | |
91 bool is_conc_safe, | |
92 TRAPS); | |
93 public: | |
94 // Set is_conc_safe for methods which cannot safely be | |
95 // processed by concurrent GC even after the return of | |
96 // the method. | |
97 static methodOop new_method(int byte_code_size, | |
98 AccessFlags access_flags, | |
99 int compressed_line_number_size, | |
100 int localvariable_table_length, | |
101 int exception_table_length, | |
102 int checked_exceptions_length, | |
103 bool is_conc_safe, | |
104 TRAPS); | |
105 | |
106 // Method Data containers | |
107 static methodDataOop new_methodData(methodHandle method, TRAPS); | |
108 | |
109 // System object arrays | |
110 static objArrayOop new_system_objArray(int length, TRAPS); | |
111 | 65 |
112 // Regular object arrays | 66 // Regular object arrays |
113 static objArrayOop new_objArray(klassOop klass, int length, TRAPS); | 67 static objArrayOop new_objArray(Klass* klass, int length, TRAPS); |
114 | |
115 // For compiled ICs | |
116 static compiledICHolderOop new_compiledICHolder(methodHandle method, KlassHandle klass, TRAPS); | |
117 }; | 68 }; |
118 | 69 |
119 #endif // SHARE_VM_MEMORY_OOPFACTORY_HPP | 70 #endif // SHARE_VM_MEMORY_OOPFACTORY_HPP |