Gareth Rees
784bc484ca
Poolfix is on the critical path, so use aver_critical rather than aver.
...
Copied from Perforce
Change: 184693
ServerID: perforce.ravenbrook.com
2014-03-08 10:23:09 +00:00
Gareth Rees
cf4d9b0596
Ensure that djbench and gcbench compile on freebsd:
...
Link fmtdy with gcbench.
RESERVE_ALLOC in djbench ignores the return values from mps_reserve and mps_commit.
Don't include alloca.h -- alloca is in stdlib.h.
Rename start, finish to begin, end to avoid "local variable shadows global" error from gcc.
Copied from Perforce
Change: 184691
ServerID: perforce.ravenbrook.com
2014-03-08 00:36:32 +00:00
Gareth Rees
d2b6956f6a
Add locbwcss and locusss to the test suite on os x, freebsd and linux.
...
Add const qualifier so that locbwcss and locusss compile without warnings.
Build djbench and gcbench on FreeBSD and Linux.
Don't include <alloca.h> -- alloca is in stdlib.h.
Copied from Perforce
Change: 184689
ServerID: perforce.ravenbrook.com
2014-03-08 00:24:04 +00:00
Gareth Rees
690ddfdde4
Delete .gdbinit: it hasn't been necessary to "handle sigbus nostop" on os x since the we started using mach exceptions (change 183002).
...
Copied from Perforce
Change: 184678
ServerID: perforce.ravenbrook.com
2014-03-07 19:02:05 +00:00
Gareth Rees
f40425bef2
Ensure that the mps builds on windows by adding <sa> to mpmcommon.
...
Copied from Perforce
Change: 184675
ServerID: perforce.ravenbrook.com
2014-03-07 17:24:46 +00:00
Gareth Rees
00898bf2e9
Fix the aver: need two slots in the array, not just one.
...
Copied from Perforce
Change: 184545
ServerID: perforce.ravenbrook.com
2014-02-26 12:51:30 +00:00
Gareth Rees
6971bee496
Make mps_args_done obsolete.
...
Copied from Perforce
Change: 184543
ServerID: perforce.ravenbrook.com
2014-02-26 12:47:27 +00:00
Richard Brooksby
3dcb5c3ea1
Merging bug fix for gcbench exit from development branch.
...
Copied from Perforce
Change: 184506
ServerID: perforce.ravenbrook.com
2014-02-25 01:49:49 +00:00
Richard Brooksby
5ac2b0b14e
Bug fix. gcbench attempted to delete a nonexistent chain by default.
...
Copied from Perforce
Change: 184497
ServerID: perforce.ravenbrook.com
2014-02-24 23:03:10 +00:00
Richard Brooksby
5f9e072412
Bug fix. nonsensical case in cbsfindlargest when size is passed as zero.
...
Added RangeCopy.
Copied from Perforce
Change: 184496
ServerID: perforce.ravenbrook.com
2014-02-24 23:02:42 +00:00
Richard Brooksby
7db856f7b8
Fixed a bug in cbsfindlargest where it always deleted the entire range found even when finddeletelow or finddeletehigh were passed.
...
Copied from Perforce
Change: 184493
ServerID: perforce.ravenbrook.com
2014-02-24 22:48:48 +00:00
Richard Brooksby
a28fda3fc5
Making assertions in cbsupdatenode critical, since this is extremely hot in any cbs with fast find.
...
Copied from Perforce
Change: 184492
ServerID: perforce.ravenbrook.com
2014-02-24 22:27:16 +00:00
Richard Brooksby
dc38189d5c
Adding rangeisempty.
...
Copied from Perforce
Change: 184491
ServerID: perforce.ravenbrook.com
2014-02-24 22:26:22 +00:00
Richard Brooksby
018653d160
Fixing compiler warning.
...
Copied from Perforce
Change: 184490
ServerID: perforce.ravenbrook.com
2014-02-24 22:25:48 +00:00
Gareth Rees
c1ef37731a
Refactor the computation of the chunk size into its own function, thus avoiding an "unreachable code" error from clang.
...
Copied from Perforce
Change: 184482
ServerID: perforce.ravenbrook.com
2014-02-24 21:32:22 +00:00
Richard Brooksby
4f73fc5afe
Initial hack at replacing the arena control pool with mvff.
...
Copied from Perforce
Change: 184489
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:41 +00:00
Richard Brooksby
b876c0ff82
Only finishing the cbs block pool when cbs created it. oops.
...
Copied from Perforce
Change: 184488
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00
Richard Brooksby
57c9c5aac8
Finishing the mvff block pool. oops.
...
Copied from Perforce
Change: 184487
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00
Richard Brooksby
5fc0d82d6a
Initialising a shared inline mfs for the cbss in mvff so that mvff can be used as the arena’s bootstrap and control pool.
...
Copied from Perforce
Change: 184486
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:40 +00:00
Richard Brooksby
bdd84a3a0f
Bug fix. ensuring cbsfinddeleterange returns oldrangereturn even if it doesn’t delete a block.
...
Copied from Perforce
Change: 184485
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:39 +00:00
Richard Brooksby
02fd3498d8
Catch-up merge from master, mainly to pick up gcbench fix.
...
Copied from Perforce
Change: 184480
ServerID: perforce.ravenbrook.com
2014-02-24 21:14:13 +00:00
Gareth Rees
09dd8e7027
Avoid use of unreachable code in protcatchthread on os x.
...
Copied from Perforce
Change: 184478
ServerID: perforce.ravenbrook.com
2014-02-24 18:07:14 +00:00
Richard Brooksby
05a2713826
Reforming mvff pool class to avoid using segments and to actually have a chance to return memory to the arena.
...
Copied from Perforce
Change: 184467
ServerID: perforce.ravenbrook.com
2014-02-23 21:00:53 +00:00
Richard Brooksby
a8720f2615
Adding cbssize and freelistsize functions to calculate the size of freelist contents.
...
Copied from Perforce
Change: 184466
ServerID: perforce.ravenbrook.com
2014-02-23 20:59:44 +00:00
David Lovemore
c34562d0d4
Add pin-leaf option to gcbench.
...
Remove default chain from gcbench.
Copied from Perforce
Change: 184454
ServerID: perforce.ravenbrook.com
2014-02-23 13:44:54 +00:00
Richard Brooksby
8eb1c7b647
Making splaysplit and splayassemble general so that they can be used easily.
...
Copied from Perforce
Change: 184452
ServerID: perforce.ravenbrook.com
2014-02-23 12:18:18 +00:00
Richard Brooksby
bcdce5b35d
Returning the results of splitting in a structure so that it’s easier to pass them on to assemble.
...
Copied from Perforce
Change: 184451
ServerID: perforce.ravenbrook.com
2014-02-23 12:10:52 +00:00
Richard Brooksby
42a8ffbe6a
Removing unnecessary case of splaying empty trees.
...
Copied from Perforce
Change: 184450
ServerID: perforce.ravenbrook.com
2014-02-23 11:52:21 +00:00
Richard Brooksby
1ac9877082
Adding a signature to splay tree structure. miscellaneous documentation and naming clean-up.
...
Copied from Perforce
Change: 184448
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
29cba255f2
Pointer-reversing splay and assemble to avoid double traversal of side tree spines in the update case.
...
Copied from Perforce
Change: 184447
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
96be04cb42
Lifting zig and zag cases into common prefix to shorten splaysplit. a few percent faster.
...
Copied from Perforce
Change: 184446
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
660c0821d6
Moving downward splay updates to after side tree linkage, allowing the optimiser to do a better job. produces about 10% speedup: xc/release/djbench -x 1234 --sshift 8 mvff
...
Copied from Perforce
Change: 184445
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a52bb1d3ea
Implementing pointer-reversing tree traversal that does not disturb the tree shape, unlike the splay tree traversal, which flattens the tree into a list. replacing cbsiterate with this, knocking about 25% off the runtime of the test case: xc/release/djbench -x 1234 --sshift 8 mvff
...
Copied from Perforce
Change: 184444
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
4e1d9e6a96
Optimising splaytreeneighbours by observing that once one neighbour is found, the other neighbour is already in our hand in one of the side trees. this reduces the number of splays when coalescing.
...
Copied from Perforce
Change: 184443
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d48028902e
Specialising left and right splay tree searches where no comparisons are necessary.
...
Copied from Perforce
Change: 184442
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
17b72c3052
Adding tree integrity check debugging function.
...
Copied from Perforce
Change: 184441
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
fee5ac310e
Eliminating redundant passing of tree keys by adding a method to extract the key from a tree node.
...
Copied from Perforce
Change: 184440
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
2bb859f62b
Avoid dropping children of found node in non-update case. oops.
...
Copied from Perforce
Change: 184439
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
f951709e99
Lifting out pointer-reversed updates.
...
Copied from Perforce
Change: 184438
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
93a0ffe8ee
Generalising pointer reversal of tree spines.
...
Copied from Perforce
Change: 184437
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
35ab73ab4a
Reducing excessive punctuation and removing unnecessary goto cases in splaysplay.
...
Copied from Perforce
Change: 184436
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6eef655629
Avoiding general compare when searching for first and last nodes in a tree.
...
Copied from Perforce
Change: 184435
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6219c50ca1
Fixing splaytreefind on empty tree. oops.
...
Regression test: xc/Debug/fbmtest 215526357
Copied from Perforce
Change: 184434
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
5cdcef0154
Splaysplay returns a compare to indicate the relationship of the new tree root to the key, eliminating some redundant tests, and making it more like treefind.
...
Allowing SplayTreeNext to deal with modification during iteration, so that iteration can be used to delete trees, for example.
Copied from Perforce
Change: 184433
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
15c5b6dfc5
Fixing abuses of res and resfail in the splay tree interface.
...
Copied from Perforce
Change: 184432
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
6bc35c5ca0
Generalising splayrotate operations into treerotates.
...
Copied from Perforce
Change: 184431
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
c446abda38
Replacing null with treeempty where that is intended.
...
Copied from Perforce
Change: 184430
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
d04f3c0bc4
Distinguishing tree keys (treekey) from generic void *.
...
Copied from Perforce
Change: 184429
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
27373efc5c
Unifying splaycomparemethod with treecompare.
...
Copied from Perforce
Change: 184428
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00
Richard Brooksby
a6d87c91a8
Simplifying splay tree update prototype and removing special null case.
...
Copied from Perforce
Change: 184427
ServerID: perforce.ravenbrook.com
2014-02-23 10:41:15 +00:00