Andy Wingo <wi...@pobox.com> writes: > scheme@(guile-user)> ,tr (fibo 5) > #<program 8c74200 at system/vm/trace.scm:30:6 ()> > * #<program 8c74240 at <unknown port>:0:1 ()> > * fibo 5 > ** fibo 4 > *** fibo 3 > **** fibo 2 > **** fibo 1 > *** fibo 2 > ** fibo 3 > *** fibo 2 > *** fibo 1 > #<program 8c741e0 at system/vm/trace.scm:31:6 ()> > vm-trace-off! #<vm 8904680> > > Sweet, no?
Hi Andy, Interesting stuff! But I'm not sure. To me it seems less nice than the version that I recently posted. - Why are those #<program> and vm-trace-off! lines there? - What if the function that you want to trace is not the one that you want to invoke at top level? - What if you want to trace several functions within a given computation? - Alternatively, if ,tr is supposed to mean "trace everything within this computation", why aren't there trace lines for the applications of `or', `=' and so on? > We don't have return values here unfortunately, but that > could be arranged. Yes, I believe they are useful too. > Now this too: > > scheme@(guile-user)> ,pr (fibo 30) What would someone typing that actually be looking for? I would guess: something about the timings of the internal parts of fibo ... > % cumulative self > time seconds seconds name > 100.00 0.29 0.29 fibo > 0.00 0.29 0.00 top-repl > 0.00 0.29 0.00 call-with-backtrace > 0.00 0.29 0.00 #<program 8caeb40 ()> > 0.00 0.29 0.00 #<program 8ca10e0 opts> > 0.00 0.29 0.00 start-repl > 0.00 0.29 0.00 #<program 89f3420 at ice-9/boot-9.scm:3394:10 > ()> > 0.00 0.29 0.00 #<program 8ca13d0 at > system/repl/repl.scm:87:9 ()> > --- > Sample count: 23 > Total time: 0.29 seconds (0 seconds in GC) ... but there is nothing here at a finer-grained level than fibo itself. So I'm afraid I don't see the usefulness, yet. > Unfortunately (make-stack ...) doesn't actually do anything right now, > so we see the whole continuation. Also unfortunately we don't see subrs > on the stack, like dynamic-wind. But hopefully these problems will be > fixed within a couple weeks. Cool. But I think the key thing is generating the internal information that the user would really want. Perhaps that requires a more complex example. Regards, Neil