[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: status: separation of expansion/optimization/memoization/execution
From: |
Han-Wen |
Subject: |
Re: status: separation of expansion/optimization/memoization/execution |
Date: |
Sat, 3 Aug 2002 01:47:13 +0200 |
address@hidden 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 | address@hidden | http://www.cs.uu.nl/~hanwen
- status: separation of expansion/optimization/memoization/execution, Dirk Herrmann, 2002/08/02
- Re: status: separation of expansion/optimization/memoization/execution, Rob Browning, 2002/08/02
- Re: status: separation of expansion/optimization/memoization/execution,
Han-Wen <=
- Re: status: separation of expansion/optimization/memoization/execution, Dale P. Smith, 2002/08/02
- status: separation of expansion/optimization/memoization/execution, Han-Wen, 2002/08/03
- Re: status: separation of expansion/optimization/memoization/execution, Dirk Herrmann, 2002/08/03
- Re: status: separation of expansion/optimization/memoization/execution, Han-Wen, 2002/08/03
- Re: status: separation of expansion/optimization/memoization/execution, Tom Lord, 2002/08/03
- Re: status: separation of expansion/optimization/memoization/execution, Tom Lord, 2002/08/03
- for example, Tom Lord, 2002/08/03
- i know -- let's play bridge!, Tom Lord, 2002/08/03
- Re: i know -- let's play bridge!, Tom Lord, 2002/08/03
- Re: i know -- let's play bridge!, Thomas Bushnell, BSG, 2002/08/03