Timestamp:
Aug 26, 2011, 3:23:43 PM (14 years ago)
Author:
[email protected]
Message:

The GC does not have a facility for profiling the kinds of objects
that occupy the heap
https://bugs.webkit.org/show_bug.cgi?id=66849

Reviewed by Geoffrey Garen.

Destructor calls and object scans are now optionally counted, per
vtable. When the heap is destroyed and profiling is enabled, the
counts are dumped, with care taken to print the names of classes
(modulo C++ mangling) sorted in descending commonality.

(JSC::Heap::destroy):

  • heap/Heap.h:
  • heap/MarkStack.cpp:

(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::drain):

  • heap/MarkStack.h:
  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::callDestructor):

  • heap/MarkedBlock.h:
  • heap/VTableSpectrum.cpp: Added.

(JSC::VTableSpectrum::VTableSpectrum):
(JSC::VTableSpectrum::~VTableSpectrum):
(JSC::VTableSpectrum::countVPtr):
(JSC::VTableSpectrum::count):
(JSC::VTableAndCount::VTableAndCount):
(JSC::VTableAndCount::operator<):
(JSC::VTableSpectrum::dump):

  • heap/VTableSpectrum.h: Added.
  • wtf/Platform.h:
File:
1 added

Note: See TracChangeset for help on using the changeset viewer.