comparison src/share/vm/utilities/globalDefinitions.cpp @ 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 f95d63e2154a
children 8a02ca5e5576
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
110 case T_FLOAT: 110 case T_FLOAT:
111 case T_DOUBLE: 111 case T_DOUBLE:
112 case T_LONG: 112 case T_LONG:
113 case T_OBJECT: 113 case T_OBJECT:
114 case T_ADDRESS: // random raw pointer 114 case T_ADDRESS: // random raw pointer
115 case T_METADATA: // metadata pointer
115 case T_NARROWOOP: // compressed pointer 116 case T_NARROWOOP: // compressed pointer
116 case T_CONFLICT: // might as well support a bottom type 117 case T_CONFLICT: // might as well support a bottom type
117 case T_VOID: // padding or other unaddressed word 118 case T_VOID: // padding or other unaddressed word
118 // layout type must map to itself 119 // layout type must map to itself
119 assert(vt == ft, ""); 120 assert(vt == ft, "");
176 _type2aelembytes[T_ARRAY] = heapOopSize; 177 _type2aelembytes[T_ARRAY] = heapOopSize;
177 } 178 }
178 179
179 180
180 // Map BasicType to signature character 181 // Map BasicType to signature character
181 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0}; 182 char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0};
182 183
183 // Map BasicType to Java type name 184 // Map BasicType to Java type name
184 const char* type2name_tab[T_CONFLICT+1] = { 185 const char* type2name_tab[T_CONFLICT+1] = {
185 NULL, NULL, NULL, NULL, 186 NULL, NULL, NULL, NULL,
186 "boolean", 187 "boolean",
194 "object", 195 "object",
195 "array", 196 "array",
196 "void", 197 "void",
197 "*address*", 198 "*address*",
198 "*narrowoop*", 199 "*narrowoop*",
200 "*metadata*",
199 "*conflict*" 201 "*conflict*"
200 }; 202 };
201 203
202 204
203 BasicType name2type(const char* name) { 205 BasicType name2type(const char* name) {
229 T_OBJECT, // T_OBJECT = 12, 231 T_OBJECT, // T_OBJECT = 12,
230 T_OBJECT, // T_ARRAY = 13, 232 T_OBJECT, // T_ARRAY = 13,
231 T_VOID, // T_VOID = 14, 233 T_VOID, // T_VOID = 14,
232 T_ADDRESS, // T_ADDRESS = 15, 234 T_ADDRESS, // T_ADDRESS = 15,
233 T_NARROWOOP, // T_NARROWOOP= 16, 235 T_NARROWOOP, // T_NARROWOOP= 16,
234 T_CONFLICT // T_CONFLICT = 17, 236 T_METADATA, // T_METADATA = 17,
237 T_CONFLICT // T_CONFLICT = 18,
235 }; 238 };
236 239
237 240
238 BasicType type2wfield[T_CONFLICT+1] = { 241 BasicType type2wfield[T_CONFLICT+1] = {
239 (BasicType)0, // 0, 242 (BasicType)0, // 0,
251 T_OBJECT, // T_OBJECT = 12, 254 T_OBJECT, // T_OBJECT = 12,
252 T_OBJECT, // T_ARRAY = 13, 255 T_OBJECT, // T_ARRAY = 13,
253 T_VOID, // T_VOID = 14, 256 T_VOID, // T_VOID = 14,
254 T_ADDRESS, // T_ADDRESS = 15, 257 T_ADDRESS, // T_ADDRESS = 15,
255 T_NARROWOOP, // T_NARROWOOP = 16, 258 T_NARROWOOP, // T_NARROWOOP = 16,
256 T_CONFLICT // T_CONFLICT = 17, 259 T_METADATA, // T_METADATA = 17,
260 T_CONFLICT // T_CONFLICT = 18,
257 }; 261 };
258 262
259 263
260 int _type2aelembytes[T_CONFLICT+1] = { 264 int _type2aelembytes[T_CONFLICT+1] = {
261 0, // 0 265 0, // 0
273 T_OBJECT_aelem_bytes, // T_OBJECT = 12, 277 T_OBJECT_aelem_bytes, // T_OBJECT = 12,
274 T_ARRAY_aelem_bytes, // T_ARRAY = 13, 278 T_ARRAY_aelem_bytes, // T_ARRAY = 13,
275 0, // T_VOID = 14, 279 0, // T_VOID = 14,
276 T_OBJECT_aelem_bytes, // T_ADDRESS = 15, 280 T_OBJECT_aelem_bytes, // T_ADDRESS = 15,
277 T_NARROWOOP_aelem_bytes,// T_NARROWOOP= 16, 281 T_NARROWOOP_aelem_bytes,// T_NARROWOOP= 16,
278 0 // T_CONFLICT = 17, 282 T_OBJECT_aelem_bytes, // T_METADATA = 17,
283 0 // T_CONFLICT = 18,
279 }; 284 };
280 285
281 #ifdef ASSERT 286 #ifdef ASSERT
282 int type2aelembytes(BasicType t, bool allow_address) { 287 int type2aelembytes(BasicType t, bool allow_address) {
283 assert(allow_address || t != T_ADDRESS, " "); 288 assert(allow_address || t != T_ADDRESS, " ");