From d4198686d4f7696a4ea494b8a11daf5c42ba2425 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Thu, 29 Jun 2006 19:04:25 +0100 Subject: [PATCH 01/46] Mps hw-gc example: w3.bat to build it on windows Copied from Perforce Change: 159479 ServerID: perforce.ravenbrook.com --- mps/example/hw-gc/w3.bat | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mps/example/hw-gc/w3.bat diff --git a/mps/example/hw-gc/w3.bat b/mps/example/hw-gc/w3.bat new file mode 100644 index 00000000000..3734c1b10a2 --- /dev/null +++ b/mps/example/hw-gc/w3.bat @@ -0,0 +1,12 @@ +REM Batch file to build and run example code +REM $Id$ +REM /NODEFAULTLIB:library + +cl /I..\..\code hwgc01.c /Fohwgc01 ..\..\code\w3i3mv\ci\mps.lib ..\..\code\w3i3mv\ci\mpsplan.lib + +hwgc01.exe + + +cl /I..\..\code hwgc02.c /Fohwgc02 ..\..\code\w3i3mv\ci\mps.lib ..\..\code\w3i3mv\ci\mpsplan.lib ..\..\code\w3i3mv\ci\fmtno.obj + +hwgc02.exe From d68d3e82d17487ed87262bcbb75c71106f894377 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Mon, 3 Jul 2006 17:51:31 +0100 Subject: [PATCH 02/46] Mps wiki: glossary: ring Copied from Perforce Change: 159509 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/glossary.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mps/manual/wiki/glossary.html b/mps/manual/wiki/glossary.html index f5446c4e761..ca9ac0e3c06 100644 --- a/mps/manual/wiki/glossary.html +++ b/mps/manual/wiki/glossary.html @@ -95,7 +95,19 @@
Attr (internal)
A bitset of pool or pool class attributes. - See design/type/#attr
+ See + design/type/#attr. + + +
Ring (internal)
+
A Parent node, linked to zero or more Child nodes. + Used throughout MPS internals. See + design/ring. + The RING_FOR macro visits all Child nodes. + Note: when a node (RingStruct) appears in a larger structure, + there is (alas) no indication whether it is the parent node, + or a child node. +

B. Document History

@@ -103,6 +115,7 @@
   2006-06-06  RHSK  Created.
   2006-06-21  RHSK  Scope of terms; client/mutator, ap/buffer.
+  2006-07-03  RHSK  Ring.
 
From 4f4e0fec7ad995209cba04d6d3f670919284ec79 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 25 Jul 2006 17:32:10 +0100 Subject: [PATCH 03/46] Mps wiki: interrupt.html: notes on interrupts, faults, exceptions, etc. Copied from Perforce Change: 159794 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/interrupt.html | 96 ++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 mps/manual/wiki/interrupt.html diff --git a/mps/manual/wiki/interrupt.html b/mps/manual/wiki/interrupt.html new file mode 100644 index 00000000000..65b51d98bc2 --- /dev/null +++ b/mps/manual/wiki/interrupt.html @@ -0,0 +1,96 @@ + + + + + + MPS Wiki: ARTICLE-TITLE + + + + + + + +

This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

+ +
+replace ARTICLE-TITLE throughout
+correct Document Author (above) and Document History (below)
+add YOUR ARTICLE HERE.
+
+ +

B. Document History

+ +
+  2006-06-02  RHSK  Created.
+
+ + +

C. Copyright and License

+ +

This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

+ +

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

+ +
    + +
  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. + +
  3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  4. + +
  5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
  6. + +
+ +

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

+ + +
+ + + + + + From d36d075b7b11b018157f037f980debd46cce3628 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 25 Jul 2006 19:15:05 +0100 Subject: [PATCH 04/46] Mps wiki: interrupt.html: stack faults Copied from Perforce Change: 159795 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/index.html | 3 ++ mps/manual/wiki/interrupt.html | 72 +++++++++++++++++++++++++++++----- 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/mps/manual/wiki/index.html b/mps/manual/wiki/index.html index 1e5f3de63f1..7d0341c45c0 100644 --- a/mps/manual/wiki/index.html +++ b/mps/manual/wiki/index.html @@ -65,6 +65,8 @@
  • Allocation Point User's Guide
  • +
  • Interrupts, etc
  • + @@ -147,6 +149,7 @@ 2006-06-23 RHSK Section: About the MPS Wiki 2006-06-23 RHSK Article: Allocation Point Internals 2006-06-28 RHSK Pool_classes article is now slightly useful + 2006-07-25 RHSK Interrupts

    C. Copyright and License

    diff --git a/mps/manual/wiki/interrupt.html b/mps/manual/wiki/interrupt.html index 65b51d98bc2..3d67ba53fe6 100644 --- a/mps/manual/wiki/interrupt.html +++ b/mps/manual/wiki/interrupt.html @@ -3,7 +3,7 @@ - MPS Wiki: ARTICLE-TITLE + MPS Wiki: Interrupts, etc + + + + + + +

    This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

    + +
    +replace ARTICLE-TITLE throughout
    +correct Document Author (above) and Document History (below)
    +add YOUR ARTICLE HERE.
    +
    + +

    B. Document History

    + +
    +  2006-06-02  RHSK  Created.
    +
    + + +

    C. Copyright and License

    + +

    This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

    + +

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    + +
      + +
    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    2. + +
    3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    4. + +
    5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
    6. + +
    + +

    This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

    + + +
    + + + + + + From caef44c3fe8488bb8b47fa600ee86be80eeb2c6d Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Mon, 27 Nov 2006 18:08:09 +0000 Subject: [PATCH 12/46] Mps wiki: index: c-stack Copied from Perforce Change: 161013 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mps/manual/wiki/index.html b/mps/manual/wiki/index.html index aede180218c..629cd58dbfe 100644 --- a/mps/manual/wiki/index.html +++ b/mps/manual/wiki/index.html @@ -65,7 +65,7 @@
  • Allocation Point User's Guide
  • -
  • Interrupts, etc
  • +
  • The C-Stack, both generally and as used by the MPS
  • @@ -150,6 +150,7 @@ 2006-06-23 RHSK Article: Allocation Point Internals 2006-06-28 RHSK Pool_classes article is now slightly useful 2006-07-25 RHSK Interrupts + 2006-07-25 RHSK rename Interrupts as C-Stack

    C. Copyright and License

    From e89471268c79ea88f1f51f04d371b6a595cbc2d8 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Mon, 27 Nov 2006 18:22:27 +0000 Subject: [PATCH 13/46] Mps wiki: timeline Copied from Perforce Change: 161014 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/index.html | 3 +++ mps/manual/wiki/timeline.html | 41 +++++++++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/mps/manual/wiki/index.html b/mps/manual/wiki/index.html index 629cd58dbfe..9ec35b67e3d 100644 --- a/mps/manual/wiki/index.html +++ b/mps/manual/wiki/index.html @@ -79,6 +79,8 @@

    Internal or arcane:

      +
    • rough timeline of MPS development
    • +
    • discussion of Allocation Point internals
    • issues with unmanaged workspace
    • @@ -151,6 +153,7 @@ 2006-06-28 RHSK Pool_classes article is now slightly useful 2006-07-25 RHSK Interrupts 2006-07-25 RHSK rename Interrupts as C-Stack + 2006-11-27 RHSK Article: Timeline

      C. Copyright and License

      diff --git a/mps/manual/wiki/timeline.html b/mps/manual/wiki/timeline.html index 65b51d98bc2..433aea62a76 100644 --- a/mps/manual/wiki/timeline.html +++ b/mps/manual/wiki/timeline.html @@ -3,7 +3,7 @@ - MPS Wiki: ARTICLE-TITLE + MPS Wiki: Timeline + + + + + + +

      This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

      + +
      +replace ARTICLE-TITLE throughout
      +correct Document Author (above) and Document History (below)
      +add YOUR ARTICLE HERE.
      +
      + +

      B. Document History

      + +
      +  2006-06-02  RHSK  Created.
      +
      + + +

      C. Copyright and License

      + +

      This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

      + +

      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

      + +
        + +
      1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      2. + +
      3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
      4. + +
      5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
      6. + +
      + +

      This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

      + + +
      + + + + + + From 0f318a70e9e301c2da292816e7ad4aceb903d2da Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 28 Nov 2006 18:18:03 +0000 Subject: [PATCH 15/46] Mps wiki: refman addenda: mps_arena_step, _start_collect, and chain for amc and ams Copied from Perforce Change: 161021 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/index.html | 3 ++ mps/manual/wiki/refman_add.html | 51 +++++++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/mps/manual/wiki/index.html b/mps/manual/wiki/index.html index 9ec35b67e3d..db988603541 100644 --- a/mps/manual/wiki/index.html +++ b/mps/manual/wiki/index.html @@ -58,6 +58,8 @@
    • glossary of MPS terminology
    • +
    • Reference Manual Addenda (corrections and additions)
    • +
    • modes of use of MPS
    • Garbage Collection @@ -154,6 +156,7 @@ 2006-07-25 RHSK Interrupts 2006-07-25 RHSK rename Interrupts as C-Stack 2006-11-27 RHSK Article: Timeline + 2006-11-28 RHSK Article: RefMan Addenda

      C. Copyright and License

      diff --git a/mps/manual/wiki/refman_add.html b/mps/manual/wiki/refman_add.html index 65b51d98bc2..42d31f0ce90 100644 --- a/mps/manual/wiki/refman_add.html +++ b/mps/manual/wiki/refman_add.html @@ -3,7 +3,7 @@ - MPS Wiki: ARTICLE-TITLE + MPS Wiki: Reference Manual Addenda + + + + + + +

      This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

      + +
      +replace ARTICLE-TITLE throughout
      +correct Document Author (above) and Document History (below)
      +add YOUR ARTICLE HERE.
      +
      + +

      B. Document History

      + +
      +  2006-06-02  RHSK  Created.
      +
      + + +

      C. Copyright and License

      + +

      This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

      + +

      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

      + +
        + +
      1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      2. + +
      3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
      4. + +
      5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
      6. + +
      + +

      This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

      + + +
      + + + + + + From e8fffa5e3a37d6446e50945b0952a46c91e74b23 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Thu, 30 Nov 2006 18:25:15 +0000 Subject: [PATCH 18/46] Mps wiki: gc story Copied from Perforce Change: 161042 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/gc_story.html | 49 ++++++++++++++++++++++++++++------- mps/manual/wiki/index.html | 3 +++ 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/mps/manual/wiki/gc_story.html b/mps/manual/wiki/gc_story.html index 65b51d98bc2..29ab83c59d9 100644 --- a/mps/manual/wiki/gc_story.html +++ b/mps/manual/wiki/gc_story.html @@ -3,7 +3,7 @@ - MPS Wiki: ARTICLE-TITLE + MPS Wiki: Story of a Garbage Collection + + + + + + +

      This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

      + +
      +replace ARTICLE-TITLE throughout
      +correct Document Author (above) and Document History (below)
      +add YOUR ARTICLE HERE.
      +
      + +

      B. Document History

      + +
      +  2006-06-02  RHSK  Created.
      +
      + + +

      C. Copyright and License

      + +

      This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

      + +

      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

      + +
        + +
      1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      2. + +
      3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
      4. + +
      5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
      6. + +
      + +

      This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

      + + +
      + + + + + + From 9eea177abe6ec18fa345a1f815272b81b30145ef Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Fri, 12 Jan 2007 12:37:18 +0000 Subject: [PATCH 40/46] Mps wiki template: date to 2007 Copied from Perforce Change: 161466 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/template.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mps/manual/wiki/template.html b/mps/manual/wiki/template.html index 65b51d98bc2..2ced87dd6f6 100644 --- a/mps/manual/wiki/template.html +++ b/mps/manual/wiki/template.html @@ -35,7 +35,7 @@
      Richard Kistruck, Ravenbrook Limited, -2006-06-02 +2007-01-01
      @@ -51,13 +51,13 @@ add YOUR ARTICLE HERE.

      B. Document History

      -  2006-06-02  RHSK  Created.
      +  2007-01-01  RHSK  Created.
       

      C. Copyright and License

      -

      This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

      +

      This document is copyright © 2007 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

      Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

      From 12f05230565e87c46a5d49a9352b131b9cd1f318 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Fri, 12 Jan 2007 15:35:27 +0000 Subject: [PATCH 41/46] Mps wiki: new article trace Copied from Perforce Change: 161468 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/index.html | 6 ++-- mps/manual/wiki/trace.html | 74 +++++++++++++++++++++++++++++++++----- 2 files changed, 69 insertions(+), 11 deletions(-) diff --git a/mps/manual/wiki/index.html b/mps/manual/wiki/index.html index 0c5d12ff959..f2a1e24057e 100644 --- a/mps/manual/wiki/index.html +++ b/mps/manual/wiki/index.html @@ -88,7 +88,7 @@
    • issues with unmanaged workspace
    • -
    • (incomplete) sketch of how a trace is created
    • +
    • how a trace (collection, etc) works
    @@ -161,12 +161,12 @@ 2006-11-27 RHSK Article: Timeline 2006-11-28 RHSK Article: RefMan Addenda 2006-11-30 RHSK Article: Story of a GC - 2007-01-10 RHSK Sketch: trace.png + 2007-01-12 RHSK Article: Trace

    C. Copyright and License

    -

    This document is copyright © 2006 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

    +

    This document is copyright © 2006-2007 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    diff --git a/mps/manual/wiki/trace.html b/mps/manual/wiki/trace.html index 65b51d98bc2..dfa285830bc 100644 --- a/mps/manual/wiki/trace.html +++ b/mps/manual/wiki/trace.html @@ -3,7 +3,7 @@ - MPS Wiki: ARTICLE-TITLE + MPS Wiki: Trace + + + + + + +

    This wiki article contains incomplete and informal notes about the MPS, the precursor to more formal documentation. Not confidential. Readership: MPS users and developers.

    + +
    +replace ARTICLE-TITLE throughout
    +correct Document Author (above) and Document History (below)
    +add YOUR ARTICLE HERE.
    +
    + +

    B. Document History

    + +
    +  2007-01-01  RHSK  Created.
    +
    + + +

    C. Copyright and License

    + +

    This document is copyright © 2007 Ravenbrook Limited. All rights reserved. This is an open source license. Contact Ravenbrook for commercial licensing options.

    + +

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    + +
      + +
    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    2. + +
    3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    4. + +
    5. Redistributions in any form must be accompanied by information on how to obtain complete source code for the this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs.
    6. + +
    + +

    This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement, are disclaimed. In no event shall the copyright holders and contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

    + + +
    + + + + + + From 58e1d0e56b001f56a2bc1a9e54c5118b8a3f07ba Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 16 Jan 2007 11:54:07 +0000 Subject: [PATCH 44/46] Mps wiki trace: .scan.loop, .scan.total. Copied from Perforce Change: 161480 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/trace.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/mps/manual/wiki/trace.html b/mps/manual/wiki/trace.html index dfa285830bc..57a9516df7b 100644 --- a/mps/manual/wiki/trace.html +++ b/mps/manual/wiki/trace.html @@ -55,15 +55,32 @@

    MPS Trace setup.  Original drawing: trace.graffle, derived from //info.ravenbrook.com/project/mps/master/code/trace.c#18, 2007-01-08

    -

    Advancing a trace

    +

    Scan: advance a trace

    -

    The unit of trace scanning is the Seg. Trace scanning aims to make a seg non-grey.

    +

    The unit of trace scanning is the segment. Trace calls PoolScan(&wasTotal, &ss, SegPool(seg), seg). PoolScan must make the seg non-grey, or return a failure code.

    -

    Looping to make it non-grey

    +

    .scan.loop:

    -

    Note that refs can point backwards into the same seg, so a single linear scan of seg may not make seg non-grey. In this case, is ScanSeg defined to loop until non-grey? Or not? Where is the loop? In fact, for AMC, we can't be scanning at Ambig, so any object newly found, preserved, and greyed (during the scan) will be preserved-by-copy, into another segment (or at least -- given that buffers are currently attached at seg end only -- into a definitely later part of the same seg). [I'm not confident of the accuracy of this paragraph -- see moreReturn in amcScanNailedOnce(). RHSK 2007-01-12]

    +

    If the seg is full and non-white (eg. all grey) when scanning starts, then a single linear scan will make the seg non-grey (in fact: all black).

    + +

    Otherwise, there are two ways new grey objects can appear in the segment while we are scanning it:

    + +

    .scan.loop.white: if the seg contains some white objects when we start a linear scan, then a Ref that points backwards into the same seg can fix and grey an object that was skipped as white when the linear scan passed over it. So scanning must loop until the whole seg is non-grey.

    + +

    .scan.loop.buffer: if the seg is buffered, and the buffer is Forwarding-grey or Mutator-grey (not yet implemented), then new grey objects can arrive during the scan.

    + + +

    .scan.total:

    + +

    Total versus non-Total scans

    + +

    The current design is that the segment summary is not updated during the scan, even though the segment is gaining new Refs from relocating fixes. Instead, the summary of Refs seen by the scan is kept in the scan state: ss->unfixedSummary and ss->fixedSummary.

    + +

    A scan does not necessarily see all objects: objects that were already black at scan start are usually skipped; and objects that remain white at scan end are always skipped. This is the !wasTotal case, and the fixedSummary resulting from the scan must be unioned into the segment summary.

    + +

    But if all objects in the segment were scanned (eg. if whole seg was grey at scan start), PoolScan sets wasTotal to true to indicate this. The trace then uses ss->fixedSummary to replace the old segment summary.

    Scan details

    @@ -110,6 +127,7 @@ PoolFix(pool, ss, seg, refIO)
       2007-01-12  RHSK  Created.
    +  2007-01-16  RHSK  .scan.loop, .scan.total.
     
    From 59c81be6abebd054a78adee4328b09fdffac41d5 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 16 Jan 2007 12:03:22 +0000 Subject: [PATCH 45/46] Mps wiki trace: (tweak) .scan.loop.once Copied from Perforce Change: 161481 ServerID: perforce.ravenbrook.com --- mps/manual/wiki/trace.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mps/manual/wiki/trace.html b/mps/manual/wiki/trace.html index 57a9516df7b..2f9ecad8061 100644 --- a/mps/manual/wiki/trace.html +++ b/mps/manual/wiki/trace.html @@ -63,13 +63,13 @@

    .scan.loop:

    -

    If the seg is full and non-white (eg. all grey) when scanning starts, then a single linear scan will make the seg non-grey (in fact: all black).

    +

    .scan.loop.once: If the seg is full and non-white (eg. all grey) when scanning starts, then a single linear scan will make the seg non-grey (in fact: all black). In this case only, we do not need a loop.

    Otherwise, there are two ways new grey objects can appear in the segment while we are scanning it:

    -

    .scan.loop.white: if the seg contains some white objects when we start a linear scan, then a Ref that points backwards into the same seg can fix and grey an object that was skipped as white when the linear scan passed over it. So scanning must loop until the whole seg is non-grey.

    +

    .scan.loop.white: If the seg contains some white objects when we start a linear scan, then a Ref that points backwards into the same seg can fix and grey an object that was skipped as white when the linear scan passed over it. So scanning must loop until the whole seg is non-grey.

    -

    .scan.loop.buffer: if the seg is buffered, and the buffer is Forwarding-grey or Mutator-grey (not yet implemented), then new grey objects can arrive during the scan.

    +

    .scan.loop.buffer: If the seg is buffered, and the buffer is Forwarding-grey or Mutator-grey (not yet implemented), then new grey objects can arrive during the scan.

    .scan.total:

    From 9055b2277641eadd6d665de31b17db0a1f6d441c Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 16 Jan 2007 14:04:17 +0000 Subject: [PATCH 46/46] Mps poolamc.c: (source only) clarify that commented-out code in amcwhiten is merely a comment; remove tabs. Copied from Perforce Change: 161483 ServerID: perforce.ravenbrook.com --- mps/code/poolamc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index 2a1720ebbc0..df0716571cb 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -1059,14 +1059,18 @@ static Res AMCWhiten(Pool pool, Trace trace, Seg seg) AVER(BufferIsReady(buffer)); BufferDetach(buffer, pool); } else { /* mutator buffer */ - if (BufferScanLimit(buffer) == SegBase(seg)) + if (BufferScanLimit(buffer) == SegBase(seg)) { /* There's nothing but the buffer, don't condemn. */ return ResOK; - else /* if (BufferScanLimit(buffer) == BufferLimit(buffer)) { */ + } + /* [The following else-if section is just a comment added in */ + /* 1998-10-08. It has never worked. RHSK 2007-01-16] */ + /* else if (BufferScanLimit(buffer) == BufferLimit(buffer)) { */ /* The buffer is full, so it won't be used by the mutator. */ /* @@@@ We should detach it, but can't for technical reasons. */ /* BufferDetach(buffer, pool); */ - /* } else */ { + /* } */ + else { /* There is an active buffer, make sure it's nailed. */ if (!amcSegHasNailboard(seg)) { if (SegNailed(seg) == TraceSetEMPTY) { @@ -1093,8 +1097,8 @@ static Res AMCWhiten(Pool pool, Trace trace, Seg seg) } /* We didn't condemn the buffer, subtract it from the count. */ /* @@@@ We could subtract all the nailed grains. */ - /* Relies on unsigned arithmetic wrapping round */ - /* on under- and overflow (which it does). */ + /* Relies on unsigned arithmetic wrapping round */ + /* on under- and overflow (which it does). */ trace->condemned -= AddrOffset(BufferScanLimit(buffer), BufferLimit(buffer)); }