1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 04:30:55 -08:00
Commit graph

157 commits

Author SHA1 Message Date
Richard Brooksby
78d5f049f0 Eliminating type puns on scan states, location dependencies, and allocation points through the mps interface.
Now that we're recommending inlining with client code and optimising with -O2 or -O3, we can't afford any bug introduced by the strict aliasing rule.

Copied from Perforce
 Change: 179322
 ServerID: perforce.ravenbrook.com
2012-09-07 12:58:57 +01:00
Richard Brooksby
858e4ac0ac Partial merge of branch/2012-07-23/cet-transform, excluding cet-specific parts.
Copied from Perforce
 Change: 179309
 ServerID: perforce.ravenbrook.com
2012-09-06 17:17:18 +01:00
Richard Brooksby
27c6706791 Merging branch/2012-08-21/diagnostic-telemetry.
Copied from Perforce
 Change: 179289
 ServerID: perforce.ravenbrook.com
2012-09-05 23:45:31 +01:00
David Lovemore
886e96ba8e Fix weak band assert. we now trace weak segments as weak on a fault if we are in the weak band.
Copied from Perforce
 Change: 179210
 ServerID: perforce.ravenbrook.com
2012-09-03 17:05:51 +01:00
Richard Brooksby
e00495829f Adding more events corresponding to diagnostics.
Copied from Perforce
 Change: 179141
 ServerID: perforce.ravenbrook.com
2012-08-31 19:33:45 +01:00
Richard Brooksby
455e3ee43c Adding an mps-style eventdescribe.
Removing deliberate assert and event debugging dump.  Oops.

Copied from Perforce
 Change: 179133
 ServerID: perforce.ravenbrook.com
2012-08-31 15:14:09 +01:00
Richard Brooksby
09dc2bca88 Writing event dumper to print recent events, and adding it to the default assertion handler.
NUL-terminating event strings to make them easier to print.

Copied from Perforce
 Change: 179132
 ServerID: perforce.ravenbrook.com
2012-08-31 14:12:23 +01:00
David Lovemore
ed8cd9432d In tracescanareatagged use the alignments of pools in the condemned set to determine mask.
Copied from Perforce
 Change: 179117
 ServerID: perforce.ravenbrook.com
2012-08-30 13:48:41 +01:00
Richard Brooksby
4009b8a559 Abolishing eventgen.pl. event structures are now expanded by the preprocessor.
Abolishing event formats.  Each event now has its own structure.
Event parameters are now written directly into the event buffer, rather than being copied twice.

Copied from Perforce
 Change: 179010
 ServerID: perforce.ravenbrook.com
2012-08-21 22:48:11 +01:00
Richard Brooksby
13ba70d2dd Fixing warnings revealed by xcode (clang).
Copied from Perforce
 Change: 178898
 ServerID: perforce.ravenbrook.com
2012-08-11 09:30:24 +01:00
David Lovemore
fa5ad6689b Merged from master/... to pick up longest changes to varargs and casts on shifts
Copied from Perforce
 Change: 178097
 ServerID: perforce.ravenbrook.com
2012-05-03 17:02:33 +01:00
David Lovemore
9bf482ea08 Fixed up long constants and shifts that needed to be cast to correct type.
Copied from Perforce
 Change: 178095
 ServerID: perforce.ravenbrook.com
2012-05-03 16:38:47 +01:00
David Lovemore
4ee202d5cf Adding casts to varargs in diagnostic output
Copied from Perforce
 Change: 178092
 ServerID: perforce.ravenbrook.com
2012-05-03 15:17:04 +01:00
Richard Brooksby
ecfd805f9a Fixing horrible type unsafe candy-machine interface to tracestartgendesc_diag, which broke on w3i6mv.
Copied from Perforce
 Change: 178077
 ServerID: perforce.ravenbrook.com
2012-05-01 17:05:27 +01:00
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