Mercurial > hg > graal-jvmci-8
comparison src/share/vm/graal/graalJavaAccess.hpp @ 2926:0e3ec0a4eda4
RiTypeProfile information and invocation counters for RiMethods
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 09 Jun 2011 15:25:27 +0200 |
parents | 75a99b4f1c98 |
children | f00918f35c7f |
comparison
equal
deleted
inserted
replaced
2925:b78b4ae0757c | 2926:0e3ec0a4eda4 |
---|---|
42 * static void set_index(jobject obj, jint x); | 42 * static void set_index(jobject obj, jint x); |
43 * }; | 43 * }; |
44 * | 44 * |
45 */ | 45 */ |
46 | 46 |
47 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, oop_field, static_oop_field) \ | 47 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, float_field, oop_field, static_oop_field) \ |
48 start_class(HotSpotTypeResolved) \ | 48 start_class(HotSpotTypeResolved) \ |
49 oop_field(HotSpotTypeResolved, compiler, "Lcom/oracle/max/graal/runtime/Compiler;") \ | 49 oop_field(HotSpotTypeResolved, compiler, "Lcom/oracle/max/graal/runtime/Compiler;") \ |
50 oop_field(HotSpotTypeResolved, javaMirror, "Ljava/lang/Class;") \ | 50 oop_field(HotSpotTypeResolved, javaMirror, "Ljava/lang/Class;") \ |
51 oop_field(HotSpotTypeResolved, simpleName, "Ljava/lang/String;") \ | 51 oop_field(HotSpotTypeResolved, simpleName, "Ljava/lang/String;") \ |
52 int_field(HotSpotTypeResolved, accessFlags) \ | 52 int_field(HotSpotTypeResolved, accessFlags) \ |
198 int_field(CiRegister, number) \ | 198 int_field(CiRegister, number) \ |
199 end_class \ | 199 end_class \ |
200 start_class(CiStackSlot) \ | 200 start_class(CiStackSlot) \ |
201 int_field(CiStackSlot, index) \ | 201 int_field(CiStackSlot, index) \ |
202 end_class \ | 202 end_class \ |
203 start_class(RiTypeProfile) \ | |
204 int_field(RiTypeProfile, count) \ | |
205 int_field(RiTypeProfile, morphism) \ | |
206 oop_field(RiTypeProfile, probabilities, "[F") \ | |
207 oop_field(RiTypeProfile, types, "[Lcom/sun/cri/ri/RiType;") \ | |
208 end_class \ | |
203 /* end*/ | 209 /* end*/ |
204 | |
205 | |
206 | |
207 | 210 |
208 #define START_CLASS(name) \ | 211 #define START_CLASS(name) \ |
209 class name : AllStatic { \ | 212 class name : AllStatic { \ |
210 private: \ | 213 private: \ |
211 friend class GraalCompiler; \ | 214 friend class GraalCompiler; \ |
227 | 230 |
228 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field) | 231 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field) |
229 #define INT_FIELD(klass, name) FIELD(name, jint, int_field) | 232 #define INT_FIELD(klass, name) FIELD(name, jint, int_field) |
230 #define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field) | 233 #define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field) |
231 #define LONG_FIELD(klass, name) FIELD(name, jlong, long_field) | 234 #define LONG_FIELD(klass, name) FIELD(name, jlong, long_field) |
235 #define FLOAT_FIELD(klass, name) FIELD(name, jfloat, float_field) | |
232 #define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field) | 236 #define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field) |
233 #define STATIC_OOP_FIELD(klassName, name, signature) \ | 237 #define STATIC_OOP_FIELD(klassName, name, signature) \ |
234 static int _##name##_offset; \ | 238 static int _##name##_offset; \ |
235 static oop name() { \ | 239 static oop name() { \ |
236 instanceKlass* ik = instanceKlass::cast(klassName::klass()); \ | 240 instanceKlass* ik = instanceKlass::cast(klassName::klass()); \ |
248 oopDesc::encode_store_heap_oop((narrowOop *)addr, x); \ | 252 oopDesc::encode_store_heap_oop((narrowOop *)addr, x); \ |
249 } else { \ | 253 } else { \ |
250 oopDesc::encode_store_heap_oop((oop*)addr, x); \ | 254 oopDesc::encode_store_heap_oop((oop*)addr, x); \ |
251 } \ | 255 } \ |
252 } | 256 } |
253 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, OOP_FIELD, STATIC_OOP_FIELD) | 257 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, FLOAT_FIELD, OOP_FIELD, STATIC_OOP_FIELD) |
254 #undef START_CLASS | 258 #undef START_CLASS |
255 #undef END_CLASS | 259 #undef END_CLASS |
256 #undef FIELD | 260 #undef FIELD |
257 #undef CHAR_FIELD | 261 #undef CHAR_FIELD |
258 #undef INT_FIELD | 262 #undef INT_FIELD |
259 #undef BOOLEAN_FIELD | 263 #undef BOOLEAN_FIELD |
260 #undef LONG_FIELD | 264 #undef LONG_FIELD |
265 #undef FLOAT_FIELD | |
261 #undef OOP_FIELD | 266 #undef OOP_FIELD |
262 #undef STATIC_OOP_FIELD | 267 #undef STATIC_OOP_FIELD |
263 | 268 |
264 | 269 |