From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: Issues using statprof (no samples taken)
Date: Tue, 18 Nov 2008 11:30:41 +0100 [thread overview]
Message-ID: <87wsf1iawe.fsf@gnu.org> (raw)
In-Reply-To: 4921E796.6000408@mit.edu
Hi,
Boris Zbarsky <bzbarsky@MIT.EDU> writes:
> Ludovic Courtès wrote:
>> Maybe with `strace(1)' or similar?
>
> Unfortunately, that just shows the pointer to the struct, not the
> value in the struct itself....
Under GNU/Linux it does the right thing. :-)
> 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.
Are you sure that piece of code is ever called? Is it called from an
"idle" handler or some such?
Another idea is that you could try modifying `statprof' so that it uses
(setitimer ITIMER_REAL ...)
and
(sigaction SIGALRM profile-signal-handler)
just to see if it makes a difference...
> 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...
It may be that they use a single pthread (the "main" thread), and that
they handle events and timeouts via a GTK+ even loop. Can you check
with GDB whether `pthread_create(3)' is ever called?
> 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.
That's weird, but I don't have any other idea. Now, I'm thinking about
how 1.8 works, so it might be that there are subtle differences with
1.6.
Thanks,
Ludo'.
next prev parent reply other threads:[~2008-11-18 10:30 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
2008-11-17 16:02 ` Ludovic Courtès
2008-11-17 21:52 ` Boris Zbarsky
2008-11-18 10:30 ` Ludovic Courtès [this message]
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=87wsf1iawe.fsf@gnu.org \
--to=ludo@gnu.org \
--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).