RFR: 8258061: Improve diagnostic information about errors during class redefinition
Leonid Mesnik
lmesnik at openjdk.java.net
Thu Dec 17 16:12:58 UTC 2020
On Thu, 17 Dec 2020 05:27:28 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> The error code during class redefinition might be not enough to easily diagnose the problem. Some more logging might be useful to understand it. I encountered this problem when redefined methods with lambda usage.
>> I run all existing tests with enabled logging and sanity verified error messages.
>
> src/hotspot/share/prims/jvmtiRedefineClasses.cpp line 1003:
>
>> 1001: ("redefined class %s modifiers change error: modifiers changed from %d to %d.",
>> 1002: the_class->external_name(), old_flags, new_flags);
>> 1003: return JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED;
>
> You've changed the ordering of the checks. I'm not sure why.
I changed the order to report about different names first if any of the variables are added/deleted. And report about different modifiers/offsets only if the names of variables are the same.
The result should be the same because JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED is returned anyway.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1811
More information about the serviceability-dev
mailing list