comparison src/share/vm/memory/metaspaceShared.hpp @ 20586:03e6d34be1f5

8038268: VM Crashes in MetaspaceShared::generate_vtable_methods while creating CDS archive with limiting SharedMiscCodeSize Summary: estimate the minimum required size for the misc code region and check if the specified misc code region size meets the minimum size requirement Reviewed-by: jiangli, dholmes
author ccheung
date Thu, 30 Oct 2014 13:38:00 -0700
parents b23a19cd0536
children 4cb90023bf2b
comparison
equal deleted inserted replaced
20585:90297adbda9d 20586:03e6d34be1f5
55 static bool _check_classes_made_progress; 55 static bool _check_classes_made_progress;
56 static bool _has_error_classes; 56 static bool _has_error_classes;
57 static bool _archive_loading_failed; 57 static bool _archive_loading_failed;
58 public: 58 public:
59 enum { 59 enum {
60 vtbl_list_size = 17, // number of entries in the shared space vtable list. 60 vtbl_list_size = 17, // number of entries in the shared space vtable list.
61 num_virtuals = 200 // maximum number of virtual functions 61 num_virtuals = 200, // maximum number of virtual functions
62 // If virtual functions are added to Metadata, 62 // If virtual functions are added to Metadata,
63 // this number needs to be increased. Also, 63 // this number needs to be increased. Also,
64 // SharedMiscCodeSize will need to be increased. 64 // SharedMiscCodeSize will need to be increased.
65 // The following 2 sizes were based on
66 // MetaspaceShared::generate_vtable_methods()
67 vtbl_method_size = 16, // conservative size of the mov1 and jmp instructions
68 // for the x64 platform
69 vtbl_common_code_size = (1*K) // conservative size of the "common_code" for the x64 platform
65 }; 70 };
66 71
67 enum { 72 enum {
68 ro = 0, // read-only shared space in the heap 73 ro = 0, // read-only shared space in the heap
69 rw = 1, // read-write shared space in the heap 74 rw = 1, // read-write shared space in the heap