guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issues using statprof (no samples taken)


From: Boris Zbarsky
Subject: Issues using statprof (no samples taken)
Date: Fri, 14 Nov 2008 12:52:37 -0500
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

I'm having a bit of a problem with using statprof. I checked it out from CVS (:pserver:address@hidden:/sources/guile CVSROOT, guile/guile-statprof module). I left it in the checkout tree, and am using GUILE_LOAD_PATH to point to the files.

I am using guile 1.6.8 on Mac OS X, installed via Macports.

A simple test program that looks like this:

 (use-modules (ice-9 statprof))
 (debug-enable 'debug)
 (trap-enable 'traps)
 (statprof-reset 0 500)
 (statprof-start)
 (something-to-profile)
 (statprof-stop)
 (statprof-display)

works just fine when run as:

  env GUILE_LOAD_PATH=/path/to/statprof guile16 -s ~/test.scm

and outputs profiling information.

However, what I really want to profile is a gnucash report. If I add the relevant lines to the gnucash report (use-modules, debug-enable, trap-enable at toplevel, the rest around the part I actually want to profile), and run gnucash with the GUILE_LOAD_PATH set, then statprof-display errors out. It does this because statprof-sample-count is 0 (so it ends up with a divide-by-0 error).

The operation I'm trying to profile in gnucash takes about 40 seconds, so sampling at 0.5ms as above should certainly be producing samples. Statprof is certainly being found, since the statprof-start calls don't error out.

Any ideas as to where I should look for what's going on here and why no samples are being taken? Could it have something to do with the way guile is loaded by the gnucash binary? Or with something the binary itself is doing?

Thank you in advance for any help,
Boris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]