changeset 35123 | b0b89d83bcf5 |
parent 35110 | f19bcdf40799 |
child 35135 | dd2ce9021031 |
35121:e8900e5763ff | 35123:b0b89d83bcf5 |
---|---|
2842 declare_constant(InvocationCounter::count_increment) \ |
2842 declare_constant(InvocationCounter::count_increment) \ |
2843 declare_constant(InvocationCounter::count_shift) |
2843 declare_constant(InvocationCounter::count_shift) |
2844 |
2844 |
2845 |
2845 |
2846 //-------------------------------------------------------------------------------- |
2846 //-------------------------------------------------------------------------------- |
2847 // VM_ADDRESSES |
|
2848 // |
|
2849 |
|
2850 #define VM_ADDRESSES(declare_address, declare_preprocessor_address, declare_function) \ |
|
2851 \ |
|
2852 declare_function(SharedRuntime::register_finalizer) \ |
|
2853 declare_function(SharedRuntime::exception_handler_for_return_address) \ |
|
2854 declare_function(SharedRuntime::OSR_migration_end) \ |
|
2855 declare_function(SharedRuntime::dsin) \ |
|
2856 declare_function(SharedRuntime::dcos) \ |
|
2857 declare_function(SharedRuntime::dtan) \ |
|
2858 declare_function(SharedRuntime::dexp) \ |
|
2859 declare_function(SharedRuntime::dlog) \ |
|
2860 declare_function(SharedRuntime::dlog10) \ |
|
2861 declare_function(SharedRuntime::dpow) \ |
|
2862 \ |
|
2863 declare_function(os::dll_load) \ |
|
2864 declare_function(os::dll_lookup) \ |
|
2865 declare_function(os::javaTimeMillis) \ |
|
2866 declare_function(os::javaTimeNanos) \ |
|
2867 \ |
|
2868 declare_function(Deoptimization::fetch_unroll_info) \ |
|
2869 COMPILER2_PRESENT(declare_function(Deoptimization::uncommon_trap)) \ |
|
2870 declare_function(Deoptimization::unpack_frames) |
|
2871 |
|
2872 //-------------------------------------------------------------------------------- |
|
2873 // Macros operating on the above lists |
|
2874 //-------------------------------------------------------------------------------- |
|
2875 |
|
2876 // This utility macro quotes the passed string |
|
2877 #define QUOTE(x) #x |
|
2878 |
|
2879 //-------------------------------------------------------------------------------- |
|
2880 // VMStructEntry macros |
|
2881 // |
|
2882 |
|
2883 // This macro generates a VMStructEntry line for a nonstatic field |
|
2884 #define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2885 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, offset_of(typeName, fieldName), NULL }, |
|
2886 |
|
2887 // This macro generates a VMStructEntry line for a static field |
|
2888 #define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2889 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName }, |
|
2890 |
|
2891 // This macro generates a VMStructEntry line for a static pointer volatile field, |
|
2892 // e.g.: "static ObjectMonitor * volatile gBlockList;" |
|
2893 #define GENERATE_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2894 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, (void *)&typeName::fieldName }, |
|
2895 |
|
2896 // This macro generates a VMStructEntry line for an unchecked |
|
2897 // nonstatic field, in which the size of the type is also specified. |
|
2898 // The type string is given as NULL, indicating an "opaque" type. |
|
2899 #define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \ |
|
2900 { QUOTE(typeName), QUOTE(fieldName), NULL, 0, offset_of(typeName, fieldName), NULL }, |
|
2901 |
|
2902 // This macro generates a VMStructEntry line for an unchecked |
|
2903 // static field, in which the size of the type is also specified. |
|
2904 // The type string is given as NULL, indicating an "opaque" type. |
|
2905 #define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \ |
|
2906 { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName }, |
|
2907 |
|
2908 // This macro generates the sentinel value indicating the end of the list |
|
2909 #define GENERATE_VM_STRUCT_LAST_ENTRY() \ |
|
2910 { NULL, NULL, NULL, 0, 0, NULL } |
|
2911 |
|
2912 // This macro checks the type of a VMStructEntry by comparing pointer types |
|
2913 #define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2914 {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; \ |
|
2915 assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); } |
|
2916 |
|
2917 // This macro checks the type of a volatile VMStructEntry by comparing pointer types |
|
2918 #define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2919 {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; } |
|
2920 |
|
2921 // This macro checks the type of a static VMStructEntry by comparing pointer types |
|
2922 #define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2923 {type* dummy = &typeName::fieldName; } |
|
2924 |
|
2925 // This macro checks the type of a static pointer volatile VMStructEntry by comparing pointer types, |
|
2926 // e.g.: "static ObjectMonitor * volatile gBlockList;" |
|
2927 #define CHECK_STATIC_PTR_VOLATILE_VM_STRUCT_ENTRY(typeName, fieldName, type) \ |
|
2928 {type volatile * dummy = &typeName::fieldName; } |
|
2929 |
|
2930 // This macro ensures the type of a field and its containing type are |
|
2931 // present in the type table. The assertion string is shorter than |
|
2932 // preferable because (incredibly) of a bug in Solstice NFS client |
|
2933 // which seems to prevent very long lines from compiling. This assertion |
|
2934 // means that an entry in VMStructs::localHotSpotVMStructs[] was not |
|
2935 // found in VMStructs::localHotSpotVMTypes[]. |
|
2936 #define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type) \ |
|
2937 { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \ |
|
2938 assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); } |
|
2939 |
|
2940 // This is a no-op macro for unchecked fields |
|
2941 #define CHECK_NO_OP(a, b, c) |
|
2942 |
|
2943 // |
|
2944 // Build-specific macros: |
|
2945 // |
2847 // |
2946 |
2848 |
2947 // Generate and check a nonstatic field in non-product builds |
2849 // Generate and check a nonstatic field in non-product builds |
2948 #ifndef PRODUCT |
2850 #ifndef PRODUCT |
2949 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) |
2851 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) |
2995 #else |
2897 #else |
2996 # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) |
2898 # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) |
2997 #endif /* COMPILER2 */ |
2899 #endif /* COMPILER2 */ |
2998 |
2900 |
2999 //-------------------------------------------------------------------------------- |
2901 //-------------------------------------------------------------------------------- |
3000 // VMTypeEntry macros |
2902 // VMTypeEntry build-specific macros |
3001 // |
|
3002 |
|
3003 #define GENERATE_VM_TYPE_ENTRY(type, superclass) \ |
|
3004 { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) }, |
|
3005 |
|
3006 #define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \ |
|
3007 { QUOTE(type), NULL, 0, 0, 0, sizeof(type) }, |
|
3008 |
|
3009 #define GENERATE_OOP_VM_TYPE_ENTRY(type) \ |
|
3010 { QUOTE(type), NULL, 1, 0, 0, sizeof(type) }, |
|
3011 |
|
3012 #define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \ |
|
3013 { QUOTE(type), NULL, 0, 1, 0, sizeof(type) }, |
|
3014 |
|
3015 #define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \ |
|
3016 { QUOTE(type), NULL, 0, 1, 1, sizeof(type) }, |
|
3017 |
|
3018 #define GENERATE_VM_TYPE_LAST_ENTRY() \ |
|
3019 { NULL, NULL, 0, 0, 0, 0 } |
|
3020 |
|
3021 #define CHECK_VM_TYPE_ENTRY(type, superclass) \ |
|
3022 { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; } |
|
3023 |
|
3024 #define CHECK_VM_TYPE_NO_OP(a) |
|
3025 #define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a) |
|
3026 |
|
3027 // |
|
3028 // Build-specific macros: |
|
3029 // |
2903 // |
3030 |
2904 |
3031 #ifdef COMPILER1 |
2905 #ifdef COMPILER1 |
3032 # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) |
2906 # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) |
3033 # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) |
2907 # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) |
3048 # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) |
2922 # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) |
3049 #endif /* COMPILER2 */ |
2923 #endif /* COMPILER2 */ |
3050 |
2924 |
3051 |
2925 |
3052 //-------------------------------------------------------------------------------- |
2926 //-------------------------------------------------------------------------------- |
3053 // VMIntConstantEntry macros |
2927 // VMIntConstantEntry build-specific macros |
3054 // |
2928 // |
3055 |
|
3056 #define GENERATE_VM_INT_CONSTANT_ENTRY(name) \ |
|
3057 { QUOTE(name), (int32_t) name }, |
|
3058 |
|
3059 #define GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY(name, value) \ |
|
3060 { (name), (int32_t)(value) }, |
|
3061 |
|
3062 #define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \ |
|
3063 { name, (int32_t) value }, |
|
3064 |
|
3065 // This macro generates the sentinel value indicating the end of the list |
|
3066 #define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \ |
|
3067 { NULL, 0 } |
|
3068 |
|
3069 |
2929 |
3070 // Generate an int constant for a C1 build |
2930 // Generate an int constant for a C1 build |
3071 #ifdef COMPILER1 |
2931 #ifdef COMPILER1 |
3072 # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) |
2932 # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) |
3073 #else |
2933 #else |
3081 #else |
2941 #else |
3082 # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) |
2942 # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) |
3083 # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) |
2943 # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) |
3084 #endif /* COMPILER1 */ |
2944 #endif /* COMPILER1 */ |
3085 |
2945 |
2946 |
|
3086 //-------------------------------------------------------------------------------- |
2947 //-------------------------------------------------------------------------------- |
3087 // VMLongConstantEntry macros |
2948 // VMLongConstantEntry build-specific macros |
3088 // |
2949 // |
3089 |
|
3090 #define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \ |
|
3091 { QUOTE(name), name }, |
|
3092 |
|
3093 #define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \ |
|
3094 { name, value }, |
|
3095 |
|
3096 // This macro generates the sentinel value indicating the end of the list |
|
3097 #define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \ |
|
3098 { NULL, 0 } |
|
3099 |
2950 |
3100 // Generate a long constant for a C1 build |
2951 // Generate a long constant for a C1 build |
3101 #ifdef COMPILER1 |
2952 #ifdef COMPILER1 |
3102 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) |
2953 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) |
3103 #else |
2954 #else |
3111 #else |
2962 #else |
3112 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) |
2963 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) |
3113 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) |
2964 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) |
3114 #endif /* COMPILER1 */ |
2965 #endif /* COMPILER1 */ |
3115 |
2966 |
3116 //-------------------------------------------------------------------------------- |
|
3117 // VMAddressEntry macros |
|
3118 // |
|
3119 |
|
3120 #define GENERATE_VM_ADDRESS_ENTRY(name) \ |
|
3121 { QUOTE(name), (void*) (name) }, |
|
3122 |
|
3123 #define GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY(name, value) \ |
|
3124 { name, (void*) (value) }, |
|
3125 |
|
3126 #define GENERATE_VM_FUNCTION_ENTRY(name) \ |
|
3127 { QUOTE(name), CAST_FROM_FN_PTR(void*, &(name)) }, |
|
3128 |
|
3129 // This macro generates the sentinel value indicating the end of the list |
|
3130 #define GENERATE_VM_ADDRESS_LAST_ENTRY() \ |
|
3131 { NULL, NULL } |
|
3132 |
2967 |
3133 // |
2968 // |
3134 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries |
2969 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries |
3135 // |
2970 // |
3136 |
2971 |
3147 GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, |
2982 GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, |
3148 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, |
2983 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, |
3149 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, |
2984 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, |
3150 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) |
2985 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY) |
3151 |
2986 |
3152 #if INCLUDE_JVMCI |
|
3153 VM_STRUCTS_JVMCI(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, |
|
3154 GENERATE_STATIC_VM_STRUCT_ENTRY) |
|
3155 #endif |
|
3156 |
|
3157 #if INCLUDE_ALL_GCS |
2987 #if INCLUDE_ALL_GCS |
3158 VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, |
2988 VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, |
3159 GENERATE_STATIC_VM_STRUCT_ENTRY) |
2989 GENERATE_STATIC_VM_STRUCT_ENTRY) |
3160 |
2990 |
3161 VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, |
2991 VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, |
3213 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, |
3043 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, |
3214 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, |
3044 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, |
3215 GENERATE_C2_VM_TYPE_ENTRY, |
3045 GENERATE_C2_VM_TYPE_ENTRY, |
3216 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) |
3046 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY) |
3217 |
3047 |
3218 #if INCLUDE_JVMCI |
|
3219 VM_TYPES_JVMCI(GENERATE_VM_TYPE_ENTRY, |
|
3220 GENERATE_TOPLEVEL_VM_TYPE_ENTRY) |
|
3221 #endif |
|
3222 |
|
3223 #if INCLUDE_ALL_GCS |
3048 #if INCLUDE_ALL_GCS |
3224 VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY, |
3049 VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY, |
3225 GENERATE_TOPLEVEL_VM_TYPE_ENTRY) |
3050 GENERATE_TOPLEVEL_VM_TYPE_ENTRY) |
3226 |
3051 |
3227 VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY, |
3052 VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY, |
3277 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, |
3102 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, |
3278 GENERATE_C1_VM_INT_CONSTANT_ENTRY, |
3103 GENERATE_C1_VM_INT_CONSTANT_ENTRY, |
3279 GENERATE_C2_VM_INT_CONSTANT_ENTRY, |
3104 GENERATE_C2_VM_INT_CONSTANT_ENTRY, |
3280 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) |
3105 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) |
3281 |
3106 |
3282 #if INCLUDE_JVMCI |
|
3283 VM_INT_CONSTANTS_JVMCI(GENERATE_VM_INT_CONSTANT_ENTRY, |
|
3284 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY) |
|
3285 |
|
3286 #endif |
|
3287 |
|
3288 #if INCLUDE_ALL_GCS |
3107 #if INCLUDE_ALL_GCS |
3289 VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY) |
3108 VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY) |
3290 |
3109 |
3291 VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY) |
3110 VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY) |
3292 |
3111 |
3344 GENERATE_C1_VM_LONG_CONSTANT_ENTRY, |
3163 GENERATE_C1_VM_LONG_CONSTANT_ENTRY, |
3345 GENERATE_C2_VM_LONG_CONSTANT_ENTRY, |
3164 GENERATE_C2_VM_LONG_CONSTANT_ENTRY, |
3346 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) |
3165 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY) |
3347 |
3166 |
3348 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() |
3167 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() |
3349 }; |
|
3350 |
|
3351 VMAddressEntry VMStructs::localHotSpotVMAddresses[] = { |
|
3352 |
|
3353 VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY, |
|
3354 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY, |
|
3355 GENERATE_VM_FUNCTION_ENTRY) |
|
3356 |
|
3357 VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY, |
|
3358 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY, |
|
3359 GENERATE_VM_FUNCTION_ENTRY) |
|
3360 |
|
3361 #if INCLUDE_JVMCI |
|
3362 VM_ADDRESSES_JVMCI(GENERATE_VM_ADDRESS_ENTRY, |
|
3363 GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY, |
|
3364 GENERATE_VM_FUNCTION_ENTRY) |
|
3365 #endif |
|
3366 |
|
3367 GENERATE_VM_ADDRESS_LAST_ENTRY() |
|
3368 }; |
3168 }; |
3369 |
3169 |
3370 // This is used both to check the types of referenced fields and, in |
3170 // This is used both to check the types of referenced fields and, in |
3371 // debug builds, to ensure that all of the field types are present. |
3171 // debug builds, to ensure that all of the field types are present. |
3372 void |
3172 void |
3573 |
3373 |
3574 JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants; |
3374 JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants; |
3575 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryNameOffset = offset_of(VMLongConstantEntry, name); |
3375 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryNameOffset = offset_of(VMLongConstantEntry, name); |
3576 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryValueOffset = offset_of(VMLongConstantEntry, value); |
3376 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryValueOffset = offset_of(VMLongConstantEntry, value); |
3577 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryArrayStride = STRIDE(gHotSpotVMLongConstants); |
3377 JNIEXPORT uint64_t gHotSpotVMLongConstantEntryArrayStride = STRIDE(gHotSpotVMLongConstants); |
3578 |
|
3579 JNIEXPORT VMAddressEntry* gHotSpotVMAddresses = VMStructs::localHotSpotVMAddresses; |
|
3580 JNIEXPORT uint64_t gHotSpotVMAddressEntryNameOffset = offset_of(VMAddressEntry, name); |
|
3581 JNIEXPORT uint64_t gHotSpotVMAddressEntryValueOffset = offset_of(VMAddressEntry, value); |
|
3582 JNIEXPORT uint64_t gHotSpotVMAddressEntryArrayStride = STRIDE(gHotSpotVMAddresses); |
|
3583 } |
3378 } |
3584 |
3379 |
3585 #ifdef ASSERT |
3380 #ifdef ASSERT |
3586 static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) { |
3381 static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) { |
3587 { |
3382 { |
3685 static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY(); |
3480 static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY(); |
3686 assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1], |
3481 assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1], |
3687 &long_last_entry, |
3482 &long_last_entry, |
3688 sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants"); |
3483 sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants"); |
3689 |
3484 |
3690 static VMAddressEntry address_last_entry = GENERATE_VM_ADDRESS_LAST_ENTRY(); |
|
3691 assert(memcmp(&localHotSpotVMAddresses[sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry) - 1], |
|
3692 &address_last_entry, |
|
3693 sizeof(VMAddressEntry)) == 0, "Incorrect last entry in localHotSpotVMAddresses"); |
|
3694 |
|
3695 |
3485 |
3696 // Check for duplicate entries in type array |
3486 // Check for duplicate entries in type array |
3697 for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) { |
3487 for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) { |
3698 for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) { |
3488 for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) { |
3699 if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) { |
3489 if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) { |