Issue Details (XML | Word | Printable)

Key: RVM-629
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Daniel Frampton
Reporter: Laurence Hellyer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Incorrect usage of @Untraced?

Created: 12/Aug/08 04:48 AM   Updated: 15/Oct/08 08:23 AM
Component/s: Instruction Architecture: Intel, Instruction Architecture: PowerPC, MMTk, Runtime: JNI, Runtime: Threads and Concurrency
Affects Version/s: 3.0.1
Fix Version/s: 3.0.2

Time Tracking:
Not Specified


 Description  « Hide
The annotation @Untraced is used in several places throughout JikesRVM for public fields - this conflicts with the specification of @Untraced that states fields must be declared private. Is this a typo in the definition of @Untraced or some sort of abuse?

Some potentially problematic files include:
MMTk/src/org/mmtk/vm/VM.java
rvm/src/org/jikesrvm/ppc/Registers.java
rvm/src/org/jikesrvm/ia32/Registers.java
rvm/src/org/jikesrvm/scheduler/ProcessorLock.java
rvm/src/org/jikesrvm/scheduler/RVMThread.java
rvm/src/org/jikesrvm/scheduler/Processor.java
rvm/src/org/jikesrvm/jni/JNIEnvironment.java



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Daniel Frampton added a comment - 12/Aug/08 05:38 AM
Apologies, this is something that is in need of some tidying up. The fundamental issue is that Untraced has implications for the code sequence compiled when accessing the field (it does not compile in read/write barriers). For that reason the field must be resolved whenever we compile code that uses it, as annotations are not visible for unresolved classes.

A simple way to deal with this is to ensure that all Untraced fields are private, as such fields are never accessed in an 'unresolved' manner. However, this was not the safety mechanism ulitimately used: the requirement was toned down to failing when an @Untraced field is resolved at runtime. This does catch all the problem cases, but only shows itself as a runtime (rather than compile/bootimage time) error.

I will leave this open to improve the code and/or update the documentation.