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

Issue 34733004: Record allocation stack traces (Closed)

Created:
7 years, 2 months ago by yurys
Modified:
7 years, 2 months ago
CC:
v8-dev
Visibility:
Public.

Description

Record allocation stack traces 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=hpayer@chromium.org, loislo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=17365

Patch Set 1 #

Patch Set 2 : Fixed test crash in debug mode #

Patch Set 3 : Reverted changes to features.gypi #

Patch Set 4 : Rebase #

Patch Set 5 : Reverted crash fix #

Patch Set 6 : Mark allocated block as FreeSpace before iterating call stack #

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 2 3 4 5 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: 13 (0 generated)
yurys
Hannes, please review the part that changed compared to r17301 which you have already reviewed. ...
7 years, 2 months ago (2013-10-23 08:33:21 UTC) #1
loislo
lgtm
7 years, 2 months ago (2013-10-23 10:07:41 UTC) #2
Hannes Payer (out of office)
So the problem is that the map pointer is not set in the newly allocated ...
7 years, 2 months ago (2013-10-23 10:51:02 UTC) #3
loislo
On 2013/10/23 10:51:02, Hannes Payer wrote: > So the problem is that the map pointer ...
7 years, 2 months ago (2013-10-23 11:04:48 UTC) #4
yurys
On 2013/10/23 10:51:02, Hannes Payer wrote: > So the problem is that the map pointer ...
7 years, 2 months ago (2013-10-23 11:08:05 UTC) #5
loislo
On 2013/10/23 11:08:05, Yury Semikhatsky wrote: > On 2013/10/23 10:51:02, Hannes Payer wrote: > > ...
7 years, 2 months ago (2013-10-23 11:12:45 UTC) #6
Hannes Payer (out of office)
Additionally, since we fixed the allocation behavior that everything goes through Heap::AllocateRaw, can you add ...
7 years, 2 months ago (2013-10-23 11:37:06 UTC) #7
Hannes Payer (out of office)
Ignore my last comment, we are not there yet. But we may be soon.
7 years, 2 months ago (2013-10-23 11:44:29 UTC) #8
yurys
On 2013/10/23 11:44:29, Hannes Payer wrote: > Ignore my last comment, we are not there ...
7 years, 2 months ago (2013-10-23 11:47:54 UTC) #9
Hannes Payer (out of office)
On 2013/10/23 11:47:54, Yury Semikhatsky wrote: > On 2013/10/23 11:44:29, Hannes Payer wrote: > > ...
7 years, 2 months ago (2013-10-23 11:51:08 UTC) #10
yurys
On 2013/10/23 10:51:02, Hannes Payer wrote: > So the problem is that the map pointer ...
7 years, 2 months ago (2013-10-23 12:06:28 UTC) #11
Hannes Payer (out of office)
LGTM
7 years, 2 months ago (2013-10-24 08:18:02 UTC) #12
yurys
7 years, 2 months ago (2013-10-24 09:27:06 UTC) #13
Message was sent while issue was closed.
Committed patchset #6 manually as r17365 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698