1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

31 commits

Author SHA1 Message Date
Richard Kistruck
6e4b89edd2 mps br/vmem: simple-chunk-return:
zcoll.c -- re-enable message timestamp reporting, and BigDropSmall tests (remove ifdefs)

Copied from Perforce
 Change: 170100
 ServerID: perforce.ravenbrook.com
2010-03-23 07:03:38 +00:00
Richard Kistruck
7bdbbeb2c9 mps br/vmem: simple-chunk-return:
arenavm.c:
   - M_whole, M_frac: print count of bytes as Megabytes
   - diag on VMCompact after all client-requested traces, plus any others where we returned a chunk.
   - show vmem change, and also trace cond, live / % / stuck(pip), notCond

 mpm.c -- new "$3" format for 0-padding 3-char-wide field, for thousandths of a MB

 zcoll.c -- try some new parameters for tests

 diag.c -- just VMCompact diag

Copied from Perforce
 Change: 170097
 ServerID: perforce.ravenbrook.com
2010-03-23 03:52:41 +00:00
Richard Kistruck
1ff022cae1 mps br/vmem: simple-chunk-return:
zcoll.c:
 How to get rid of all the objects, so full collect really collects all automatic objects:
   - Rootdrop() helps, but we can still retain a 1.2MB object;
   - stackwipe() does not help much -- these unwanted ambig refs are being left on the stack by MPS code that runs between mps_arena_collect and the flip!
   - therefore StackScan(0/1) to destroy stack+reg root before full collect: it's the only way to be sure.

 Reproducibility:
   - give Make() a random? switch, acted on by df() = diversity function, to allow bypass of rnd();
   - ZRndStateSet, to set the seed for rnd()

 Output:
   - print_M: switchable Mebibytes or Megabytes (more useful, to be honest);
   - get(): don't report message times, it messes up diffs.

 testlib.c/h:
 Reproducibility:
   - fix rnd_state so a rnd_state getter is possible;
   - testlib.h += rnd_state_t, rnd_state(), rnd_state_set(), rnd_state_set_v2()

 trace.c: traceFindGrey diag: no newline please

Copied from Perforce
 Change: 170093
 ServerID: perforce.ravenbrook.com
2010-03-22 23:00:42 +00:00
Richard Kistruck
968eafea90 Mps br/vmem zcoll.c: (tidy) make "make()" a proper function, not inline in the script-decoding switch statement
Copied from Perforce
 Change: 170087
 ServerID: perforce.ravenbrook.com
2010-03-22 14:59:36 +00:00
Richard Kistruck
b75de3e923 mps br/vmem: simple-chunk-return:
arenavm.c --  on VMFree(), destroy any empty chunks (except the primary).  (VMFree is not the ideal place to do it, but works for proof of concept).
 tract.c -- fix ChunkCache defects:
  - previously, if cache is empty (chunkCache->chunk == NULL) then other fields are *undefined*; but code looks at them anyway (!) without first checking chunkCache->chunk;
  - change it (.chunk.empty.fields) so that, if cache is empty, other fields have defined values: cache-using code may look at them, and they are chosen so that no cache hit will occur.
  --> this fixes crashing defect shown by changelist 170072
  - AVERT(ChunkCache) in the many places it should be checked;
  - use AVERT_CRITICAL in ChunkEncache, because it is called by ChunkOfAddr;

 Also:
 plan.txt -- notes on use of primary chunk.
 config.h -- DIAG also in ci, please [Do not integ to master]
 diag.c -- skip ChainCondemnAuto diag thanks
 zcoll.c -- move printf announcing Destroying arena etc to just before, not just after, we do it.

Copied from Perforce
 Change: 170082
 ServerID: perforce.ravenbrook.com
2010-03-22 13:24:49 +00:00
Richard Kistruck
e82d034c98 Mps br/vmem: prepare for simple-chunk-return:
arenavm.c: VMFree is okay for testing chunk-ret; though just sparePagesPurge() for now;
  diag.c: show what we want for using zcoll to show chunk-ret:
    VM_ix_Create/Destroy
    TraceStart, excpet only briefly for dyn-crit (why=2) and not at all for minor
  locus.c: no newline on "condemn gens" diag please
  tract.c: ChunkDecache is BROKEN; just add AVER to catch this for now
  vmix.c: VM_ix_Create_ok/VM_ix_Destroy (vmw3.c needs similar)
  zcoll.c:
    release after mps_arena_collect!!!
    make, collect, make, collect, to show chunk-ret
    10MB arena means many chunks
None of this is releaseable quality of course.

Copied from Perforce
 Change: 170071
 ServerID: perforce.ravenbrook.com
2010-03-20 13:51:23 +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
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
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
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
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
Richard Kistruck
09480c095f Mps br/padding: lsp tweaks and diag
zcoll:
  - parameterize BigdropSmall for big-obj size and small-obj ref-type, eg "BigdropSmall(big 28000, small A)"
  - Park, to avoid all those minor collections.  Explanatory comments.
poolamc.c:
  - diags: AMCTraceEnd, AMCTraceEnd_perc (new), AMCTraceEnd_pad_med (new),
  - AMCTraceEnd: c Segs/Pages Whiten/Reclaim, cPagesRet(ained)
  - AMCTraceEnd_perc: percentage of condemned pages retained by ambig refs
  - AMCTraceEnd_pad_med: over-detailed calculations of Gain & Loss for Medium segs,
    requiring knowledge of size of obj1 in each seg.
diag.c:
  - Just show AMCTraceEnd_perc and AMCTraceEnd_pad_med, for zcoll/BigdropSmall's purposes.
Note: poolamc.c now has several episodes of experimental diagnostic in it.
It's time to re-baseline it from an un-hacked version.

Copied from Perforce
 Change: 168512
 ServerID: perforce.ravenbrook.com
2009-08-26 17:34:56 +01:00
Richard Kistruck
1c3940b99a Mps br/padding zcoll.c: change bigsmall() test to bigdropsmallambig() --
creates a big object and drops the ref to it, followed by a small object and keeps an ambig ref to it (to nail the AMCSeg it is in).
Loops 100 times.  This is for testing job001811 changes.

Copied from Perforce
 Change: 168451
 ServerID: perforce.ravenbrook.com
2009-08-18 17:14:19 +01:00
Richard Kistruck
e3d6c443ad Mps br/padding: diagnostics that show large-segment-padding in action.
zcoll.c: BigSmall() command -- creates small, then big, then small object.
poolamc.c: AMCDescribe(): output AMC Seg maps, showing single big object -- a pad -- at end of large-segment.
arena/config/diag: allow output of AMC Seg maps.

Copied from Perforce
 Change: 167763
 ServerID: perforce.ravenbrook.com
2009-04-09 16:01:21 +01:00
Richard Kistruck
ed1f97ac9f Mps br/padding: more diagnostic for how padding survives a collection.
More diag:
  - new traceSetSignalEmergency;
  - new AMCFix_amcSegCreateNailboard and AMCHeaderFix_amcSegCreateNailboard
    (note: the other, unreported, route to becoming boarded is because of a (mutator) buffer);
  - in traces: show SegBase and zone;
   - in TraceStart: show genZoneSets;
   - in amcReclaimNailed: show cbpip and cbpad.
 zcoll.c:
   - sizemethod 1 to Make command: occasionally makes >1MiB objects;
   - declare root_table all MPS_RANK_AMBIG.

Copied from Perforce
 Change: 167726
 ServerID: perforce.ravenbrook.com
2009-04-02 18:29:10 +01:00
Richard Kistruck
d25b1ab8e2 Mps br/timing zcoll.c: oops, need to (re-)initialise myroot array for each script, before declaring it a root (integ from zmess.c).
Copied from Perforce
 Change: 167400
 ServerID: perforce.ravenbrook.com
2009-02-17 16:15:59 +00:00
Richard Kistruck
b7907a053d Mps br/timing zcoll.c: catalog example is broken because of
unmanaged ambiguous interior pointers (when compiled with 
moderate optimization), so comment it out for now.

Copied from Perforce
 Change: 167381
 ServerID: perforce.ravenbrook.com
2009-02-16 16:26:39 +00:00
Richard Kistruck
ce6846ffa8 Mps br/timing zcoll.c: (fix compiler warning for w3i3m9) vc9 warns that sscanf is unsafe; disable this warning for zcoll.c. see also job001934.
Copied from Perforce
 Change: 167379
 ServerID: perforce.ravenbrook.com
2009-02-16 14:57:54 +00:00
Richard Kistruck
c5dc7885d8 Mps br/timing zcoll: show gc timing, by printing mps_message_clock value (currently formatted for centiseconds, ie. clock() on unix)
Copied from Perforce
 Change: 167351
 ServerID: perforce.ravenbrook.com
2009-02-06 22:14:35 +00:00
Richard Kistruck
3477d797d5 Mps br/timing zcoll.c: (comments only) briefly describe script commands
Copied from Perforce
 Change: 167349
 ServerID: perforce.ravenbrook.com
2009-02-06 17:38:34 +00:00
Richard Kistruck
21ee127448 Mps br/timing zcoll catalog client:
1. CatalogCheck(), which verifies the tree.
2. Don't set empty object slots to NULL -- make_dylan_vector() has already set them to a DYLAN_INT(0), which means dylan's fmt_scan ignores them.
3. fflush(stdout) more.

Copied from Perforce
 Change: 167321
 ServerID: perforce.ravenbrook.com
2009-02-04 17:40:54 +00:00
Richard Kistruck
70998dd894 Mps br/timing zcoll.c: start to write the "catalog" example client, and find it already gives some non-obvious results.
Copied from Perforce
 Change: 167227
 ServerID: perforce.ravenbrook.com
2009-01-27 14:14:11 +00:00
Richard Kistruck
6c3156fa91 Mps br/timing zcoll.c: move arenasize and rootspace into script;
showStatsAscii uses ascii-graphics to show collections

Copied from Perforce
 Change: 167211
 ServerID: perforce.ravenbrook.com
2009-01-23 17:31:51 +00:00
Richard Kistruck
ee6d463a74 Mps br/timing zcoll.c: get() reports collection statistics
also (in zcoll's tiny script language) tidy up Make() command.

Copied from Perforce
 Change: 167196
 ServerID: perforce.ravenbrook.com
2009-01-21 16:29:40 +00:00
Richard Kistruck
acceb5c41f Mps br/timing zcoll.c: remove temporary rnd()-test code
Copied from Perforce
 Change: 167193
 ServerID: perforce.ravenbrook.com
2009-01-21 14:25:43 +00:00
Richard Kistruck
4fc1ea19fb Mps br/timing zcoll.c: show count of objects made & kept.
Also (TEMPORARY) investigate poor seeding of rnd().  Aha -- 
it's a full-period generator.  Therefore the current 
randomize is a very poor way to seed it.

Copied from Perforce
 Change: 167152
 ServerID: perforce.ravenbrook.com
2009-01-13 16:30:27 +00:00
Richard Kistruck
a899c472e1 Mps br/timing zcoll.c: (fix unused variable)
Copied from Perforce
 Change: 167018
 ServerID: perforce.ravenbrook.com
2008-12-22 17:33:05 +00:00
Richard Kistruck
262e9ae530 Mps br/timing zcoll.c: (new test) hack in the basics; build it
Copied from Perforce
 Change: 167017
 ServerID: perforce.ravenbrook.com
2008-12-22 17:31:14 +00:00
Richard Kistruck
6bd96ccc41 Mps br/timing zcoll.c: (new test) create by integrating from zmess.c
Copied from Perforce
 Change: 167014
 ServerID: perforce.ravenbrook.com
2008-12-22 16:28:32 +00:00