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

68 commits

Author SHA1 Message Date
Richard Brooksby
513aabb046 Further elimination of type puns that violate the strict aliasing rule. this change eliminates puns on the format methods.
Copied from Perforce
 Change: 179452
 ServerID: perforce.ravenbrook.com
2012-09-12 19:45:27 +01:00
Richard Brooksby
9248316fb6 Further reduction of interface puns that violate the strict aliasing rule, this time in thread function types and the corresponding threadstruct.
Copied from Perforce
 Change: 179451
 ServerID: perforce.ravenbrook.com
2012-09-12 19:32:37 +01:00
Richard Brooksby
75837d8376 Fixing type puns around arenapeek and arenapoke by allowing them to take a ref * to get a ref, rather than an addr.
Copied from Perforce
 Change: 179382
 ServerID: perforce.ravenbrook.com
2012-09-10 10:33:22 +01:00
Richard Brooksby
5a604a2f51 Fixing bugs introduced by type puns passed through scanning methods, discovered by offsetting mps_ss_s from the beginning of scanstatestruct.
Adding a pseudo-target "find-puns" which, on FreeBSD mostly, prints useful warnings about strict aliasing rule violations.
Fixing more strict aliasing rule violations found by the above.

Copied from Perforce
 Change: 179358
 ServerID: perforce.ravenbrook.com
2012-09-07 23:48:14 +01:00
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
c4c3595fb8 Now there is no measurable performance penalty for events, they're on in all varieties (except we).
Copied from Perforce
 Change: 179137
 ServerID: perforce.ravenbrook.com
2012-08-31 16:42:17 +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
15de8407ce Moving linux-specific parts out of thli.c in order to unify with freebsd.
Copied from Perforce
 Change: 178925
 ServerID: perforce.ravenbrook.com
2012-08-14 17:05:11 +01:00
Richard Brooksby
3893cede56 Catching up with masters, to bring in work from branch/2012-03-27/longest.
Copied from Perforce
 Change: 178073
 ServerID: perforce.ravenbrook.com
2012-05-01 16:29:25 +01:00
Richard Brooksby
80fe60df02 Added w3i6mv platform and fixed types of arguments to windows api functions for 64-bit.
Copied from Perforce
 Change: 178063
 ServerID: perforce.ravenbrook.com
2012-04-30 14:33:00 +01:00
Richard Brooksby
ecb147b98f Consistently passing closure sizes as size_t and not casting back and forth to size or anything else.
Copied from Perforce
 Change: 177817
 ServerID: perforce.ravenbrook.com
2012-03-27 18:12:52 +01: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
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
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
f5e8b732ad mps br/timing traceanc: (tidying only) improve comments and variable
names.

Copied from Perforce
 Change: 166915
 ServerID: perforce.ravenbrook.com
2008-12-10 10:32:29 +00:00
Richard Kistruck
72dae9faed Mps br/timing traceanc: trace.c needs tracestartwhytostring
(for .variety.di only, as it happens)

Copied from Perforce
 Change: 166912
 ServerID: perforce.ravenbrook.com
2008-12-09 17:18:09 +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
c2d5420ea6 Mps br/timing: new clocknow() wrapper for mps_clock(), clockspersec();
use Clock in arena step (not Word).

Copied from Perforce
 Change: 166701
 ServerID: perforce.ravenbrook.com
2008-11-12 09:26:48 +00:00
Richard Kistruck
38d28de534 Mps br/timing: new type "clock", internal equivalent of mps_clock_t.
Used for a field in messages.  (More uses to follow).

Copied from Perforce
 Change: 166697
 ServerID: perforce.ravenbrook.com
2008-11-11 16:57:30 +00:00
Richard Kistruck
4e270b68fa mps br/timing: tabs in header files. (p4 diff -db -- confirms whitespace changes only).
Copied from Perforce
 Change: 166674
 ServerID: perforce.ravenbrook.com
2008-11-07 13:58:56 +00:00
Richard Kistruck
62fb0f32ae Mps br/timing: hack in mps_clock_t
(Should go via new Clock type in mpmtypes, mpsi_check(), etc).

Copied from Perforce
 Change: 166591
 ServerID: perforce.ravenbrook.com
2008-10-31 17:14:37 +00:00
Richard Kistruck
f5c3940658 Mps br/timing: (re-order file contents) arrange message functions
into a consistent order: 
 - internal (MPM) interface -- functions for message originator;
 - delivery (client) interface -- functions for recipient;
 - message methods.

Copied from Perforce
 Change: 166589
 ServerID: perforce.ravenbrook.com
2008-10-31 12:23:24 +00:00
Richard Kistruck
2b645131f2 Mps br/auto_header: rename controlpooldescribe as controldescribe; aaagh tabs
Copied from Perforce
 Change: 164504
 ServerID: perforce.ravenbrook.com
2008-03-26 16:53:34 +00:00
Richard Kistruck
0a986fc206 Mps br/auto_header: add arenadestroy diag: calls controlpooldescribe
just before finishing the control pool.  This clearly shows the 
job001784 leak, and allows some checking for other such leaks.

Copied from Perforce
 Change: 164385
 ServerID: perforce.ravenbrook.com
2008-03-12 08:29:46 +00:00
Richard Kistruck
598dc971a0 Mps br/auto_header:
Add diagnostics to show ControlPool leak when deallocating nailboards with auto_header format.
See logfiles added in this changelist.

Copied from Perforce
 Change: 164383
 ServerID: perforce.ravenbrook.com
2008-03-11 19:53:05 +00:00
Richard Kistruck
d9d4f267df Mps br/diagtag: give helpful message if diag_end tag does not match.
(tidyup) Move RulesGlobal to head of file; write instructions.
(tidyup) Move StringEqual into mpm.c (with StringLength); add AVER.
(cosmetic) Correct case of names: module-interface names begin 
uppercase; local names begin lowercase.  Tags should be C identifiers.

Copied from Perforce
 Change: 163112
 ServerID: perforce.ravenbrook.com
2007-08-13 16:54:40 +01:00
Richard Kistruck
55b74f2590 Mps br/diagtag: writef (mpm.c) uses new stream_fputc/s(), but still use mps_lib_file*
and mps_lib_EOF.
diag.c:
  Diag is a buffer capable of holding a diagnostic.
  FilterStream can buffer and filter diagnostics.
  Rule is a selection rule for filtering diagnostics.
  FilterOutput does output (but does not apply the rules yet).
  DiagStream can be switched to either FilterStream() or mps_lib_stdout().  

Copied from Perforce
 Change: 163067
 ServerID: perforce.ravenbrook.com
2007-08-09 12:11:29 +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
Richard Kistruck
5a478d9a7d Mps br/diagtag: new writef_v takes a va_started va_list.
WriteF calls WriteF_v.

Copied from Perforce
 Change: 163057
 ServerID: perforce.ravenbrook.com
2007-08-07 17:22:12 +01:00
Richard Kistruck
2901c70183 Mps master: diag.c's diag_with_stream_and_writef apparatus: now
always present in the source, even for builds (eg. non-diag 
varieties) in which it is not invoked.  (avoids ranlib warning on 
xcppgc).

Copied from Perforce
 Change: 162948
 ServerID: perforce.ravenbrook.com
2007-07-19 17:03:30 +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
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
Richard Kistruck
4df14dcbf8 Mps br/diag: rename #def "diagnostics" as "statistics", as all the
macros it controls are called "STATISTIC_blah", and same replacement 
in comments.  The term "diagnostic" means something else now: see 
design/diag/.

Copied from Perforce
 Change: 162692
 ServerID: perforce.ravenbrook.com
2007-06-29 14:08:00 +01:00
Richard Kistruck
6749f30dc0 Mps br/diag: diag-out with writef and diag_stream does not work in cet.
Hope to fix in time, but for now I need DIAG-out to work, so switch 
to printf (yes, really, I know, sorry).
Also, only do DIAG-out in variety.di, to avoid damage to .ci.
So for now, remove DIAG_WRITEF and DIAG from arenavm and trace.
To test, add DIAG_PRINTF in trace.

Copied from Perforce
 Change: 162387
 ServerID: perforce.ravenbrook.com
2007-05-21 16:28:50 +01:00
Richard Kistruck
b261b142fd Mps br/diag: variety.ii: now has diagnostics, and no logging (pro tem);
mpm.h: DIAG() et al under control of DIAGNOSTICS;
diag.c: under control of DIAGNOSTICS, plus add header and copyright.

Copied from Perforce
 Change: 162214
 ServerID: perforce.ravenbrook.com
2007-04-27 15:37:16 +01:00
Richard Kistruck
1a9477b2cf Mps br/diag: pass why reason down to tracestart.
Also: DIAG-out TraceStart reason, and -- if a non-monor collection -- 
 DIAG-out an ArenaDescribe.

Copied from Perforce
 Change: 162213
 ServerID: perforce.ravenbrook.com
2007-04-27 15:04:08 +01:00
David Jones
afbf0b8ce7 Mps: diag fixes.
Copied from Perforce
 Change: 162163
 ServerID: perforce.ravenbrook.com
2007-04-19 13:02:21 +01:00
David Jones
feecde4aaa Added diag and diag_writef
Copied from Perforce
 Change: 162160
 ServerID: perforce.ravenbrook.com
2007-04-19 11:32:08 +01:00
Richard Kistruck
7cb185f2b2 Mps integrate gcgenmsg into master:
- new mps_message_type_gc_start() explains what triggered a collection;
  - design/message: add guide.

Copied from Perforce
 Change: 161204
 ServerID: perforce.ravenbrook.com
2006-12-12 09:56:09 +00:00
David Jones
2a4b2d0bb7 Mps: now uses correct test for remembering / restoring
SegSummary.

Copied from Perforce
 Change: 64983
 ServerID: perforce.ravenbrook.com
2003-11-19 14:15:49 +00:00
David Jones
35130274eb Mps: implementing remember / restore protection for real.
Copied from Perforce
 Change: 64140
 ServerID: perforce.ravenbrook.com
2003-11-13 17:07:13 +00:00
David Jones
9e1db84c62 Mps: implementing mps_arena_expose
Copied from Perforce
 Change: 62949
 ServerID: perforce.ravenbrook.com
2003-11-04 12:34:54 +00:00
David Jones
05af441d05 Mps: can now call mps_arena_has_addr during
mps_arena_formatted_objects_walk.  test walkt0 is witness

Copied from Perforce
 Change: 50108
 ServerID: perforce.ravenbrook.com
2003-07-09 16:42:29 +01:00
David Jones
091cf2833d Mps: added mps_message_type_gc_start()
Copied from Perforce
 Change: 39781
 ServerID: perforce.ravenbrook.com
2003-02-19 16:34:08 +00:00
David Jones
da6044a59a Mps: added (untested) internals for messagetypegcstart
Copied from Perforce
 Change: 39768
 ServerID: perforce.ravenbrook.com
2003-02-19 13:27:16 +00:00
Nick Barnes
ca4af46f1d Second cut at opportunism.
Copied from Perforce
 Change: 37580
 ServerID: perforce.ravenbrook.com
2003-01-03 14:22:35 +00:00
Nick Barnes
c006b14a17 Here is one cut at opportunistically collecting the world. it's not very good.
Copied from Perforce
 Change: 37577
 ServerID: perforce.ravenbrook.com
2003-01-03 13:08:08 +00:00