unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Boris Zbarsky <bzbarsky@MIT.EDU>
To: guile-user@gnu.org
Subject: Re: Issues using statprof  (no samples taken)
Date: Mon, 17 Nov 2008 10:36:55 -0500	[thread overview]
Message-ID: <49218F97.2000805@mit.edu> (raw)
In-Reply-To: <87bpwecrsb.fsf@gnu.org>

Ludovic Courtès wrote:
> GDB supposedly shows all SIGPROFs that are raised, so if it shows only
> one, then something's wrong.

Sure.  The wrong thing is that profile-signal-handler is not called, so 
never resets the timer, so no more SIGPROFs.  Unless I'm misreading the 
code.

> Can you check the arguments passed to `setitimer(2)' to make sure it makes sense?

I can't check the values in the structs it's passed, unfortunately (no 
symbols here for guile or the libc).

> Perhaps you could also try
> increasing the sampling frequency, although that's arguably not
> required.

I'm sampling every 500us, so I doubt that's the issue.  The task I'm 
profiling takes 20 seconds.

> Another (remote) possibility could be that the Scheme-level handler is
> not called, even though the C handler in libguile is called, since
> Scheme-level signal handlers are actually asyncs (info "(guile)
> Asyncs").  You can try to force the execution of asyncs by adding a call
> like "(select '() '() '() 0)" (technically, it invokes `SCM_TICK', which
> runs asyncs).

Where would I add that?  For that matter, what's the C handler in 
libguile?  I should be able to breakpoint on that and see whether it's 
called, hopefully...

Note that I'm just using the statprof.scm from guile-lib

> One last thing would be to check whether `HAVE_SIGACTION' is defined in
> Guile's <config.h> on your platform, to see which version of
> `scm_sigaction_for_thread ()' is used.

Yes, HAVE_SIGACTION is defined (to 1).

-Boris




  reply	other threads:[~2008-11-17 15:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=49218F97.2000805@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).