On 25-May-2011, Daniel Kraft wrote:
| Hi John,
|
| On 05/25/11 16:15, John Swensen wrote:
|> Isn't the profiler going to essentially be a modified tree_walker/executer?
|
| first regarding the singleton discussion, I think both making it a
| singleton and not doing so are possible options (for me) -- and it seems
| to me that it shouldn't be too hard to convert if we later want to have
| multiple profilers available sometime.
|
| Regarding your statement above: I don't yet know tree_walkers or
| executors in octave, but as I understand it, the profiler class will
| rather be just the one that keeps track of all the data and relates it
| to the call-tree or at least list of functions; and finally later
| returns the profile-data in some "useful" fashion. The integration with
| tree-execution will be such that the ordinary execution routines check a
| flag and if we're profiling make some calls to the profiler-class to
| tell it when a particular function enters/exits and the like.
I think you would only need to touch the tree_evaluator class (from
pt-eval.cc) if you want to do statement-level profiling. So far, I
think we are only talking about doing per-function profiling, right?