Fix issue 571: display descriptive names for code objects from snapshot.
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Jan 2010 16:04:25 +0000 (16:04 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Jan 2010 16:04:25 +0000 (16:04 +0000)
commit37d3972429bd5dcba32cbc5c16b279e1d1ff4bf4
tree5af04a9d4be581ea7ac860230a61d099bb76d7fd
parent5d60fa7ac85e775dd03951ced422ff967e68afc5
Fix issue 571: display descriptive names for code objects from snapshot.

As this is only needed for internal profiling (not for DevTools),
the following approach had been chosen:

 - during snapshot creation, positions of serialized objects inside
   a snapshot are logged;

 - then during V8 initialization, positions of deserealized objects
   are logged;

 - those positions are used for retrieving code objects names from
   snapshot creation log, which needs to be supplied to tick processor
   script.

Positions logging is controlled with the new flag: --log_snapshot_positions.
This flag is turned off by default, and this adds no startup penalty.

To plug this fix to Golem, the following actions are needed:

 - logs created using 'mksnapshot' need to be stored along with VM images;

 - tick processor script needs to be run with '--snapshot-log=...' cmdline
   argument.

BUG=571

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/SConscript
src/flag-definitions.h
src/log.cc
src/log.h
src/mksnapshot.cc
src/serialize.cc
src/serialize.h
src/snapshot-common.cc
tools/profile.js
tools/tickprocessor-driver.js
tools/tickprocessor.js