[Top][All Lists]

[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 16:52:22 -0500
User-agent: Thunderbird (Macintosh/20080914)

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

Maybe with `strace(1)' or similar?

Unfortunately, that just shows the pointer to the struct, not the value in the struct itself....

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?

In some Scheme code that is run regularly.

I tried adding that call to code that certainly runs repeatedly between statprof-start and statprof-stop (the code that handles updating the gnucash progress bar, in fact), but that doesn't seem to help.

BTW, is Gnucash multithreaded?

I'm not sure. It does update the UI during execution of guile code (progress indicator, and so forth), but that could also be accomplished if the guile interpreter makes some sort of periodic callbacks into the embedding. They link to pthread, but don't seem to really use it for anything...

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

It's `take_signal ()' (scmsigs.c), at least in 1.8.x.

Yeah, that's called for SIGPROF in this case. But the scheme handler is still not called, even with the (select '() '() '() 0) calls as above.


reply via email to

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