Reviewers: Benedikt Meurer, Toon Verwaest,

Message:
Benedikt, please take a look.

Description:
This is the exact copy of r17365 which was reverted in r17488 due to memory
corruption. The root cause for the memory corruption - missing check for bump
pointer limit before storing filler map must be addressed in r17626 where
allocation hooks were removed from the generated code and left only in the
runtime.

This is initial implementation of allocation profiler.

Whenever new object allocation is reported to the HeapProfiler and allocation tracking is on we will capture current stack trace, add it to the collection of the allocation traces (a tree) and attribute the allocated size to the top JS
function on the stack.

Format of serialized heap snapshot is extended to include information about
recorded allocation stack traces.

This patch is r17301 plus a fix for the test crash in debug mode. The test
crashed because we were traversing stack trace when just allocated object wasn't completely configured, in particular the map pointer was incorrect. Invalid Map pointer broke heap iteration required to find Code object for a given pc during
stack traversal. The solution is to insert free space filler in the newly
allocated block just before collecting stack trace.

BUG=chromium:277984,v8:2949

Please review this at https://codereview.chromium.org/61893031/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+694, -5 lines):
  A src/allocation-tracker.h
  A src/allocation-tracker.cc
  M src/heap-snapshot-generator.h
  M src/heap-snapshot-generator.cc
  M test/cctest/test-heap-profiler.cc
  M tools/gyp/v8.gyp


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to