Title: [203000] trunk/Source/_javascript_Core
- Revision
- 203000
- Author
- [email protected]
- Date
- 2016-07-08 11:56:31 -0700 (Fri, 08 Jul 2016)
Log Message
Dumping the object graph doesn't work with verbose GC logging
https://bugs.webkit.org/show_bug.cgi?id=159569
Reviewed by Mark Lam.
The current object graph logging code tries to revisits the graph. This doesn't work
correctly and asking around it isn't used. The only way to dump the true object graph
is to log while we GC and that has obvious performance implications.
Therefore I eliminated GCLogging::dumpObjectGraph() and related code.
* heap/GCLogging.cpp:
(JSC::GCLogging::levelAsString):
(JSC::LoggingFunctor::LoggingFunctor): Deleted.
(JSC::LoggingFunctor::~LoggingFunctor): Deleted.
(JSC::LoggingFunctor::operator()): Deleted.
(JSC::LoggingFunctor::log): Deleted.
(JSC::LoggingFunctor::reviveCells): Deleted.
(JSC::LoggingFunctor::returnValue): Deleted.
(JSC::GCLogging::dumpObjectGraph): Deleted.
* heap/Heap.cpp:
(JSC::Heap::didFinishCollection):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (202999 => 203000)
--- trunk/Source/_javascript_Core/ChangeLog 2016-07-08 18:52:34 UTC (rev 202999)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-07-08 18:56:31 UTC (rev 203000)
@@ -1,3 +1,27 @@
+2016-07-08 Michael Saboff <[email protected]>
+
+ Dumping the object graph doesn't work with verbose GC logging
+ https://bugs.webkit.org/show_bug.cgi?id=159569
+
+ Reviewed by Mark Lam.
+
+ The current object graph logging code tries to revisits the graph. This doesn't work
+ correctly and asking around it isn't used. The only way to dump the true object graph
+ is to log while we GC and that has obvious performance implications.
+ Therefore I eliminated GCLogging::dumpObjectGraph() and related code.
+
+ * heap/GCLogging.cpp:
+ (JSC::GCLogging::levelAsString):
+ (JSC::LoggingFunctor::LoggingFunctor): Deleted.
+ (JSC::LoggingFunctor::~LoggingFunctor): Deleted.
+ (JSC::LoggingFunctor::operator()): Deleted.
+ (JSC::LoggingFunctor::log): Deleted.
+ (JSC::LoggingFunctor::reviveCells): Deleted.
+ (JSC::LoggingFunctor::returnValue): Deleted.
+ (JSC::GCLogging::dumpObjectGraph): Deleted.
+ * heap/Heap.cpp:
+ (JSC::Heap::didFinishCollection):
+
2016-07-08 Keith Miller <[email protected]>
speculateTypedArrayIsNotNeutered has an inverted speculation
Modified: trunk/Source/_javascript_Core/heap/GCLogging.cpp (202999 => 203000)
--- trunk/Source/_javascript_Core/heap/GCLogging.cpp 2016-07-08 18:52:34 UTC (rev 202999)
+++ trunk/Source/_javascript_Core/heap/GCLogging.cpp 2016-07-08 18:56:31 UTC (rev 203000)
@@ -50,69 +50,6 @@
}
}
-class LoggingFunctor {
-public:
- LoggingFunctor(SlotVisitor& slotVisitor)
- : m_slotVisitor(slotVisitor)
- {
- m_savedMarkStack.resize(m_slotVisitor.markStack().size());
- m_slotVisitor.markStack().fillVector(m_savedMarkStack);
- }
-
- ~LoggingFunctor()
- {
- reviveCells();
- }
-
- IterationStatus operator()(JSCell* cell)
- {
- m_liveCells.append(cell);
- MarkedBlock::blockFor(cell)->clearMarked(cell);
- return IterationStatus::Continue;
- }
-
- void log()
- {
- m_slotVisitor.clearMarkStack();
- for (JSCell* cell : m_liveCells) {
- cell->methodTable()->visitChildren(cell, m_slotVisitor);
- dataLog("\n", *cell, ":\n", m_slotVisitor);
- for (const JSCell* neighbor : m_slotVisitor.markStack())
- MarkedBlock::blockFor(neighbor)->clearMarked(neighbor);
- m_slotVisitor.clearMarkStack();
- }
- m_slotVisitor.reset();
- }
-
- void reviveCells()
- {
- for (JSCell* cell : m_liveCells)
- MarkedBlock::blockFor(cell)->setMarked(cell);
-
- for (const JSCell* cell : m_savedMarkStack) {
- m_slotVisitor.markStack().append(cell);
- cell->setCellState(CellState::OldGrey);
- }
- }
-
- typedef void ReturnType;
-
- void returnValue() { };
-
-private:
- Vector<const JSCell*> m_savedMarkStack;
- Vector<JSCell*> m_liveCells;
- SlotVisitor& m_slotVisitor;
-};
-
-void GCLogging::dumpObjectGraph(Heap* heap)
-{
- LoggingFunctor loggingFunctor(heap->m_slotVisitor);
- HeapIterationScope iterationScope(*heap);
- heap->objectSpace().forEachLiveCell(iterationScope, loggingFunctor);
- loggingFunctor.log();
-}
-
} // namespace JSC
namespace WTF {
Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (202999 => 203000)
--- trunk/Source/_javascript_Core/heap/Heap.cpp 2016-07-08 18:52:34 UTC (rev 202999)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp 2016-07-08 18:56:31 UTC (rev 203000)
@@ -1463,9 +1463,6 @@
if (Options::dumpObjectStatistics())
HeapStatistics::dumpObjectStatistics(this);
- if (Options::logGC() == GCLogging::Verbose)
- GCLogging::dumpObjectGraph(this);
-
if (HeapProfiler* heapProfiler = m_vm->heapProfiler()) {
gatherExtraHeapSnapshotData(*heapProfiler);
removeDeadHeapSnapshotNodes(*heapProfiler);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes