In the current system (as of Mustang-B89), if the can_generate_all_class_hook_events
capability is acquired in the OnLoad phase, then sharing is disabled. If sharing is
not enabled then the can_generate_all_class_hook_events capability can be acquired
in any phase. If sharing is enabled, then the can_generate_all_class_hook_events
capability cannot be acquired after the OnLoad phase.
During discussions about 5002268, 6431456 and 4956521, changing the relationship
between can_generate_all_class_hook_events and sharing was also discussed. A couple
of possibilities emerged:
1) If can_generate_all_class_hook_events is acquired in the OnLoad phase,
then don't disable sharing. Instead remap the shared readonly space to
shared readwrite, private (see 5002268) and post CFLH events for all
shared classes.
2) Keep the logic that disables sharing if can_generate_all_class_hook_events
is acquired in the OnLoad phase. Allow can_generate_all_class_hook_events
to be acquired in any phase. If can_generate_all_class_hook_events is
acquired after the OnLoad phase, then CFLH events don't need to be posted
for the shared classes in any case since the classes were "loaded" before
the capability was acquired.
Option 2 is much simpler so that option is looking best at the moment.
capability is acquired in the OnLoad phase, then sharing is disabled. If sharing is
not enabled then the can_generate_all_class_hook_events capability can be acquired
in any phase. If sharing is enabled, then the can_generate_all_class_hook_events
capability cannot be acquired after the OnLoad phase.
During discussions about 5002268, 6431456 and 4956521, changing the relationship
between can_generate_all_class_hook_events and sharing was also discussed. A couple
of possibilities emerged:
1) If can_generate_all_class_hook_events is acquired in the OnLoad phase,
then don't disable sharing. Instead remap the shared readonly space to
shared readwrite, private (see 5002268) and post CFLH events for all
shared classes.
2) Keep the logic that disables sharing if can_generate_all_class_hook_events
is acquired in the OnLoad phase. Allow can_generate_all_class_hook_events
to be acquired in any phase. If can_generate_all_class_hook_events is
acquired after the OnLoad phase, then CFLH events don't need to be posted
for the shared classes in any case since the classes were "loaded" before
the capability was acquired.
Option 2 is much simpler so that option is looking best at the moment.
- relates to
-
JDK-5002268 Allow class sharing use with RedefineClasses
-
- Resolved
-
-
JDK-6431456 Agents should always be able to get can_tag_objects capability in live phase
-
- Resolved
-
-
JDK-4956521 JVMTI should work when class data sharing is enabled
-
- Closed
-