8015774: Add support for multiple code heaps

Support for segmentation of the code cache. Separate code heaps are created and used to store code of different types.

Reviewed-by: kvn, iveresov, roland, anoll, egahlin, sla
This commit is contained in:
Tobias Hartmann 2014-09-17 08:00:07 +02:00
parent b2620f89c3
commit cd01de591a
51 changed files with 1756 additions and 680 deletions

View file

@ -82,21 +82,24 @@ StubQueue* AbstractInterpreter::_code = NULL;
#endif /* ASSERT */
#endif /* COMPILER1 */
#define GEN_OFFS(Type,Name) \
#define GEN_OFFS_NAME(Type,Name,OutputType) \
switch(gen_variant) { \
case GEN_OFFSET: \
printf("#define OFFSET_%-33s %d\n", \
#Type #Name, offset_of(Type, Name)); \
#OutputType #Name, offset_of(Type, Name)); \
break; \
case GEN_INDEX: \
printf("#define IDX_OFFSET_%-33s %d\n", \
#Type #Name, index++); \
#OutputType #Name, index++); \
break; \
case GEN_TABLE: \
printf("\tOFFSET_%s,\n", #Type #Name); \
printf("\tOFFSET_%s,\n", #OutputType #Name); \
break; \
}
#define GEN_OFFS(Type,Name) \
GEN_OFFS_NAME(Type,Name,Type)
#define GEN_SIZE(Type) \
switch(gen_variant) { \
case GEN_OFFSET: \
@ -241,6 +244,11 @@ int generateJvmOffsets(GEN_variant gen_variant) {
GEN_OFFS(VirtualSpace, _high);
printf("\n");
/* We need to use different names here because of the template parameter */
GEN_OFFS_NAME(GrowableArray<CodeHeap*>, _data, GrowableArray_CodeHeap);
GEN_OFFS_NAME(GrowableArray<CodeHeap*>, _len, GrowableArray_CodeHeap);
printf("\n");
GEN_OFFS(CodeBlob, _name);
GEN_OFFS(CodeBlob, _header_size);
GEN_OFFS(CodeBlob, _content_offset);