Details
Description
In "Approaches to Reflective Method Invocation" to be presented at ICOOOLPS 2008, we show 4 ways to implement method reflection:
1) out-of-line machine code - what we currently have
2) opt compiler simplification of out-of-line - simplifying a out-of-line call to a regular call when the method argument is constant
3) bytecode generation upon initial reflect method/constructor object creation - create bytecode to perform the reflective method call when a reflective wrapper is created
4) deferred bytecode generation - as with 3, but create bytecode upon 1st reflective method invocation
Of the approaches 3 gives the greatest time saving, as it speeds eclipse up considerably. The best average performance is given by 4.
Schemes 3 and 4 require an extra class to work, putting pressure on the JTOC. However, they are able to speed both baseline and opt compiled code.
We should implement scheme 4 in the current trunk.
Issue Links
- relates to
-
RVM-443
Avoid back references in java.lang.reflect VMXXX classes
-
Activity
| Attachment | RVM-517.patch [ 34833 ] |
| Fix Version/s | 3.0 [ 13530 ] | |
| Fix Version/s | 2.9.4 [ 14162 ] |
| Fix Version/s | 3.1 [ 14379 ] | |
| Fix Version/s | 3.0 [ 13530 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 3.0.1 [ 14378 ] | |
| Fix Version/s | 3.1 [ 14379 ] | |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
I think it might make sense to implement on a branch first then merge in after a chance for comments. I've read the paper, but have some questions about how the mechanism actually works (for example when the arguments to invoke aren't immediately obvious String constants) that I think would be clarified by seeing the code.