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

Issue 2230953002: Use a custom Struct for stack trace storage (Closed)

Created:
4 years, 4 months ago by jgruber
Modified:
4 years, 4 months ago
Reviewers:
Yang, Toon Verwaest
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Refactor data structures for simple stack traces Simple stack traces are captured through Isolate::CaptureSimpleStackTrace. Captured frames are stored in a FixedArray, which in turn is stored as a property (using a private symbol) on the error object itself. Actual formatting of the textual stack trace is done lazily when the user reads the stack property of the error object. This would involve many conversions back and forth between index-encoded raw data (receiver, function, offset and code), JS CallSite objects, and C++ CallSite objects. This commit refactors the C++ CallSite class into a Struct class called StackTraceFrame, which is the new single point of truth frame information. Isolate::CaptureSimpleStackTrace stores an array of StackTraceFrames, and JS CallSite objects (now created only when the user specifies custom stack trace formatting through Error.prepareStackTrace) internally only store a reference to a StackTraceFrame. BUG= Committed: https://crrev.com/b4c1aefb9c369f1a33a6ca94a5de9b06ea4bf5c4 Cr-Commit-Position: refs/heads/master@{#38645}

Patch Set 1 #

Patch Set 2 : More work #

Patch Set 3 : Tweaks #

Patch Set 4 : Completely remove C++ CallSites #

Patch Set 5 : Readability & format #

Patch Set 6 : Tweaks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1008 lines, -939 lines) Patch
M include/v8.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/builtins/builtins-callsite.cc View 1 2 3 2 chunks +36 lines, -89 lines 0 comments Download
M src/execution.h View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M src/execution.cc View 1 2 3 1 chunk +0 lines, -25 lines 0 comments Download
M src/factory.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M src/heap-symbols.h View 1 1 chunk +1 line, -7 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 12 chunks +100 lines, -91 lines 0 comments Download
M src/messages.h View 1 2 3 4 2 chunks +0 lines, -44 lines 0 comments Download
M src/messages.cc View 1 2 3 4 5 chunks +87 lines, -668 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 chunks +85 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 1 chunk +610 lines, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M src/runtime/runtime-internal.cc View 1 2 3 4 1 chunk +13 lines, -7 lines 0 comments Download
M src/types.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (35 generated)
jgruber
4 years, 4 months ago (2016-08-12 08:16:18 UTC) #16
Yang
lgtm
4 years, 4 months ago (2016-08-12 13:39:29 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2230953002/60001
4 years, 4 months ago (2016-08-16 08:09:36 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-16 08:36:56 UTC) #30
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b4c1aefb9c369f1a33a6ca94a5de9b06ea4bf5c4 Cr-Commit-Position: refs/heads/master@{#38645}
4 years, 4 months ago (2016-08-16 08:37:19 UTC) #32
jgruber
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2252783007/ by jgruber@chromium.org. ...
4 years, 4 months ago (2016-08-18 08:01:25 UTC) #33
jgruber
4 years, 4 months ago (2016-08-19 06:43:43 UTC) #42
Hi Toon, could you please take a look at this? 

The main change from the first version is that StackTraceFrames are created at
format-time (in messages.cc), not capture-time.

Powered by Google App Engine
This is Rietveld 408576698