1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00
Commit graph

3680 commits

Author SHA1 Message Date
Richard Kistruck
5ffd337934 Mps master (integ from br/padding): mps_addr_pool(), mps_addr_fmt() -- new mps functions
mps.h, mpsicv.c: implementation
mpsicv.c: new addr_pool_test(), to test them
w3gen.def: export them
walkt0.c: test them within mps_arena_formatted_objects_walk(). (Also checks against values passed to stepper function, and against what we expect).
tool/test-runner.py: add walkt0

Reference Manual: mps_addr_pool, mps_addr_fmt: as yet Undocumented.

Also: design/poolamc: clarifications; add dated attribution for statements by RHSK.

Copied from Perforce
 Change: 169907
 ServerID: perforce.ravenbrook.com
2010-03-02 17:29:41 +00:00
Richard Kistruck
b0df67ea88 Mps master (integ from br/padding): job002205: if pollthreshold is > 64kib behind fillmutatorsize, make arenapoll call tracepoll many times:
Changes:
  - separate ArenaPoll and ArenaStep code paths;
  - simplify ArenaPoll;
  - loop calling TracePoll to catch-up;
  - update pollThreshold correctly, depending on whether we have no work and are sleeping, or have work and are advancing the 'clock' by one unit. If there's no work, don't keep checking. Avoid multiple calls to ClockNow().
  - ArenaStep should NOT change pollThreshold -- that's ArenaPoll's business.  This means ArenaStep may advance, but not retard, trace work.
zcoll: 100MB is a more sensible arena size than 0.5 MB
test-runner.py: run zcoll; on w3i3, use m9 (=VC9.0) compiler

Copied from Perforce
 Change: 169904
 ServerID: perforce.ravenbrook.com
2010-03-02 17:17:52 +00:00
Richard Kistruck
c0d6b21b4c Mps master (integ from br/padding) tweak to amctraceend_pageret diagnostic
Copied from Perforce
 Change: 169900
 ServerID: perforce.ravenbrook.com
2010-03-02 16:56:08 +00:00
Richard Kistruck
b08097b561 mps master (integ from br/padding): job002148 -- correct w3gen.def:
Drop mps_lib_callback_register from w3gen.def, and put it in new file mpslibcb.def, used only when building the MPS DLL (rule in commpost.nmk) which contains the mpslibcb stuff.  Correct expgen.sh accordingly (even though it's not working).  So mps-fns.def (produced by w3build.bat by copying w3gen.def) is now correct for Configura to use to re-export MPS functions static linked into a larger executable, and mpsdy.dll still correctly exports the mps_lib_callback_register function.

Copied from Perforce
 Change: 169899
 ServerID: perforce.ravenbrook.com
2010-03-02 16:50:07 +00:00
Richard Kistruck
6a0d651629 Amc large segment padding (lsp), for job001811:
See design/poolamc for thorough documentation.

AMCBufferFill, for large requests (> 8 ArenaAligns) now gives precisely the requested size to the buffer, and immediately pads the rest [poolamc.c].  See #define AMCLargeSegPAGES 8 [config.h].

New PoolTraceEndMethod -- do end-of-trace work:
Tracer calls PoolTraceEnd() after reclaim, when the trace is TraceFINISHED [trace.c].  AbstractPoolClass uses PoolTrivTraceEnd -- a NOOP [mpm.h, mpmst.h, mpmtypes.h, pool.c, poolabs.c, pooln.c].  AMC overrides with AMCTraceEnd, to emit diagnostic about how well the trace went [poolamc.c].

DIAGNOSTICS:
AMCTraceEnd_pageret: reports page retention (currently gated to only emit if >= 100 pages are retained).
traceSetSignalEmergency: warn when a trace enters emergency mode.
DIAG buffer now 200K, and copes with overflow.

TESTS:
zcoll.c: Test allocation of mixed big and small objects.  Test allocation of big object immediately followed by a retained small object, to test AMC LSP.

Copied from Perforce
 Change: 169898
 ServerID: perforce.ravenbrook.com
2010-03-02 16:41:16 +00:00
Richard Kistruck
3aa0a61e67 Mps br/padding refman: mps_addr_pool, mps_addr_fmt: as yet undocumented.
Copied from Perforce
 Change: 169891
 ServerID: perforce.ravenbrook.com
2010-03-02 14:38:50 +00:00
Richard Kistruck
53a7dfe570 Mps br/padding des/poolamc: minor clarifications; date attribution of statements by rhsk
Copied from Perforce
 Change: 169888
 ServerID: perforce.ravenbrook.com
2010-03-02 13:53:36 +00:00
Richard Kistruck
9f1bd289fc Mps br/padding: exp-169863.zip
Copied from Perforce
 Change: 169864
 ServerID: perforce.ravenbrook.com
2010-02-26 17:06:49 +00:00
Richard Kistruck
f2644e8620 Mps br/padding: exp-169863
Copied from Perforce
 Change: 169863
 ServerID: perforce.ravenbrook.com
2010-02-26 16:57:31 +00:00
Richard Kistruck
640b8b5cb8 Mps br/padding (fix w3i3m9 build) mpsi.c: help compiler see format is never uninitialised
Copied from Perforce
 Change: 169862
 ServerID: perforce.ravenbrook.com
2010-02-26 16:56:05 +00:00
Richard Kistruck
e2598917f4 mps br/padding: mps_addr_pool(), mps_addr_fmt() -- new mps functions
mps.h, mpsicv.c: implementation
 mpsicv.c: new addr_pool_test(), to test them
 w3gen.def: export them
 walkt0.c: test them within mps_arena_formatted_objects_walk().  (Also checks against values passed to stepper function, and against what we expect).
 tool/test-runner.py: add walkt0

Copied from Perforce
 Change: 169861
 ServerID: perforce.ravenbrook.com
2010-02-26 16:33:49 +00:00
Richard Kistruck
27df534da7 Mps br/padding arenastep: do not change pollthreshold -- that's for arenapoll, not arenastep.
So ArenaStep may advance, but not retard, trace work.

Copied from Perforce
 Change: 169855
 ServerID: perforce.ravenbrook.com
2010-02-24 16:18:10 +00:00
Richard Kistruck
0540074ccb mps br/padding (back out non-working changelist 169853 (attempt to clear up what "clamped" means))
Copied from Perforce
 Change: 169854
 ServerID: perforce.ravenbrook.com
2010-02-24 16:14:38 +00:00
Richard Kistruck
9c4e0d4265 Mps br/padding (non-working changelist) see whether we can clear up what "clamped" means:
ArenaPoll will still call TracePoll if clamped...
but TracePoll won't start a new trace if clamped
ArenaStep won't start an opportunistic full collect if clamped
ArenaStep won't advance pollThreshold, ever
traceFlip asserts that clamped is FALSE.
(see http://info.ravenbrook.com/mail/2010/02/23/13-19-24/0.txt)
---
But no, clamped is more complex than that.
  - Certain mps.h calls affect it.
  - Certain MPS tests use it for more control and reproducibility.
  - MPS itself uses it, as part of starting a full collect, for which it must first run any current trace to completion without starting any new ones.
In particular, this set of changes asserts:
  MPS ASSERTION FAILURE: ArenaGlobals(arena)->clamped == FALSE
  trace.c
  534
because mps_arena_collect() tries to start a full collect while clamped.
---
So this changelist is for historical interest only, and will be backed out.

Copied from Perforce
 Change: 169853
 ServerID: perforce.ravenbrook.com
2010-02-24 16:07:17 +00:00
Richard Kistruck
deb6058af8 Mps br/padding arenapoll: non-naive fix for j2205: correct updating of pollthreshold, depending on whether we have no work and are sleeping, or have work and are advancing the clock by one unit. if there's no work, don't keep checking. avoid multiple calls to clock().
Copied from Perforce
 Change: 169851
 ServerID: perforce.ravenbrook.com
2010-02-23 13:43:27 +00:00
Richard Kistruck
3fbaab6951 Mps br/padding: exp-169819.zip
Copied from Perforce
 Change: 169820
 ServerID: perforce.ravenbrook.com
2010-02-12 17:31:41 +00:00
Richard Kistruck
dfcf9dde53 mps br/padding: exp-169819: job002205 experimental quick-fix, corrected. delete exp-169816.
Copied from Perforce
 Change: 169819
 ServerID: perforce.ravenbrook.com
2010-02-12 17:23:30 +00:00
Richard Kistruck
ffb0ef749e Mps br/padding: global.c arenapoll: just loop until pollthreshold is past fillmutatorsize. don't be clever. fixes defect in global.cwhere if there was no tracepoll work to do, pollthreshold would not be updated. (ooops).
Copied from Perforce
 Change: 169818
 ServerID: perforce.ravenbrook.com

GitHub-reference: https://github.com/Ravenbrook/mps/issues/4
2010-02-12 17:17:32 +00:00
Richard Kistruck
79bbb26cd5 Mps br/padding: exp-169816
Copied from Perforce
 Change: 169817
 ServerID: perforce.ravenbrook.com
2010-02-12 15:43:14 +00:00
Richard Kistruck
01eb645e2a Mps br/padding: exp-169816: job002205 experimental quick-fix
Copied from Perforce
 Change: 169816
 ServerID: perforce.ravenbrook.com
2010-02-12 15:32:49 +00:00
Richard Kistruck
fa2320a2ea Mps br/padding: testrunner.py: vc9.0: build and run w3i3m9.
So user should do \vc9vars.bat before invoking ..\tool\testrunner.py

Copied from Perforce
 Change: 169815
 ServerID: perforce.ravenbrook.com
2010-02-12 15:27:48 +00:00
Richard Kistruck
540f72c8ff Mps br/padding: make arenapoll do lots of tracepolls if required, to catch up after fillmutatorsize jumps by > 64kib (job002205)
Changes:
  - separate ArenaPoll and ArenaStep code paths;
  - simplify ArenaPoll;
  - loop calling TracePoll to catch-up;
  zcoll: 100MB is a more sensible arena size than 0.5 MB
Warning: barely "experimental" code quality, omitting the following necessities:
  - consideration of interactions with ArenaStep,
  - re-engineering of ArenaPoll and friends.

Copied from Perforce
 Change: 169814
 ServerID: perforce.ravenbrook.com
2010-02-12 14:16:53 +00:00
Richard Kistruck
4b55d74bc4 Mps wiki refman addenda: clarify in what way mps_arena_start_collect() is 'asynchronous'
Copied from Perforce
 Change: 169804
 ServerID: perforce.ravenbrook.com
2010-02-10 15:00:21 +00:00
Richard Kistruck
bd7b825257 Mps wiki gc_story: add id=rate anchor on rate section
Copied from Perforce
 Change: 169774
 ServerID: perforce.ravenbrook.com
2010-02-08 12:53:22 +00:00
Richard Kistruck
3eabdf7baf Mps wiki: link to guide.hex.trans.
Copied from Perforce
 Change: 169233
 ServerID: perforce.ravenbrook.com
2009-12-01 15:19:34 +00:00
Richard Kistruck
0ce88d50f9 Mps br/padding: exp-168778.zip
Copied from Perforce
 Change: 168779
 ServerID: perforce.ravenbrook.com
2009-09-28 15:20:42 +01:00
Richard Kistruck
08483ecb8e Mps br/padding exp-168778: amclargesegpages = 8 again.
(Also: report value of AMCLargeSegPAGES in AMCTraceEnd_pageret diag output).

Copied from Perforce
 Change: 168778
 ServerID: perforce.ravenbrook.com
2009-09-28 15:02:46 +01:00
Richard Kistruck
c1c9dc5dc5 Mps br/padding: exp-168764.zip
Copied from Perforce
 Change: 168765
 ServerID: perforce.ravenbrook.com
2009-09-25 17:13:34 +01:00
Richard Kistruck
2b25c27d47 Mps br/padding exp-168764: for testing, turn off amc lsp, by setting amclargesegpages to 1<<18 * 4k pages => segs < 1gib are still 'not large'
Copied from Perforce
 Change: 168764
 ServerID: perforce.ravenbrook.com
2009-09-25 17:00:52 +01:00
Richard Kistruck
8b9893a01b Mps br/padding: job002148: drop mps_lib_callback_register from w3gen.def, and put it in new file mpslibcb.def, used only when building the mps dll (rule in commpost.nmk) which contains the mpslibcb stuff. correct expgen.sh accordingly (even though it's not working). so mps-fns.def (produced by w3build.bat by copying w3gen.def) is now correct for configura to use to re-export mps functions static linked into a larger executable, and mpsdy.dll still correctly exports the mps_lib_callback_register function.
Copied from Perforce
 Change: 168763
 ServerID: perforce.ravenbrook.com
2009-09-25 15:08:55 +01:00
Richard Kistruck
cffc8c282b Mps br/padding zcoll.c: (fix build on w3i3*) rename argument/variable "small" as "small_ref", because the name "small" is already in use by the compiler or a windows header file.
Copied from Perforce
 Change: 168761
 ServerID: perforce.ravenbrook.com
2009-09-25 13:55:12 +01:00
Richard Kistruck
5d9e68fd49 Mps proc/release-confgura and -experimental: both vc6 and vc9 builds; no tar archive.
Copied from Perforce
 Change: 168756
 ServerID: perforce.ravenbrook.com
2009-09-24 17:18:37 +01:00
Richard Kistruck
b7de7f621a Mps br/padding amc lsp: rename pagespersegmediumlimit as amclargesegpages, and make it a define in config.h. corrections in des/poolamc.
Copied from Perforce
 Change: 168704
 ServerID: perforce.ravenbrook.com
2009-09-18 16:15:50 +01:00
Richard Kistruck
3bb221f479 Mps br/padding amctraceend_pageret: add srm and srl = segments retained medium & large
Copied from Perforce
 Change: 168689
 ServerID: perforce.ravenbrook.com
2009-09-17 17:20:16 +01:00
Richard Kistruck
7c06dd2ad6 Mps br/padding:
poolamc.c tidy up:
  neater implementation of obj1pip (amcReclaimNailed)
  neater implementation of amcResetTraceIdStats -- no need for a function any more
  delete lots of obsolete temporary diagnostic (superseded by AMCTraceEnd_pageret)
  a few more avers (especially on buffer empty)
also revert temporary diagnostic changes in arena.c, config.h, diag.c, global.c
diag.c: fix diag-buffer at 100 screenfuls (200000 chars).
zcoll.c: reinstate Make 50000 with occasional big objs.

Copied from Perforce
 Change: 168688
 ServerID: perforce.ravenbrook.com
2009-09-17 16:59:39 +01:00
Richard Kistruck
14e6d6dd9f mps br/padding: some pooltraceend() odds and ends:
mpmst.h: (comments only) clarify: after all reclaims
   pool.c: PoolClassCheck: FUNCHECK(class->traceEnd)
   pooln.c: traceEnd method in null pool class

Copied from Perforce
 Change: 168687
 ServerID: perforce.ravenbrook.com
2009-09-17 15:38:48 +01:00
Richard Kistruck
2db1086d64 Mps wiki pool_classes: poolclassn; move old catalogue to end of doc.
Copied from Perforce
 Change: 168684
 ServerID: perforce.ravenbrook.com
2009-09-17 12:15:52 +01:00
Richard Kistruck
6384c628bf Mps wiki pool_classes: fix html
Copied from Perforce
 Change: 168683
 ServerID: perforce.ravenbrook.com
2009-09-17 12:05:57 +01:00
Richard Kistruck
a3424d7131 Mps br/padding poolamc: rename largeseg as pagespersegmediumlimit
Copied from Perforce
 Change: 168663
 ServerID: perforce.ravenbrook.com
2009-09-14 17:22:45 +01:00
Richard Kistruck
098721c6a7 Mps br/padding des/poolamc: complete documentaiton of amc pads and retained pages.
Copied from Perforce
 Change: 168661
 ServerID: perforce.ravenbrook.com
2009-09-14 17:12:43 +01:00
Richard Kistruck
f92b19173e Mps br/padding amctraceend_pageret: only output if pret >= pretmin, currently 100 pages.
Also: say page size and pRetMin in diags; more AVERs

Copied from Perforce
 Change: 168614
 ServerID: perforce.ravenbrook.com
2009-09-09 17:00:28 +01:00
Richard Kistruck
2fad7cbe30 Mps br/padding zcoll.c: (remove hack: revert change zcoll.c168574)
Copied from Perforce
 Change: 168575
 ServerID: perforce.ravenbrook.com

GitHub-reference: https://github.com/Ravenbrook/mps/issues/8
2009-09-04 16:53:52 +01:00
Richard Kistruck
783dc5c88d Mps br/padding zcoll.c: (hack to verify that prlr in amctraceend_pageret diag is correctly detecting pages of large segs by a rest-obj ref)
Copied from Perforce
 Change: 168574
 ServerID: perforce.ravenbrook.com
2009-09-04 16:51:11 +01:00
Richard Kistruck
93a64fb781 Mps br/padding amctraceend: rename pcmx as scm (= insurance cost avoided, upper bound); add scl (= insurance cost paid, upper bound); better comments; use poolalignment accessor
Copied from Perforce
 Change: 168573
 ServerID: perforce.ravenbrook.com
2009-09-04 16:39:19 +01:00
Richard Kistruck
b091caf932 Mps br/padding: example of an "emergency storm" -- cascading emergency traces -- from mpsicv.
Copied from Perforce
 Change: 168571
 ServerID: perforce.ravenbrook.com
2009-09-04 16:05:19 +01:00
Richard Kistruck
e655cda7ab Mps br/padding poolamc: (tidy) avoid diag-only variable outside diag macro in amctraceend
Copied from Perforce
 Change: 168564
 ServerID: perforce.ravenbrook.com
2009-09-03 17:40:17 +01:00
Richard Kistruck
3c478a2aa1 Mps br/padding poolamc: simplify amcreclaimnailed accounting to use preservedinplacecount for segfree decision and obj1 statistics, instead of bool emptyseg
Copied from Perforce
 Change: 168563
 ServerID: perforce.ravenbrook.com
2009-09-03 17:35:38 +01:00
Richard Kistruck
c3bcfc86c9 Mps br/padding poolamc: pageretstruct -- page-based diags about page retention,
emitted as diag AMCTraceEnd_pageret.

Copied from Perforce
 Change: 168562
 ServerID: perforce.ravenbrook.com
2009-09-03 17:17:50 +01:00
Richard Kistruck
94537515e0 Mps br/padding zcoll: fix round-up bug, ugly logic, and lack of comments in makething() in zcoll.c
Copied from Perforce
 Change: 168560
 ServerID: perforce.ravenbrook.com
2009-09-02 16:53:49 +01:00
Richard Kistruck
cb5290c9ab Mps br/padding zcoll: fix root_table bug (this development branch only)
(introduced in //info.ravenbrook.com/project/mps/branch/2009-03-31/padding/code/zcoll.chttps://github.com/Ravenbrook/mps/issues/4, changelist 168451)
Now that we have two root tables -- Ambig & Exact -- we had better store them in two separate variables!  D'oh.
Bug: single variable "root_table" was used for Ambig, and then re-used for Exact.  On clear up, only Exact was mps_root-destroyed, and leaving Ambig still around at mps_arena_destroy.  In .variety.ci, after ControlFinish, a CHECKL(RingCheck(&arenaGlobals->rootRing)); tries to access the undestoryed root, even though the ControlPool has been unmapped.  This causes seg fault.  GDB works fine to show this, with bt.
Fix: two vars; call mps_root_destroy on each.

Copied from Perforce
 Change: 168533
 ServerID: perforce.ravenbrook.com
2009-08-28 17:36:59 +01:00