guile-user
[Top][All Lists]
Advanced

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

Re: Issues using statprof (no samples taken)


From: Ludovic Courtès
Subject: Re: Issues using statprof (no samples taken)
Date: Mon, 17 Nov 2008 16:10:12 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hi,

Boris Zbarsky <address@hidden> writes:

> profile-signal-handler is not getting called.  I do see a SIGPROF
> delivered to the gnucash-bin process (using 'handle SIGPROF stop' in
> gdb after attaching to the gnucash-bin process), but only once during
> the entire report generation.  I also see scm_setitimer called in gdb
> at a point in the scheme code that matches the call to
> (statprof-start), and I see it called again at the point that matches
> (statprof-stop).  The single SIGPROF delivered comes soon after that
> first setitimer call.

GDB supposedly shows all SIGPROFs that are raised, so if it shows only
one, then something's wrong.  Can you check the arguments passed to
`setitimer(2)' to make sure it makes sense?  Perhaps you could also try
increasing the sampling frequency, although that's arguably not
required.

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).

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.

Thanks,
Ludo'.





reply via email to

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