From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Han-Wen Newsgroups: gmane.lisp.guile.devel Subject: Re: status: separation of expansion/optimization/memoization/execution Date: Sat, 3 Aug 2002 01:47:13 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <15691.6657.152046.388673@blauw.xs4all.nl> References: <87sn1w6eeu.fsf@raven.i.defaultvalue.org> Reply-To: hanwen@cs.uu.nl NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1028331873 25356 127.0.0.1 (2 Aug 2002 23:44:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 2 Aug 2002 23:44:33 +0000 (UTC) Cc: Dirk Herrmann , guile-devel@gnu.org, guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17am5v-0006ar-00 for ; Sat, 03 Aug 2002 01:44:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17am6T-00038C-00; Fri, 02 Aug 2002 19:45:05 -0400 Original-Received: from smtpzilla5.xs4all.nl ([194.109.127.141]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17am5X-00036o-00; Fri, 02 Aug 2002 19:44:07 -0400 Original-Received: from blauw.xs4all.nl (blauw.xs4all.nl [213.84.26.127]) by smtpzilla5.xs4all.nl (8.12.0/8.12.0) with ESMTP id g72Ni2ta078514; Sat, 3 Aug 2002 01:44:03 +0200 (CEST) Original-To: Rob Browning In-Reply-To: <87sn1w6eeu.fsf@raven.i.defaultvalue.org> X-Mailer: VM 7.05 under Emacs 21.2.1 Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:939 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:939 rlb@defaultvalue.org writes: > > BTW has anyone else played with valgrind > http://developer.kde.org/~sewardj/docs/manual.html? I'm planning to > play with it, but so far have only had a chance to see that it doesn't > like some of our ptr manipulations. I also wonder if cachegrind might > be able to tell us anything useful... Yes, I tried running it on lilypond (which is linked to GUILE). I got a ton of warnings that was not able to suppress (it seems that the suppressions don't work for valgrind internal functions, like strncmp). Running valgrind for checking is probably pointless for GUILE, as GUILE manages its own memory; the stack scanning GC also generates lots of spurious warnings. I did run it through the CPU cache simulator, which indicated that gc_mark, gc_sweep and scm_ceval are causing a lot of cache misses. I hope to improve the GC part when I can compile guile with GCC 3.1 ; GCC 3.1 supports prefetch instructions, so cache misses can be decreased by doing stuff like mark_cons: prefetch (cdr) scm_gc_mark (car) ptr = cdr; goto mark_again; probably there are some techniques to boost cache rates for eval() as well. This is with the java-tree GC benchmark: -------------------------------------------------------------------------------- I1 cache: 16384 B, 32 B, 4-way associative D1 cache: 16384 B, 32 B, 4-way associative L2 cache: 524288 B, 32 B, 4-way associative Command: ./libguile/.libs/lt-guile -s /tmp/graphs.sch Events recorded: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Events shown: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Event sort order: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Thresholds: 99 0 0 0 0 0 0 0 0 Include dirs: User annotated: Auto-annotation: off -------------------------------------------------------------------------------- Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw -------------------------------------------------------------------------------- 566,304,440 177,926 22,634 214,093,739 5,330,222 439,850 60,193,298 122,340 31,098 PROGRAM TOTALS -------------------------------------------------------------------------------- Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw file:function -------------------------------------------------------------------------------- 188,450,666 28,572 4,577 69,348,246 1,248,161 6,579 18,620,442 22,047 84 eval.c:scm_ceval 94,460,034 1,574 368 31,701,931 1,627,987 249,416 7,924,122 14,992 1,579 gc-mark.c:scm_gc_mark_dependencies 90,846,605 7,899 114 38,685,160 620,624 134,205 5,581,738 746 8 gc-card.c:scm_sweep_card 36,806,561 479 76 12,092,342 63,732 79 1,526,389 0 0 eval.c:scm_ilookup 36,027,996 92 11 11,734,622 487,301 2,201 5,880,036 14,057 1,682 gc-mark.c:scm_gc_mark 12,369,948 642 642 5,936,102 422,488 9,297 1,083,306 0 0 weaks.c:scm_mark_weak_vector_spines 11,620,162 652 652 4,374,134 353,606 1,097 1,193,150 47 0 weaks.c:scm_scan_weak_vectors 11,124,410 873 37 5,781,750 106,113 38 2,669,915 7 0 ../libguile/inline.h:scm_acons 7,826,240 6,519 337 2,201,130 67,895 173 733,710 0 0 vectors.c:scm_vector_ref 7,241,746 448 5 3,897,614 67,863 27 1,671,236 20 0 ../libguile/inline.h:scm_cons 7,217,944 902 232 1,740,251 4,410 4 1,332,234 3,415 10 eval.c:scm_eval_args 6,957,761 16,749 1,561 6,956,140 54,050 2,073 702 6 6 ???:??? -- Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel