From: Zvi E. <ze...@cs...> - 2008-07-14 18:39:48
|
Eliot Moss wrote: > >> Eliot Moss wrote: >>> And why do want the something different in the first place? (You may >>> have >>> very >>> good reasons, but it tends ot be helpful to know them :-) ...) >>> >> As I think about it today, I can't recall all of my reasons for thinking >> it >> might be useful to put different techniques in different classes. What I >> can recall is thinking that if every technique gets put into the same >> file, >> as more techniques are developed and implemented, the file will grow and >> become more and more complex, which will make it much harder to work with >> in >> the future. Also, switching between techniques will require modifying >> the >> TraceGenerator class (since the boolean for MERLIN_ANALYSIS is there), >> whereas splitting different techniques into different classes could allow >> the switching to be done in the plan by simply switching which class is >> used. I'm not sure how good those reasons are for warranting putting >> different techniques in different classes, though. > > Sure -- perhaps there should be an abstract class or an interface > describing > the API to trace generation, and then a concrete class that one uses. This > is > not unlike the setup for choosing which GC to use, so I suggest you get a > handle on how that is done at build time, etc. I strongly agree withb the > principles involved in making different techniques separate, yet putting > their > commonality into a superclass or other shared program structure. > > Best wishes -- Eliot > I've been working on a simple refactoring of the trace generation code (which I think will prove to be temporary, since I'm not sure there isn't a better way to accomplish it. I'm currently working on reimplementing the Merlin algorithm using that framework (since it needed to be fixed anyway, as it is broken in 2.9.3). I have the base alforithm working correctly, but I noticed that org.mmtk.utility.TraceGenerator.java had a function boot(Address bootStart) that seemed to add objects in the bootimage to the trace, if I'm not mistaken. In version 2.9.3, this code does not seem to be called, so I was wondering if it was ever called, or if it was a leftover, and if it used to be called when the trace generation worked, what was the mechanism for calling it? Zvi Effron Harvey Mudd College -- View this message in context: http://www.nabble.com/Is-it-possible-to-create-a-new-TraceGenerator-in-a-different-file-tp17993932p18450297.html Sent from the jikesrvm-researchers mailing list archive at Nabble.com. |