best practices for testing JVM changes that may interact with CDS?
Coleen Phillmore
coleen.phillimore at oracle.com
Fri Jul 19 06:46:12 PDT 2013
Hi, I have more comments.
1. For testing, we don't have very good specific tests yet but luckily
JPRT has a tendency to break with a cryptic "JPRT is sick" message if
creating the CDS archive fails. The testing that Harold and Ioi
suggested is what we are using until more specific tests are written,
which Micha has been working on.
2. There is an interaction between CDS and java vtables in that CDS
assumes that the layout of the super vtable doesn't change for
subtypes. If you keep this property, all is well. The layout of the
CDS vtable assumes that the Methods are sorted alphabetically by
Method::_name Symbol pointer address at -Xshare:dump time. If you try
to resort the super class's vtable at -Xshare restore time, you will get
all kinds of problems.
Colen
On 7/18/2013 6:48 PM, John Rose wrote:
> On Jul 18, 2013, at 2:15 PM, Ioi Lam <ioi.lam at oracle.com> wrote:
>
>> John, for vtable, do you mean this code?
>>
>> void InstanceKlass::restore_unshareable_info(TRAPS) {
>> ...
>> for (int index2 = 0; index2 < num_methods; ++index2) {
>> methodHandle m(THREAD, methods->at(index2));
>> m()->link_method(m, CHECK);
>> // restore method's vtable by calling a virtual function
>> m->restore_vtable(); /// <<<<<< here??
>> }
> Perhaps I'm thinking of that bit, which concerns C++ vtables, and doesn't overlap with Klass-to-Method vtables.
>
> Am I just imagining an interaction between CDS and tables containing Method* pointers?
>
> — John
More information about the hotspot-runtime-dev
mailing list