[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:06:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f67a9641b471aa030b8fda92494b2bb1df463825
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 22 08:13:09 2002 +0000
- a simple change for .4% gain on ibench - instead of unmarking
all objects at the start of collection, instead unmark as part of
the sweep phase
* kjs/collector.cpp:
(Collector::collect): Remove separate unmarking pass and instead
unmark the objects that don't get collected during the sweep
phase.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index dbab786..56c82a7 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2002-11-22 Maciej Stachowiak <mjs at apple.com>
+
+ - a simple change for .5% gain on ibench - instead of unmarking
+ all objects at the start of collection, instead unmark as part of
+ the sweep phase
+
+ * kjs/collector.cpp:
+ (Collector::collect): Remove separate unmarking pass and instead
+ unmark the objects that don't get collected during the sweep
+ phase.
+
2002-11-21 Darin Adler <darin at apple.com>
- stop garbage collecting the ActivationImp objects, gets 3% on iBench
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index dbab786..56c82a7 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,3 +1,14 @@
+2002-11-22 Maciej Stachowiak <mjs at apple.com>
+
+ - a simple change for .5% gain on ibench - instead of unmarking
+ all objects at the start of collection, instead unmark as part of
+ the sweep phase
+
+ * kjs/collector.cpp:
+ (Collector::collect): Remove separate unmarking pass and instead
+ unmark the objects that don't get collected during the sweep
+ phase.
+
2002-11-21 Darin Adler <darin at apple.com>
- stop garbage collecting the ActivationImp objects, gets 3% on iBench
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index dbab786..56c82a7 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2002-11-22 Maciej Stachowiak <mjs at apple.com>
+
+ - a simple change for .5% gain on ibench - instead of unmarking
+ all objects at the start of collection, instead unmark as part of
+ the sweep phase
+
+ * kjs/collector.cpp:
+ (Collector::collect): Remove separate unmarking pass and instead
+ unmark the objects that don't get collected during the sweep
+ phase.
+
2002-11-21 Darin Adler <darin at apple.com>
- stop garbage collecting the ActivationImp objects, gets 3% on iBench
diff --git a/JavaScriptCore/kjs/collector.cpp b/JavaScriptCore/kjs/collector.cpp
index a9764e7..ba1b2ea 100644
--- a/JavaScriptCore/kjs/collector.cpp
+++ b/JavaScriptCore/kjs/collector.cpp
@@ -160,17 +160,8 @@ void* Collector::allocate(size_t s)
bool Collector::collect()
{
bool deleted = false;
- // MARK: first unmark everything
- for (int block = 0; block < heap.usedBlocks; block++) {
- for (int cell = 0; cell < CELLS_PER_BLOCK; cell++) {
- ((ValueImp *)(heap.blocks[block]->cells + cell))->_flags &= ~ValueImp::VI_MARKED;
- }
- }
- for (int cell = 0; cell < heap.usedOversizeCells; cell++) {
- ((ValueImp *)heap.oversizeCells[cell])->_flags &= ~ValueImp::VI_MARKED;
- }
-
- // mark all referenced objects recursively
+
+ // MARK: first mark all referenced objects recursively
// starting out from the set of root objects
if (InterpreterImp::s_hook) {
InterpreterImp *scr = InterpreterImp::s_hook;
@@ -204,8 +195,8 @@ bool Collector::collect()
imp->mark();
}
}
-
- // SWEEP: delete everything with a zero refcount (garbage)
+
+ // SWEEP: delete everything with a zero refcount (garbage) and unmark everything else
int emptyBlocks = 0;
@@ -213,17 +204,20 @@ bool Collector::collect()
for (int wordInBitmap = 0; wordInBitmap < BITMAP_SIZE; wordInBitmap++) {
uint32_t word = heap.blocks[block]->bitmap[wordInBitmap];
for (int bitInWord = 0; bitInWord < BITS_PER_WORD; bitInWord++) {
- ValueImp *imp = (ValueImp *)(heap.blocks[block]->cells + BITS_PER_WORD * wordInBitmap + bitInWord);
- if ((word & (1 << bitInWord)) &&
- !imp->refcount && imp->_flags == (ValueImp::VI_GCALLOWED | ValueImp::VI_CREATED)) {
- // emulate destructing part of 'operator delete()'
- //fprintf( stderr, "Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name());
- imp->~ValueImp();
- heap.blocks[block]->bitmap[wordInBitmap] &= ~(1 << bitInWord);
- heap.blocks[block]->usedCells--;
- heap.numLiveObjects--;
- deleted = true;
+ if (word & (1 << bitInWord)) {
+ ValueImp *imp = (ValueImp *)(heap.blocks[block]->cells + BITS_PER_WORD * wordInBitmap + bitInWord);
+ if (!imp->refcount && imp->_flags == (ValueImp::VI_GCALLOWED | ValueImp::VI_CREATED)) {
+ //fprintf( stderr, "Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name());
+ // emulate destructing part of 'operator delete()'
+ imp->~ValueImp();
+ heap.blocks[block]->bitmap[wordInBitmap] &= ~(1 << bitInWord);
+ heap.blocks[block]->usedCells--;
+ heap.numLiveObjects--;
+ deleted = true;
+ } else {
+ imp->_flags &= ~ValueImp::VI_MARKED;
+ }
}
}
}
@@ -246,7 +240,6 @@ bool Collector::collect()
}
}
-
int cell = 0;
while (cell < heap.usedOversizeCells) {
@@ -271,6 +264,7 @@ bool Collector::collect()
}
} else {
+ imp->_flags &= ~ValueImp::VI_MARKED;
cell++;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list