From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Boris Zbarsky Newsgroups: gmane.lisp.guile.user Subject: Re: Issues using statprof (no samples taken) Date: Mon, 17 Nov 2008 16:52:22 -0500 Message-ID: <4921E796.6000408@mit.edu> References: <491DBAE5.5060100@mit.edu> <87prkx28cp.fsf@gnu.org> <49206D71.9070407@mit.edu> <87bpwecrsb.fsf@gnu.org> <49218F97.2000805@mit.edu> <87abbybatj.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1226958852 12919 80.91.229.12 (17 Nov 2008 21:54:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Nov 2008 21:54:12 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Nov 17 22:55:15 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L2C3t-0001KC-Pf for guile-user@m.gmane.org; Mon, 17 Nov 2008 22:55:14 +0100 Original-Received: from localhost ([127.0.0.1]:58119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2C2k-0004Jd-Tc for guile-user@m.gmane.org; Mon, 17 Nov 2008 16:54:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2C2g-0004JD-L1 for guile-user@gnu.org; Mon, 17 Nov 2008 16:53:58 -0500 Original-Received: from [199.232.76.173] (port=55809 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2C2g-0004Iy-A2 for guile-user@gnu.org; Mon, 17 Nov 2008 16:53:58 -0500 Original-Received: from biscayne-one-station.mit.edu ([18.7.7.80]:64304) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L2C2g-0003WZ-5D for guile-user@gnu.org; Mon, 17 Nov 2008 16:53:58 -0500 Original-Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id mAHLqR3b009039 for ; Mon, 17 Nov 2008 16:52:28 -0500 (EST) Original-Received: from boris-zbarskys-macbook-pro.local (dsl092-065-154.bos1.dsl.speakeasy.net [66.92.65.154]) (authenticated bits=0) (User authenticated as bzbarsky@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id mAHLqNUv027137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 17 Nov 2008 16:52:26 -0500 (EST) User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) In-Reply-To: <87abbybatj.fsf@gnu.org> X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: 0.00 X-MIME-Autoconverted: from 8bit to quoted-printable by biscayne-one-station.mit.edu id mAHLqR3b009039 X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6934 Archived-At: Ludovic Court=E8s wrote: >> I can't check the values in the structs it's passed, unfortunately (no >> symbols here for guile or the libc). >=20 > Maybe with `strace(1)' or similar? Unfortunately, that just shows the pointer to the struct, not the value=20 in the struct itself.... >>> Another (remote) possibility could be that the Scheme-level handler i= s >>> 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 c= all >>> like "(select '() '() '() 0)" (technically, it invokes `SCM_TICK', wh= ich >>> runs asyncs). >> Where would I add that? >=20 > In some Scheme code that is run regularly. I tried adding that call to code that certainly runs repeatedly between=20 statprof-start and statprof-stop (the code that handles updating the=20 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=20 (progress indicator, and so forth), but that could also be accomplished=20 if the guile interpreter makes some sort of periodic callbacks into the=20 embedding. They link to pthread, but don't seem to really use it for=20 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... >=20 > 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=20 still not called, even with the (select '() '() '() 0) calls as above. -Boris