diff options
| author | Richard Kistruck | 2007-08-09 16:41:59 +0100 |
|---|---|---|
| committer | Richard Kistruck | 2007-08-09 16:41:59 +0100 |
| commit | 3cf7d5d66a6bbe418a30bc2dc5ab626e3f61ccad (patch) | |
| tree | b00bba9b2914e187b1ed40b486c8c15c78b875fb /mps/code/trace.c | |
| parent | 2cb3edd1c3e9895a5c8eb61c606df8ba526ed993 (diff) | |
| download | emacs-3cf7d5d66a6bbe418a30bc2dc5ab626e3f61ccad.tar.gz emacs-3cf7d5d66a6bbe418a30bc2dc5ab626e3f61ccad.zip | |
Mps br/diagtag: whether a rule matches tag and para is constant for
the whole of a given diag, so memoize it (instead of repeating the
match for every line of the diag).
locus.c: new diag from ChainCondemnAuto.
trace.c: tidy up TraceStart diag, give traceFindGrey diag a tag.
Copied from Perforce
Change: 163077
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/trace.c')
| -rw-r--r-- | mps/code/trace.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c index d4ad1d25903..7c3c6fe97e1 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c | |||
| @@ -1261,9 +1261,10 @@ static void traceFindGrey_diag(Bool found, Rank rank) | |||
| 1261 | AVER(segcount == 1); /* single failed attempt to find a seg */ | 1261 | AVER(segcount == 1); /* single failed attempt to find a seg */ |
| 1262 | *report_lim++ = this; | 1262 | *report_lim++ = this; |
| 1263 | *report_lim++ = '\0'; | 1263 | *report_lim++ = '\0'; |
| 1264 | DIAG_WRITEF(( DIAG_STREAM, " MPS: traceFindGrey rank sequence: $S\n", | 1264 | DIAG_SINGLEF(( "traceFindGrey", |
| 1265 | (WriteFS)report_array, | 1265 | "rank sequence: $S\n", |
| 1266 | NULL )); | 1266 | (WriteFS)report_array, |
| 1267 | NULL )); | ||
| 1267 | } | 1268 | } |
| 1268 | return; | 1269 | return; |
| 1269 | } | 1270 | } |
| @@ -1807,22 +1808,22 @@ static void TraceStartGenDesc_diag(GenDesc desc, int i) | |||
| 1807 | 1808 | ||
| 1808 | if(i < 0) { | 1809 | if(i < 0) { |
| 1809 | DIAG_WRITEF(( DIAG_STREAM, | 1810 | DIAG_WRITEF(( DIAG_STREAM, |
| 1810 | "MPS: GenDesc [top]", | 1811 | " GenDesc [top]", |
| 1811 | NULL )); | 1812 | NULL )); |
| 1812 | } else { | 1813 | } else { |
| 1813 | DIAG_WRITEF(( DIAG_STREAM, | 1814 | DIAG_WRITEF(( DIAG_STREAM, |
| 1814 | "MPS: GenDesc [$U]", i, | 1815 | " GenDesc [$U]", i, |
| 1815 | NULL )); | 1816 | NULL )); |
| 1816 | } | 1817 | } |
| 1817 | DIAG_WRITEF(( DIAG_STREAM, | 1818 | DIAG_WRITEF(( DIAG_STREAM, |
| 1818 | " $P capacity: $U KiB, mortality $D\n", | 1819 | " $P capacity: $U KiB, mortality $D\n", |
| 1819 | (void *)desc, desc->capacity, desc->mortality, | 1820 | (void *)desc, desc->capacity, desc->mortality, |
| 1820 | "MPS: ZoneSet:$B\n", desc->zones, | 1821 | " ZoneSet:$B\n", desc->zones, |
| 1821 | NULL )); | 1822 | NULL )); |
| 1822 | RING_FOR(n, &desc->locusRing, nn) { | 1823 | RING_FOR(n, &desc->locusRing, nn) { |
| 1823 | PoolGen gen = RING_ELT(PoolGen, genRing, n); | 1824 | PoolGen gen = RING_ELT(PoolGen, genRing, n); |
| 1824 | DIAG_WRITEF(( DIAG_STREAM, | 1825 | DIAG_WRITEF(( DIAG_STREAM, |
| 1825 | "MPS: PoolGen $U ($S)", gen->nr, gen->pool->class->name, | 1826 | " PoolGen $U ($S)", gen->nr, gen->pool->class->name, |
| 1826 | " totalSize $U", gen->totalSize, | 1827 | " totalSize $U", gen->totalSize, |
| 1827 | " newSize $U\n", gen->newSizeAtCreate, | 1828 | " newSize $U\n", gen->newSizeAtCreate, |
| 1828 | NULL )); | 1829 | NULL )); |
| @@ -1911,7 +1912,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime) | |||
| 1911 | DIAG( ArenaDescribe(arena, DIAG_STREAM); ); | 1912 | DIAG( ArenaDescribe(arena, DIAG_STREAM); ); |
| 1912 | 1913 | ||
| 1913 | DIAG_MOREF(( | 1914 | DIAG_MOREF(( |
| 1914 | "MPS: white set:$B\n", | 1915 | " white set:$B\n", |
| 1915 | trace->white, | 1916 | trace->white, |
| 1916 | NULL )); | 1917 | NULL )); |
| 1917 | 1918 | ||
| @@ -1925,7 +1926,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime) | |||
| 1925 | RING_FOR(node, &arena->chainRing, nextNode) { | 1926 | RING_FOR(node, &arena->chainRing, nextNode) { |
| 1926 | Chain chain = RING_ELT(Chain, chainRing, node); | 1927 | Chain chain = RING_ELT(Chain, chainRing, node); |
| 1927 | DIAG_WRITEF(( DIAG_STREAM, | 1928 | DIAG_WRITEF(( DIAG_STREAM, |
| 1928 | "MPS: Chain $P\n", (void *)chain, | 1929 | " Chain $P\n", (void *)chain, |
| 1929 | NULL )); | 1930 | NULL )); |
| 1930 | 1931 | ||
| 1931 | for(i = 0; i < chain->genCount; ++i) { | 1932 | for(i = 0; i < chain->genCount; ++i) { |
| @@ -1936,7 +1937,7 @@ void TraceStart(Trace trace, double mortality, double finishingTime) | |||
| 1936 | 1937 | ||
| 1937 | /* Now do topgen GenDesc (and all PoolGens within it). */ | 1938 | /* Now do topgen GenDesc (and all PoolGens within it). */ |
| 1938 | DIAG_WRITEF(( DIAG_STREAM, | 1939 | DIAG_WRITEF(( DIAG_STREAM, |
| 1939 | "MPS: topGen\n", | 1940 | " topGen\n", |
| 1940 | NULL )); | 1941 | NULL )); |
| 1941 | TraceStartGenDesc_diag(&arena->topGen, -1); | 1942 | TraceStartGenDesc_diag(&arena->topGen, -1); |
| 1942 | } | 1943 | } |