RE: [Sablevm-developer] reflection classes for constant pool and bytecode data
Brought to you by:
egagnon
From: Andrew P. <apu...@ac...> - 2000-08-22 03:55:24
|
> From: Etienne M. Gagnon <eg...@j-...> > > John Leuner wrote: > > I want to point you guys to some papers ( I read some of these last > > weekend and they gave me lots of food for thought): > > > > http://www-4.ibm.com/software/developer/library/jalapeno/index.html > > Mainly: just keep your mind open and try to push beyond what > you see other have done! But, I agree: it is important to know > about what others have done;-) I found a related paper ("An Empirical Study of Selective Optimization"; Matthew Arnold, Michael Hind, and Barbara G. Ryder; accessable from the link John provided) very interesting. The result is the conclusion that coarse-grained profiling is not only sufficient for determining which methods to aggresively optimize, but is closer to optimal than all other considered alternatives. This is good... It means that we can select methods that will likely benefit from JIT in a simple, low-overhead manner from within the SableVM interpreter: 1. Interrupt normal processing every 10? 100? ms. a. Determine which method is currently executing. b. If it is native, do nothing further. c. Increment a counter which records how often this method was seen executing during profiling. If this counter exceeds a minimum value, continue; otherwise do nothing further. d. Find (or create) an entry on the JIT's global "to do" list for this method (a simple doubly-linked list). e. Look at the previous list entry. If current->count > prev->count; swap prev <-> current. (Only one swap, though, not bubblesort!) f. Signal JIT if it is suspended. 2. In the JIT thread: a. Remove top entry of "to do" list. If empty, suspend. b. JIT compile. c. goto a Andy |