8169389: Use a bitmap to control StackTraceElement::toString format and save footprint
Reviewed-by: dfuchs, mchung
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp Wed Jul 05 22:34:05 2017 +0200
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp Tue Dec 13 12:36:13 2016 -0800
@@ -3643,7 +3643,7 @@
int java_lang_StackTraceElement::moduleVersion_offset;
int java_lang_StackTraceElement::classLoaderName_offset;
int java_lang_StackTraceElement::declaringClass_offset;
-int java_lang_StackTraceElement::classOrLoaderModuleClassName_offset;
+int java_lang_StackTraceElement::declaringClassObject_offset;
int java_lang_StackFrameInfo::_declaringClass_offset;
int java_lang_StackFrameInfo::_memberName_offset;
int java_lang_StackFrameInfo::_bci_offset;
@@ -3693,7 +3693,7 @@
}
void java_lang_StackTraceElement::set_declaringClassObject(oop element, oop value) {
- element->obj_field_put(classOrLoaderModuleClassName_offset, value);
+ element->obj_field_put(declaringClassObject_offset, value);
}
// Support for java_lang_StackFrameInfo
@@ -3811,7 +3811,7 @@
java_lang_System::static_security_offset = java_lang_System::hc_static_security_offset * x;
// java_lang_StackTraceElement
- java_lang_StackTraceElement::classOrLoaderModuleClassName_offset= java_lang_StackTraceElement::hc_classOrLoaderModuleClassName_offset* x + header;
+ java_lang_StackTraceElement::declaringClassObject_offset = java_lang_StackTraceElement::hc_declaringClassObject_offset * x + header;
java_lang_StackTraceElement::classLoaderName_offset = java_lang_StackTraceElement::hc_classLoaderName_offset * x + header;
java_lang_StackTraceElement::moduleName_offset = java_lang_StackTraceElement::hc_moduleName_offset * x + header;
java_lang_StackTraceElement::moduleVersion_offset = java_lang_StackTraceElement::hc_moduleVersion_offset * x + header;
@@ -4014,7 +4014,7 @@
// java.lang.StackTraceElement
- CHECK_OFFSET("java/lang/StackTraceElement", java_lang_StackTraceElement, classOrLoaderModuleClassName, "Ljava/lang/Object;");
+ CHECK_OFFSET("java/lang/StackTraceElement", java_lang_StackTraceElement, declaringClassObject, "Ljava/lang/Class;");
CHECK_OFFSET("java/lang/StackTraceElement", java_lang_StackTraceElement, classLoaderName, "Ljava/lang/String;");
CHECK_OFFSET("java/lang/StackTraceElement", java_lang_StackTraceElement, moduleName, "Ljava/lang/String;");
CHECK_OFFSET("java/lang/StackTraceElement", java_lang_StackTraceElement, moduleVersion, "Ljava/lang/String;");
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp Wed Jul 05 22:34:05 2017 +0200
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp Tue Dec 13 12:36:13 2016 -0800
@@ -1293,7 +1293,7 @@
class java_lang_StackTraceElement: AllStatic {
private:
enum {
- hc_classOrLoaderModuleClassName_offset = 0,
+ hc_declaringClassObject_offset = 0,
hc_classLoaderName_offset = 1,
hc_moduleName_offset = 2,
hc_moduleVersion_offset = 3,
@@ -1303,7 +1303,7 @@
hc_lineNumber_offset = 7
};
- static int classOrLoaderModuleClassName_offset;
+ static int declaringClassObject_offset;
static int classLoaderName_offset;
static int moduleName_offset;
static int moduleVersion_offset;