# $Id: //info.ravenbrook.com/project/mps/doc/2006-12-18/job001548-summary/example-abstract-trace.txt#1 $ ---- KEEPING SUMMARIES DURING PARTIAL SCANS -- EXAMPLE TRACE What's this all about? See: Key: N-summ(refs) --- object Nxsumm(refs) --- broken heart Red, Yellow, Pink, Green -- boxes initial -- boxAll summary at start all -- boxAll summary: all refs in box unf -- unfixedSummary: all the unfixed refs we have scanned (makes a useful check that boxAll was right) t1b -- boxTrace1Black summary: all refs that are black for this trace Initially: Green: __PG 4-__PG(3 4) Pink: RYP_ 3-RYP_(1 2 3) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) (So: object 4 refers to object 3 and itself; object 3 refers to objects 1 and 2, and itself; objects 1 and 2 refer to object 4). Condemned set: Red, Yellow, Pink. Foundation is: Green (*and* we will scan all of it, so its t1b is Empty) initial __PG Green: all __PG 4-__PG(3 4) unf ____ t1b ____ initial RYP_ Pink: all RYP_ 3-RYP_(1 2 3) unf ____ t1b ____ initial ___G Yellow: all ___G 2-___G(4) unf ____ t1b ____ initial ___G Red: all ___G 1-___G(4) unf ____ t1b ____ ------- GREEN Scan 4: Find ref to 3 (was Pink): Green: __PG 4-__PG(3 4) find 3 3 unf: __P_ Pink: RYP_ 3-RYP_(1 2 3) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) Preserve 3 (forward from Pink to Green) leaving broken heart 3x: pres 333 3-RYP_(1 2 3x) Green: all: RYPG 4-__PG(3x 4) 3-RYP_(1 2 3x) Pink: RYP_ 3xRYP_(1 2 3x) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) Fix ref 3x to 3 (now Green): fix 3 3 Green: (all) RYPG 4-___G(3 4) 3-RYP_(1 2 3x) t1b: ___G Pink: RYP_ 3xRYP_(1 2 3x) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) Find and fix 4's ref to 4 (was Green, still Green): find & fix 4 unf: __PG (all) RYPG (t1b) ___G ------- Scan 3: Find ref to 1 (Red, nailed), preserve-in-place, and fix ref to 1 (still Red): find 1 1 unf: R_PG fix 1 1 Green: (all) RYPG 4-___G(3 4) 3-RYP_(1 2 3x) t1b: R__G Pink: RYP_ 3xRYP_(1 2 3x) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) Find ref to 2 (was Yellow): Green: RYPG 4-___G(3 4) 3-RYP_(1 2 3x) find 2 2 unf: RYPG Pink: RYP_ 3xRYP_(1 2 3x) Yellow: ___G 2-___G(4) Red: ___G 1-___G(4) Preserve 2 (forward from Yellow to Pink) leaving broken heart 2x: Green: RYPG 4-___G(3 4) 3-RYP_(1 2x 3x) pres 2 2-___G(4) Pink: all: RYPG 3xRYP_(1 2x 3x) 2-___G(4) Yellow: ___G 2x___G(4) Red: ___G 1-___G(4) Fix ref 2x to 2 (now Pink): fix 2 2 Green: (all) RYPG 4-___G(3 4) 3-R_P_(1 2 3x) t1b: R_PG Pink: RYPG 3xRYP_(1 2x 3x) 2-___G(4) Yellow: ___G 2x___G(4) Red: ___G 1-___G(4) Find ref to 3x (was Pink): Green: RYPG 4-___G(3 4) 3-R_P_(1 2 3x) find 3x 3x (unf) RYPG Pink: RYPG 3xRYP_(1 2x 3x) 2-___G(4) Yellow: ___G 2x___G(4) Red: ___G 1-___G(4) 3x is a forwarding pointer: 3 is already preserved. Fix ref 3x to 3 (now Green): fix 3 3 Green: (all) RYPG 4-___G(3 4) 3-R_PG(1 2 3) (t1b) R_PG Pink: RYPG 3xRYP_(1 2x 3x) 2-___G(4) Yellow: ___G 2x___G(4) Red: ___G 1-___G(4) ------- PINK Skip 3x -- broken heart. Scan 2: Find 4 (Green), and trivially fix ref to 4 (still Green): Green: RYPG 4-___G(3 4) 3-R_PG(1 2 3) find 4 4 unf: ___G fix 4 4 Pink: (all) RYPG 3xRYP_(1 2x 3x) 2-___G(4) t1b: ___G Yellow: ___G 2x___G(4) Red: ___G 1-___G(4) ------- YELLOW -- no grey objects, nothing to scan Yellow: ___G 2x___G(4) unf ____ t1b ____ ------- RED Scan 1: Find 4 (Green), and trivially fix ref to 4 (still Green): Green: RYPG 4-___G(3 4) 3-R_PG(1 2 3) Pink: RYPG 3xRYP_(1 2x 3x) 2-___G(4) Yellow: ___G 2x___G(4) find 4 4 unf: ___G fix 4 4 Red: (all) ___G 1-___G(4) t1b: ___G ------- CHECK initial, all, unf, t1b: initial __PG Green: all RYPG 4-___G(3 4) 3-R_PG(1 2 3) unf RYPG t1b R_PG initial RYP_ Pink: all RYPG 3xRYP_(1 2x 3x) 2-___G(4) unf ___G t1b ___G initial ___G Yellow: all ___G 2x___G(4) unf ____ t1b ____ initial ___G Red: all ___G 1-___G(4) unf ___G t1b ___G Notes: unf is a subset of all unf is not related to initial t1b is the new all ------- RECLAIM: Green: t1b R_PG 4-___G(3 4) 3-R_PG(1 2 3) Pink: t1b ___G 2-___G(4) Yellow: t1b ____ Red: t1b ___G 1-___G(4) ----------------------- Change History: 2006-12-15 RHSK Created. Copyright (C) 2006 Ravenbrook Limited. All rights reserved.