Richard Brooksby
199a1261ed
Catch-up merge from master, mainly to pick up chain-zones merge.
...
Copied from Perforce
Change: 184343
ServerID: perforce.ravenbrook.com
2014-02-14 15:23:36 +00:00
Richard Brooksby
3077840ff8
Adding a cache of free pages per zone to the arena, so that we recycle single pages fast, especially after each reclaim.
...
Copied from Perforce
Change: 184324
ServerID: perforce.ravenbrook.com
2014-02-11 15:23:32 +00:00
Richard Brooksby
d206bd35b9
Changes from review comments made in < https://info.ravenbrook.com/mail/2014/01/31/13-40-25/0/ >.
...
ArenaSpareCommitExceeded changed to ArenaPurgeSpare so that the arena can properly reduce the amount of spare memory when setting the commit limit etc.
pagesMarkAllocated promptly unmaps page table pages in its error path.
Miscellaneous clarifications and extra checking.
Copied from Perforce
Change: 184267
ServerID: perforce.ravenbrook.com
2014-01-31 15:21:21 +00:00
Richard Brooksby
02962f64ca
Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
...
Copied from Perforce
Change: 184217
ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Richard Brooksby
6b4100e1b1
Since the dynamic generation is shared between chains (for some reason) using its unified zone set, rather than keeping a special zone set per chain, which would’ve used up more zones.
...
Using arena->topGen->mortality for the dynamic generation’s mortality, rather than a global variable.
Copied from Perforce
Change: 184216
ServerID: perforce.ravenbrook.com
2014-01-29 13:49:42 +00:00
Richard Brooksby
f906187add
iterating over segments using the pool and segment rings, rather than scanning the tract table, which may be full of irrelevant tracts, especially when non-gc pools are large. see < https://info.ravenbrook.com/mail/2014/01/25/12-16-09/0/ >.
...
Copied from Perforce
Change: 184120
ServerID: perforce.ravenbrook.com
2014-01-25 15:33:10 +00:00
Gareth Rees
75e5c45a53
Remove unused (and unusable) macros arenarootring() and arenatracering().
...
Copied from Perforce
Change: 183947
ServerID: perforce.ravenbrook.com
2014-01-12 11:19:35 +00:00
Gareth Rees
bcfad58d3c
Merge custom cet mainline into the master sources. this includes fixes for job003519 (clock values in text telemetry logs on windows have top 32 bits zero), job003536 (cet office can't replicate 100k snowmen in reasonable time), job003651 (stack overflows are not reliably handled).
...
Copied from Perforce
Change: 183926
ServerID: perforce.ravenbrook.com
2014-01-10 14:16:08 +00:00
Gareth Rees
09d0dfc481
Document the intention behind mps_ld_isstale rather than the implementation: it captures the intention of testing whether a particular dependency is stale (even though the implementation in fact tests whether any dependency is stale). add new function mps_ls_isstale_any for expressing the intention of testing whether any dependencey is stale. the two functions have the same implementation at present, but the separation gives us the freedom to return a more precise result from mps_ld_isstale in future.
...
Copied from Perforce
Change: 182816
ServerID: perforce.ravenbrook.com
2013-06-20 16:25:08 +01:00
Richard Brooksby
ac1e57c0ac
Merging branch/2013-05-17/emergency with major rework of mvt, mvff, and cbs.
...
Some parts of this are still ragged, and would not normally pass review, but this is a massive improvement to the existing code.
Copied from Perforce
Change: 182614
ServerID: perforce.ravenbrook.com
2013-06-08 10:57:57 +01:00
Gareth Rees
c44b1e0e31
Check that all addresses in the freed range belong to the pool, not just the base of the range.
...
Copied from Perforce
Change: 182602
ServerID: perforce.ravenbrook.com
2013-06-07 13:20:20 +01:00
Richard Brooksby
5926e279f3
Merging branch/2013-06-05/diag to eliminate the "diag" system. hurrah!
...
Copied from Perforce
Change: 182575
ServerID: perforce.ravenbrook.com
2013-06-06 14:56:47 +01:00
Gareth Rees
4e22988865
Remove diag facility.
...
Copied from Perforce
Change: 182553
ServerID: perforce.ravenbrook.com
2013-06-05 18:35:40 +01:00
Gareth Rees
e7559cf22f
Rename the enumeration cbsfinddelete to finddelete in anticipation of it being shared between cbs and new freelist module.
...
Since ABQDisposition enumeration only has two values, it's better to use Bool.
Copied from Perforce
Change: 182347
ServerID: perforce.ravenbrook.com
2013-05-31 00:09:33 +01:00
Gareth Rees
fa63d63b23
New public function mps_fmt_create_k creates an object format using the keyword argument interface.
...
Deprecate the format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s, mps_fmt_fixed_s) and the old interface (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header, mps_fmt_create_fixed).
Copied from Perforce
Change: 182277
ServerID: perforce.ravenbrook.com
2013-05-28 16:10:08 +01:00
Richard Brooksby
6d81499f35
Replacing duplicate *trivvarargs methods with a single implementation in args.c.
...
Copied from Perforce
Change: 181851
ServerID: perforce.ravenbrook.com
2013-05-16 13:10:01 +01:00
Richard Brooksby
a2c89c2c40
Making clear the size of the array of args passed to varargs conversion methods.
...
Copied from Perforce
Change: 181845
ServerID: perforce.ravenbrook.com
2013-05-16 03:12:11 +01:00
Richard Brooksby
1ab2cfe210
Eliminating unnecessary use of varargs in segment split and merge functions.
...
Copied from Perforce
Change: 181842
ServerID: perforce.ravenbrook.com
2013-05-16 03:02:20 +01:00
Richard Brooksby
a9ed62e39a
Converting varags on buffer and ap creation into keyword argument lists.
...
Copied from Perforce
Change: 181680
ServerID: perforce.ravenbrook.com
2013-05-09 18:25:53 +01:00
Richard Brooksby
8b430778b6
Replacing varargs passed to seginit with keyword argument list.
...
Copied from Perforce
Change: 181679
ServerID: perforce.ravenbrook.com
2013-05-09 17:34:01 +01:00
Richard Brooksby
97574b5298
Moving keyword argument declarations to their own header, since they're largely separable from the mps.
...
Copied from Perforce
Change: 181646
ServerID: perforce.ravenbrook.com
2013-05-08 23:09:35 +01:00
Richard Brooksby
e67939cabb
Pushing varargs decoding into a pool class method. much simpler.
...
Copied from Perforce
Change: 181642
ServerID: perforce.ravenbrook.com
2013-05-08 22:43:51 +01:00
Richard Brooksby
c623f7ac5f
Adding keyword argument checking for format and chain.
...
Copied from Perforce
Change: 181637
ServerID: perforce.ravenbrook.com
2013-05-08 16:29:12 +01:00
Richard Brooksby
a8afd8e6f4
Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
...
Copied from Perforce
Change: 181635
ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Richard Brooksby
714bf2aff2
Basically working keyword arguments, though vmparam is unsatisfactory.
...
Copied from Perforce
Change: 181545
ServerID: perforce.ravenbrook.com
2013-05-03 17:20:35 +01:00
Richard Brooksby
098bf44a5e
First draft of keyword arguments. mainly checking in in order to try working with git fusion on this branch.
...
Copied from Perforce
Change: 181538
ServerID: perforce.ravenbrook.com
2013-05-02 17:55:07 +01:00
Richard Brooksby
9f3c6c49bb
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
1a103e0a5a
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
f699efff8b
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
dd039bfbdc
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
f748ad2b28
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
4c51d72b56
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
e6e620f76c
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
b09c142565
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
24eb124aa4
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
0fd9448ad0
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
8fae691bac
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
e8380158a7
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
970b5f58da
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
98f3e3bdd2
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
33d05b4195
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
380ab1ec56
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
788aac4a8f
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
f8dfaf2b9a
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
beb476fd52
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
234b91ec5e
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
2b4cf6ca29
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
bac3560c2e
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
63d30f9160
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
49d7318def
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