Implement heap snapshots serialization into JSON. API is designed
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Sep 2010 11:49:06 +0000 (11:49 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 14 Sep 2010 11:49:06 +0000 (11:49 +0000)
commit23880790515b91d1c9460f422c53e4abeab22ff6
tree1f4244884b28de9f3002ae0a6f15f150ce96e1a3
parent2edf58e97356642e7d0c9cd229ebf3c3b7d6a398
Implement heap snapshots serialization into JSON. API is designed
to avoid storing serialized snapshot on VM, instead it is emitted
using output stream interface.

The size of JSON emitted is roughly equal to used heap size
(when stored as an ASCII string).

Now a whole heap snapshot can be serialized and transmitted outside
VM. This makes possible:
  - implementing non-async UI for heap snapshots inspection;
  - storing heap snapshots for further inspection;
  - remote profiling (we can even implement a snapshotting mode
    where a snapshot isn't even stored in VM, only transmitted --
    good for mobile devices);
  - creating tools for outside heap snapshots processing, e.g.
    converting to HPROF.

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

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