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: Boris Zbarsky
Subject: Re: Issues using statprof (no samples taken)
Date: Mon, 17 Nov 2008 10:36:55 -0500
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

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 via email to

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