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

93 commits

Author SHA1 Message Date
Richard Kistruck
d1e04a6dd5 mps br/vmem: simple-chunk-return:
arenavm.c, trace.c, mpmst.h -- trace->preTraceArenaReserved, to show pre- and peak-vmem during collection

Copied from Perforce
 Change: 170098
 ServerID: perforce.ravenbrook.com
2010-03-23 04:07:43 +00:00
Richard Kistruck
0e6aecdbb8 mps br/vmem: simple-chunk-return:
arenavm.c -- move chunk-return into new function "VMCompact".
 (also, in VMArenaFinish, null out arena->primary in VMArenaFinish, so it is not left dangling).

 arena.c, arenavm.c, mpm.h, mpmst.h, mpmtypes.h:
 arena->class->compact: ArenaCompact, ArenaTrivCompact, VMCompact

 trace.c -- traceReclaim calls ArenaCompact!

Copied from Perforce
 Change: 170095
 ServerID: perforce.ravenbrook.com
2010-03-23 01:49:17 +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
bf80a3a11d Mps br/padding: new pooltraceendmethod: do end-of-trace work
Tracer calls PoolTraceEnd() when the trace is TraceFINISHED.
 AbstractPoolClass uses PoolTrivTraceEnd -- a NOOP. [mpm.h, mpmst.h, mpmtypes.h, pool.c, poolabs.c]
 AMC overrides with AMCTraceEnd, to emit diagnostic on how well the trace went! [poolamc.c]

Copied from Perforce
 Change: 168478
 ServerID: perforce.ravenbrook.com
2009-08-20 17:44:16 +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
b27e4ff179 Mps br/timing (fix warnings "... may be used uninitialized"):
trace.c, tract.c: initialise variable to NULL

Copied from Perforce
 Change: 167191
 ServerID: perforce.ravenbrook.com
2009-01-21 14:17:56 +00:00
Richard Kistruck
bf3c873639 Mps br/timing (revert previous local-only change @166956)
Copied from Perforce
 Change: 166957
 ServerID: perforce.ravenbrook.com
2008-12-16 18:01:18 +00:00
Richard Kistruck
bace1c7bc1 Mps br/timing (local only - must revert) hack trace.c so it does not
pre-allocate GC messages after the first trace, and verify that 
everything still works, droppedMessages is incremented, and reported 
as non-zero (in diagnostic varieties only) by global.c on 
ArenaDestroy.  Test passes.

Copied from Perforce
 Change: 166956
 ServerID: perforce.ravenbrook.com
2008-12-16 17:59:50 +00:00
Richard Kistruck
ac7a39432c Mps br/timing traceidmessages: create them at mps_arena_create time,
re-create them immediately after a trace sends its last message.
Store them, one per TraceId, in ArenaStruct.  Cope correctly if they 
cannot be created (ControlAlloc fails).  Destroy them correctly on 
mps_arena_destroy.  See job001989 and design/message-gc#lifecycle
(not yet written).

Copied from Perforce
 Change: 166918
 ServerID: perforce.ravenbrook.com
2008-12-11 16:06:14 +00:00
Richard Kistruck
77ea63625a Mps br/timing: traceanc.c -- all this ancillary stuff was making
trace.c very cluttered.  Put it here instead.

Copied from Perforce
 Change: 166911
 ServerID: perforce.ravenbrook.com
2008-12-09 16:55:22 +00:00
Richard Kistruck
c7cc77b06b Mps br/timing: move field "messagetype type" out of messagestruct
and into MessageClassStruct.

Copied from Perforce
 Change: 166795
 ServerID: perforce.ravenbrook.com
2008-11-24 15:44:27 +00:00
Richard Kistruck
a563a76204 Mps br/timing: mps_alert_collection_set() -- client sets a callback
function; MPS calls it synchronously on collection start/stop 
(immediately after posting start/stop message).  The callback 
receives two ints: alertcode (start|stop; see mps.h), and whycode 
(trace->why).  Note: callback is also called for heap walk 
start/stop.
amcss.c: show start/stop alerts.

Copied from Perforce
 Change: 166703
 ServerID: perforce.ravenbrook.com
2008-11-12 15:07:04 +00:00
David Jones
d6d6a11ef7 Mps: adding uses of diag_decl so that variety=hi builds on os x.
Copied from Perforce
 Change: 163257
 ServerID: perforce.ravenbrook.com
2007-09-19 11:12:21 +01:00
Richard Kistruck
3cf7d5d66a 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
2007-08-09 16:41:59 +01:00
Richard Kistruck
c311f178cc Mps br/diagtag: oops! back out accidental checkin of trace.c with
test code in.

Copied from Perforce
 Change: 163071
 ServerID: perforce.ravenbrook.com
2007-08-09 13:45:26 +01:00
Richard Kistruck
8342669dc9 Mps br/diagtag: diag.c: stringequal(), used to check tags, and
report helpfully if poor programmer forgot to end a tag.
FilterOutput: really filters now, but only on Tag.

Copied from Perforce
 Change: 163070
 ServerID: perforce.ravenbrook.com
2007-08-09 13:40:48 +01:00
Richard Kistruck
5cbd84f9b4 Mps br/diagtag:
diag.c: support tagging of diagnostics, and avoid having to 
  say DIAG_STREAM every time, with new macros:
    DIAG_SINGLEF, DIAG_FIRSTF, DIAG_MOREF, DIAG_END.
mpm.c: new WriteF_firstformat_v required by DIAG_MOREF.

Copied from Perforce
 Change: 163059
 ServerID: perforce.ravenbrook.com
2007-08-07 19:09:43 +01:00
David Jones
3e28b6ccaa Mps: adding gendesc indexes back in. and moving some static
function

Copied from Perforce
 Change: 162969
 ServerID: perforce.ravenbrook.com
2007-07-20 18:43:07 +01:00
Richard Kistruck
f6fb026068 Mps br/gcdiag: trace.c tracestart: separate tracestartgendesc_diag
function, and use it to show &arena->topGen.

Copied from Perforce
 Change: 162967
 ServerID: perforce.ravenbrook.com
2007-07-20 18:30:06 +01:00
Richard Kistruck
b0219be845 Mps br/gcdiag: trace.c tracestart: diag arenadescribe, and
whiteset for this trace.

Copied from Perforce
 Change: 162965
 ServerID: perforce.ravenbrook.com
2007-07-20 17:50:16 +01:00
Richard Kistruck
90d7731a37 Mps br/gcdiag: split tracestartwhytostring into 2 parts (tostring
and ToTextBuffer), and fix DIAG in TraceStart to use ToString.  
(Previous hack of using the start-message's buffer only works if 
the client has enabled start messages).

Copied from Perforce
 Change: 162964
 ServerID: perforce.ravenbrook.com
2007-07-20 17:30:38 +01:00
David Jones
92d3fe63bb Mps: zoneset added to diag.
Copied from Perforce
 Change: 162961
 ServerID: perforce.ravenbrook.com
2007-07-20 13:10:00 +01:00
David Jones
4cc0878bce Mps: int -> index
Copied from Perforce
 Change: 162958
 ServerID: perforce.ravenbrook.com
2007-07-20 11:51:35 +01:00
David Jones
f142d75661 Mps: tracestart diag, added poolname and gendesc index.
Copied from Perforce
 Change: 162957
 ServerID: perforce.ravenbrook.com
2007-07-20 11:21:05 +01:00
David Jones
7739f79926 Mps: why code in diagnostic, "correct" newsize diagnostics.
Copied from Perforce
 Change: 162956
 ServerID: perforce.ravenbrook.com
2007-07-20 11:09:49 +01:00
David Jones
d97d0920af Mps: poolgen diags at tracestart.
Copied from Perforce
 Change: 162955
 ServerID: perforce.ravenbrook.com
2007-07-20 10:20:44 +01:00
David Jones
2a8551b558 Mps: poolgens emitted in diags at tracestart.
Copied from Perforce
 Change: 162954
 ServerID: perforce.ravenbrook.com
2007-07-20 10:02:02 +01:00
David Jones
249ccae845 Mps: trace.c formatting changes.
Copied from Perforce
 Change: 162951
 ServerID: perforce.ravenbrook.com
2007-07-19 17:56:04 +01:00
Richard Kistruck
5d2c5a0cc7 Mps master: trace and poolabs: (comment only) clarify that
PoolTrivGrey knows that a white seg is an all-white seg, and 
therefore needs no greying.

Copied from Perforce
 Change: 162946
 ServerID: perforce.ravenbrook.com
2007-07-19 16:50:21 +01:00
Richard Kistruck
18295dfc24 Mps master: (fix w3i3mv build) wrap diag-only function declarations
(in trace.c) with DIAG_DECL() (from mpm.h).

Copied from Perforce
 Change: 162944
 ServerID: perforce.ravenbrook.com
2007-07-19 16:25:59 +01:00
Richard Kistruck
35dc5cd940 Mps master: diag_with_stream_and_writef.
trace.c: traceFindGrey_diag: wrap calls in DIAG(), prevent report
overflow, reduce report array to 20 chars, and use WriteF.

Copied from Perforce
 Change: 162937
 ServerID: perforce.ravenbrook.com
2007-07-19 14:38:57 +01:00
Richard Kistruck
ae88d40843 Mps master: trace.c: (whitespace only) remove tabs, fix style of a comment.
Copied from Perforce
 Change: 162934
 ServerID: perforce.ravenbrook.com
2007-07-18 18:22:10 +01:00
Richard Kistruck
7d4f1bcc0b mps br/diag: destructive integration:
Integrate trace.chttps://github.com/Ravenbrook/mps/issues/2,https://github.com/Ravenbrook/mps/issues/8 and mpmst.hhttps://github.com/Ravenbrook/mps/issues/2,https://github.com/Ravenbrook/mps/issues/3 from br/band.
(Removes all previous changes to trace.c in br/diag)
(Consequent change to TraceStart() fn-type in mpm.h)
(Consequent re-introduction of tabs in trace.c)
Then further:
Add in traceFindGrey_diag(), from trace.chttps://github.com/Ravenbrook/mps/issues/15 in br/diag,
to give output showing sequence of seg-ranks returned by 
traceFindGrey.

Copied from Perforce
 Change: 162758
 ServerID: perforce.ravenbrook.com
2007-07-04 15:17:59 +01:00
David Jones
fdd6a39f53 Mps: more checking.
Copied from Perforce
 Change: 162742
 ServerID: perforce.ravenbrook.com
2007-07-03 15:44:24 +01:00
David Jones
363088e2a3 Mps: tracefindgrey checks as per its comment.
Copied from Perforce
 Change: 162736
 ServerID: perforce.ravenbrook.com
2007-07-03 15:01:48 +01:00
David Jones
98bd3617a3 Mps: comments on what checks we make in tracefindgrey. no
checks yet.

Copied from Perforce
 Change: 162734
 ServerID: perforce.ravenbrook.com
2007-07-03 14:32:52 +01:00
David Jones
c20569b283 Mps: tracebandincrement renamed to tracebandadvance.
Copied from Perforce
 Change: 162732
 ServerID: perforce.ravenbrook.com
2007-07-03 14:00:20 +01:00
David Jones
75b8750d3c Mps: implements better band tracing.
Copied from Perforce
 Change: 162718
 ServerID: perforce.ravenbrook.com
2007-07-02 16:10:48 +01:00
David Jones
f63d05eaaf Mps: added band field to tracestruct. unused.
Copied from Perforce
 Change: 162717
 ServerID: perforce.ravenbrook.com
2007-07-02 15:43:34 +01:00
David Jones
afe0c9167d Mps: more correct c style in trace.c immediately prior to
editing it.

Copied from Perforce
 Change: 162716
 ServerID: perforce.ravenbrook.com
2007-07-02 15:21:04 +01:00
Richard Kistruck
cb7466253b Mps br/diag: trace: new field in tracestruct: traceband band for
current band (eg via-F) of trace.  Fix for job001658.

Copied from Perforce
 Change: 162696
 ServerID: perforce.ravenbrook.com
2007-06-29 17:17:00 +01:00
Richard Kistruck
044ed29e91 Mps br/diag: trace.c: rearrange diag output into new
traceFindGrey_diag() function (preparatory to leaving it in when 
integrating to master).

Copied from Perforce
 Change: 162676
 ServerID: perforce.ravenbrook.com
2007-06-28 16:13:13 +01:00
Richard Kistruck
c333ad1add mps br/diag: trace.c: (fix w3 build) cast integer character constant to char
w3build.bat: prepare for experimental release exp-162647

Copied from Perforce
 Change: 162647
 ServerID: perforce.ravenbrook.com
2007-06-22 17:19:23 +01:00
Richard Kistruck
d796426ba5 mps br/diag: trace.c: tracefindgrey diag-out:
Represent runs of the same rank as "Rx" where R is rank and x is 
 0..9, a..z (x10), or *.  This makes output smaller.
 Accumulate report, and only output at end of trace.
 Represent "no more grey segs" as ".".

Copied from Perforce
 Change: 162644
 ServerID: perforce.ravenbrook.com
2007-06-22 16:05:52 +01:00
Richard Kistruck
bb72c7075e Mps br/diag: trace.c: (fix w3 build) cast integer character constant to char
Copied from Perforce
 Change: 162630
 ServerID: perforce.ravenbrook.com
2007-06-21 17:23:01 +01:00
Richard Kistruck
2b59688236 Mps br/diag: start to demonstrate job001658 defect:
Show that after finding one RankFINAL segment, traceFindGrey then 
goes back to RankEXACT segs before tracing the next RankFINAL segment.

Copied from Perforce
 Change: 162626
 ServerID: perforce.ravenbrook.com
2007-06-21 15:59:33 +01:00
Richard Kistruck
4d22c6b819 mps br/diag: (whitespace only) remove tabs from trace.c
Copied from Perforce
 Change: 162615
 ServerID: perforce.ravenbrook.com
2007-06-20 15:49:07 +01:00
Richard Kistruck
de2c83bebe Mps br/diag: diag in tracestart: show arena->chunkserial, and
output why as number (for conciseness).

Copied from Perforce
 Change: 162398
 ServerID: perforce.ravenbrook.com
2007-05-23 16:54:25 +01:00
Richard Kistruck
45038f2c52 Mps br/diag: back to diag_with_printf again.
Copied from Perforce
 Change: 162397
 ServerID: perforce.ravenbrook.com
2007-05-23 16:39:26 +01:00
Richard Kistruck
4f9f9477e8 Mps br/diag: release exp-162395:
Switch from DIAG_WITH_PRINTF to _WITH_STREAM_WRITEF.
(Still just from TraceStart).

Copied from Perforce
 Change: 162395
 ServerID: perforce.ravenbrook.com
2007-05-23 15:45:32 +01:00