https://bugs.webkit.org/show_bug.cgi?id=76855
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 02:02:50 +0000 (02:02 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 02:02:50 +0000 (02:02 +0000)
commit1e5e511129f06da32e880c4638a4f5360ab9880e
tree571e40ad40dfe66402e43a21fd67a5ab94f447f2
parent357e98a0e2d62a648b3fefc2aaee47e18577d8f2
https://bugs.webkit.org/show_bug.cgi?id=76855
Implement a JIT-code aware sampling profiler for JSC

Reviewed by Oliver Hunt.

Add support to MetaAllocator.cpp to track all live handles in a map,
allowing lookup based on any address within the allocation.

* wtf/MetaAllocator.cpp:
(WTF::MetaAllocatorTracker::notify):
(WTF::MetaAllocatorTracker::release):
    - Track live handle objects in a map.
(WTF::MetaAllocator::release):
    - Removed support for handles with null m_allocator (no longer used).
    - Notify the tracker of handles being released.
(WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
    - Moved functionality out into MetaAllocator::release.
(WTF::MetaAllocatorHandle::shrink):
    - Removed support for handles with null m_allocator (no longer used).
(WTF::MetaAllocator::MetaAllocator):
    - Initialize m_tracker.
(WTF::MetaAllocator::allocate):
    - Notify the tracker of new allocations.
* wtf/MetaAllocator.h:
(WTF::MetaAllocatorTracker::find):
    - Lookup a MetaAllocatorHandle based on an address inside the allocation.
(WTF::MetaAllocator::trackAllocations):
    - Register a callback object to track allocation state.
* wtf/MetaAllocatorHandle.h:
    - Remove unused createSelfManagedHandle/constructor.
(WTF::MetaAllocatorHandle::key):
    - Added, for use in RedBlackTree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/MetaAllocator.cpp
Source/JavaScriptCore/wtf/MetaAllocator.h
Source/JavaScriptCore/wtf/MetaAllocatorHandle.h