unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Boris Zbarsky <bzbarsky@MIT.EDU>
To: guile-user@gnu.org
Subject: Issues using statprof  (no samples taken)
Date: Fri, 14 Nov 2008 12:52:37 -0500	[thread overview]
Message-ID: <491DBAE5.5060100@mit.edu> (raw)

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




             reply	other threads:[~2008-11-14 17:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-14 17:52 Boris Zbarsky [this message]
2008-11-14 23:31 ` Issues using statprof (no samples taken) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=491DBAE5.5060100@mit.edu \
    --to=bzbarsky@mit.edu \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).