mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Backing out zone set summary in the cbs. this isn't needed for speed now that there's a cbs per zone in the arena, and it will slow down all other cbss.
Copied from Perforce Change: 184561 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
8f85caa56e
commit
4fdddc36e0
2 changed files with 1 additions and 25 deletions
|
|
@ -70,7 +70,6 @@ Bool CBSCheck(CBS cbs)
|
|||
CHECKL(SplayTreeCheck(splayTreeOfCBS(cbs)));
|
||||
/* nothing to check about splayTreeSize */
|
||||
CHECKD(Pool, cbs->blockPool);
|
||||
CHECKU(Arena, cbs->arena);
|
||||
CHECKL(BoolCheck(cbs->fastFind));
|
||||
CHECKL(BoolCheck(cbs->inCBS));
|
||||
CHECKL(BoolCheck(cbs->ownPool));
|
||||
|
|
@ -170,9 +169,7 @@ static void cbsUpdateNode(SplayTree tree, SplayNode node,
|
|||
SplayNode leftChild, SplayNode rightChild)
|
||||
{
|
||||
Size maxSize;
|
||||
ZoneSet zones;
|
||||
CBSBlock block;
|
||||
Arena arena;
|
||||
|
||||
AVERT(SplayTree, tree);
|
||||
AVERT(SplayNode, node);
|
||||
|
|
@ -184,25 +181,20 @@ static void cbsUpdateNode(SplayTree tree, SplayNode node,
|
|||
|
||||
block = cbsBlockOfSplayNode(node);
|
||||
maxSize = CBSBlockSize(block);
|
||||
arena = cbsOfSplayTree(tree)->arena;
|
||||
zones = ZoneSetOfRange(arena, CBSBlockBase(block), CBSBlockLimit(block));
|
||||
|
||||
if (leftChild != NULL) {
|
||||
Size size = cbsBlockOfSplayNode(leftChild)->maxSize;
|
||||
if (size > maxSize)
|
||||
maxSize = size;
|
||||
zones = ZoneSetUnion(zones, cbsBlockOfSplayNode(leftChild)->zones);
|
||||
}
|
||||
|
||||
if (rightChild != NULL) {
|
||||
Size size = cbsBlockOfSplayNode(rightChild)->maxSize;
|
||||
if (size > maxSize)
|
||||
maxSize = size;
|
||||
zones = ZoneSetUnion(zones, cbsBlockOfSplayNode(rightChild)->zones);
|
||||
}
|
||||
|
||||
block->maxSize = maxSize;
|
||||
block->zones = zones;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -232,7 +224,6 @@ Res CBSInit(Arena arena, CBS cbs, void *owner, Align alignment,
|
|||
if (ArgPick(&arg, args, MFSExtendSelf))
|
||||
extendSelf = arg.val.b;
|
||||
|
||||
cbs->arena = arena;
|
||||
SplayTreeInit(splayTreeOfCBS(cbs), &cbsSplayCompare,
|
||||
fastFind ? &cbsUpdateNode : NULL);
|
||||
|
||||
|
|
@ -819,20 +810,6 @@ static Bool cbsTestNodeInZones(SplayTree tree, SplayNode node,
|
|||
closure->arena, closure->zoneSet, closure->size);
|
||||
}
|
||||
|
||||
static Bool cbsTestTreeInZones(SplayTree tree, SplayNode node,
|
||||
void *closureP, Size closureSize)
|
||||
{
|
||||
CBSBlock block = cbsBlockOfSplayNode(node);
|
||||
cbsTestNodeInZonesClosure closure = closureP;
|
||||
|
||||
UNUSED(tree);
|
||||
AVER(closureSize == sizeof(cbsTestNodeInZonesClosureStruct));
|
||||
UNUSED(closureSize);
|
||||
|
||||
return block->maxSize >= closure->size &&
|
||||
ZoneSetInter(block->zones, closure->zoneSet) != ZoneSetEMPTY;
|
||||
}
|
||||
|
||||
Bool CBSFindFirstInZones(Range rangeReturn, Range oldRangeReturn,
|
||||
CBS cbs, Size size,
|
||||
Arena arena, ZoneSet zoneSet)
|
||||
|
|
@ -874,7 +851,7 @@ Bool CBSFindFirstInZones(Range rangeReturn, Range oldRangeReturn,
|
|||
closure.size = size;
|
||||
found = SplayFindFirst(&node, splayTreeOfCBS(cbs),
|
||||
&cbsTestNodeInZones,
|
||||
&cbsTestTreeInZones,
|
||||
&cbsTestTree,
|
||||
&closure, sizeof(closure));
|
||||
if (found) {
|
||||
CBSBlock block = cbsBlockOfSplayNode(node);
|
||||
|
|
|
|||
|
|
@ -615,7 +615,6 @@ typedef struct CBSStruct {
|
|||
SplayTreeStruct splayTree;
|
||||
STATISTIC_DECL(Count splayTreeSize);
|
||||
Pool blockPool;
|
||||
Arena arena; /* needed by update method */
|
||||
Align alignment;
|
||||
Bool fastFind;
|
||||
Bool inCBS; /* prevent reentrance */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue