unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Issues using statprof  (no samples taken)
@ 2008-11-14 17:52 Boris Zbarsky
  2008-11-14 23:31 ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Boris Zbarsky @ 2008-11-14 17:52 UTC (permalink / raw)
  To: guile-user

I'm having a bit of a problem with using statprof.  I checked it out 
from CVS (:pserver:anonymous@cvs.savannah.gnu.org:/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




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-11-21  2:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 17:52 Issues using statprof (no samples taken) Boris Zbarsky
2008-11-14 23:31 ` Ludovic Courtès
2008-11-16 18:58   ` Boris Zbarsky
2008-11-17 15:10     ` Ludovic Courtès
2008-11-17 15:36       ` Boris Zbarsky
2008-11-17 16:02         ` Ludovic Courtès
2008-11-17 21:52           ` Boris Zbarsky
2008-11-18 10:30             ` Ludovic Courtès
2008-11-18 16:15               ` Boris Zbarsky
2008-11-18 22:02                 ` Ludovic Courtès
2008-11-21  2:51                   ` Boris Zbarsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).