Heap profiler: implement diffing of snapshots.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 15 Jul 2010 13:21:50 +0000 (13:21 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 15 Jul 2010 13:21:50 +0000 (13:21 +0000)
commitc98ac6e82c51d2ca5320fe75a23a87d0568ecce6
treec6b59a06bb10110b9c34c64e988afcc7cf3a3d88
parentdd06f4f102f479fb34119fdd2f13fab42fe85aac
Heap profiler: implement diffing of snapshots.

To trace objects between snapshots, an external map of object tags is
maintained. After the first heap snapshot has been taken, the map is
updated by reporting object moves from the GC. If no snapshots were
taken, there is no overhead (except for flag checking).

I considered graph comparison algorithms that doesn't require using
object tags, but they are all of a high computational complexity, and
will still fail to detect object moves properly, even for trivial
cases, so using tags looks like unavoidable.

Review URL: http://codereview.chromium.org/3020002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
include/v8-profiler.h
src/api.cc
src/checks.h
src/heap-profiler.cc
src/heap-profiler.h
src/heap.cc
src/mark-compact.cc
src/profile-generator.cc
src/profile-generator.h
test/cctest/test-heap-profiler.cc