Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Issue 61893031: Reland "Record allocation stack traces" (Closed)

Created:
7 years, 1 month ago by yurys
Modified:
7 years, 1 month ago
CC:
v8-dev, loislo, alph, Hannes Payer (out of office)
Visibility:
Public.

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 R=bmeurer@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=17742

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+694 lines, -5 lines) Patch
A src/allocation-tracker.h View 1 chunk +138 lines, -0 lines 0 comments Download
A src/allocation-tracker.cc View 1 chunk +279 lines, -0 lines 0 comments Download
M src/heap-snapshot-generator.h View 6 chunks +10 lines, -3 lines 0 comments Download
M src/heap-snapshot-generator.cc View 9 chunks +160 lines, -2 lines 0 comments Download
M test/cctest/test-heap-profiler.cc View 3 chunks +105 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
yurys
Benedikt, please take a look.
7 years, 1 month ago (2013-11-14 10:49:18 UTC) #1
Benedikt Meurer
LGTM
7 years, 1 month ago (2013-11-14 11:21:55 UTC) #2
yurys
7 years, 1 month ago (2013-11-14 12:13:37 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 manually as r17742 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698