JDK-4300409 : SetFieldAccessWatch not implemented
  • Type: Bug
  • Component: vm-legacy
  • Sub-Component: jvmdi
  • Affected Version: 1.3.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1999-12-17
  • Updated: 2017-12-13
  • Resolved: 2002-09-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.3.0 sol-rc1Fixed
Related Reports
Relates :  
Relates :  
Description

Name: dkC59003			Date: 12/17/99



The HotSpot VM 1.3fcs-R JVMDI function SetFieldAccessWatch returns
JVMDI_ERROR_NOT_IMPLEMENTED.
Classic works fine.

To reproduce the bug run 
doit.sh <jdk root directory>
in
GammaBase/Bugs/<this bug number>

The test outputs:

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-Q)
Java HotSpot(TM) Client VM (build 1.3-R, interpreted mode)

Failed to set fld access watch. err = 99

======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kest-sol-rc1 FIXED IN: kest-sol-rc1 INTEGRATED IN: kest-sol-rc1
14-06-2004

EVALUATION daniel.daugherty@Eng 2000-06-02 Phase 1 is to add a means of marking a field for either access or modification watch. The fieldDescriptor class has an AccessFlags field and the AccessFlags class has some available bits. I have taken two of the VM specific bits for two new flags: JVM_ACC_FIELD_ACC_WATCHED = 0x00010000, // field access is watched by JVM/DI JVM_ACC_FIELD_MOD_WATCHED = 0x00020000 // field modification is watched by JVM/DI I have also added the appropriate accessor methods. The AccessFlags class gets: bool is_field_acc_watched() bool is_field_mod_watched() void set_is_field_acc_watched(const bool value) void set_is_field_mod_watched(const bool value) The fieldDescriptor class gets: bool is_field_acc_watched() bool is_field_mod_watched() void set_is_field_acc_watched(const bool value) void set_is_field_mod_watched(const bool value) With this infrastructure in place, the guts of ClearFieldAccessWatch() ClearFieldModificationWatch() SetFieldAccessWatch() SetFieldModificationWatch() can be filled out. The GetFieldName() function provides all of the appropriate parameter checking boilerplate code. Add in the calls to set_is_field_acc_watched() and set_is_field_mod_watched() as appropriate and phase 1 is finished. Phase 2 is to find an appropriate spot in the interpreter to intercept the getfield and putfield bytecodes. InterpreterRuntime:resolve_get_put() looks like a good candidate. A key issue here is to disable any bytecode rewrites so that subsequent field accesses and modifications can still be intercepted. Phase 3 is to add the event generation code. daniel.daugherty@Eng 2000-06-27 It turned out that phase 2 and phase 3 needed to be organized differently. Phase 2a - find a hook location for getfield and its fast relatives Phase 2b - add event generation support for dynamic field accesses Phase 2c - find a hook location for getstatic and its fast relatives Phase 2d - update event generation support for static field accesses I expect phase 3 to be similar to phase 2: Phase 3a - find a hook location for putfield and its fast relatives Phase 3b - add event generation support for dynamic field modifications Phase 3c - find a hook location for putstatic and its fast relatives Phase 3d - update event generation support for static field modifications daniel.daugherty@Eng 2000-07-05 The fix does not completely address the fast_getfield and fast_putfield bytecodes. These are non-type specific bytecodes and I wasn't able to generate a test case that morphed from getfield into fast_getfield nor putfield into fast_putfield. Without a test case, I don't want to say that the code works.
11-06-2004

SUGGESTED FIX daniel.daugherty@Eng 2000-07-06 See attached webrev.tar file for the changes.
06-07-2000