On 2010-05-13, at 11:08 AM, chevalma@iro.umontreal.ca wrote:
I currently generate a single trace file for the entire execution of the interpreter, so traces can span several webpage loads. I haven't actually been able to find anything in JavaScriptCore itself to tell me when the user goes to a new webpage. Not sure if that matters or not, for the moment, but there is one issue I would like to discuss.
The issue is about how we want to track functions. All functions are objects, and so have a serial number assigned to them, like all other objects. I have been considering logging some information (source line number, source file name, function name, etc) when function objects are created. One issue, however, is that function objects get recreated every page load (everything is reloaded, including the entire JS heap).
I also have very little information to give about host functions aside from their name and perhaps the machine code address. Do you see this as a problem? Should I make more of an effort to keep track of which functions are the same across page loads, or should the trace analysis program take care of this?
If the JS interpreter recreates the function, then it should be treated as a new object. However, that function object will point to the same place in the source (line number, name, etc) so the analysis tool can take care of treating this as the same function (or not depending on the objective of the analysis). In other words, let the analysis tool do the "abstracting" of the trace information.
Marc