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

Issue 1640213002: [Interpreter] Add option to trace bytecode execution. (Closed)

Created:
4 years, 11 months ago by rmcilroy
Modified:
4 years, 10 months ago
Reviewers:
oth, Michael Starzinger
CC:
v8-reviews_googlegroups.com, oth, rmcilroy, Michael Hablich
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Add option to trace bytecode execution. Adds --trace-ignition flag which allows tracing of bytecodes as they execute. As well as printing out the bytecode, this also prints out the input and output registers to each operation. The generated output looks as follows: -> 0x350cb46d5264 (139) : 49 fc fb 03 07 Call r4, r5, #3, [7] [ accumulator -> 0x177fba00bc99 <JS Array[2]> ] [ r4 -> 0x350cb46ce099 <JS Function InstallFunctions (SharedFunctionInfo 0x350cb46470c1)> ] [ r5 -> 0x350cb46cddc1 <an Object with map 0x35fdf590a3a9> ] [ r6 -> 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] [ r7 -> 2 ] [ accumulator <- 0x350cb4604189 <undefined> ] -> 0x350cb46d5978 (47) : 4b f8 00 00 00 CallRuntime [248], r0, #0 [ accumulator -> 0x350cb4604189 <undefined> ] [ accumulator <- 0x350cb4604189 <undefined> ] -> 0x350cb46d597d (52) : 23 09 Ldar a0 [ accumulator -> 0x350cb4604189 <undefined> ] [ a0 -> 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] [ accumulator <- 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] -> 0x350cb46d597f (54) : 24 fd Star r3 [ accumulator -> 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] [ accumulator <- 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] [ r3 <- 0x350cb46d3f11 <JS Function Proxy (SharedFunctionInfo 0x350cb46d3e61)> ] Also adds support for --print_source and --print-ast to the interpreter. BUG=v8:4280 LOG=N Committed: https://crrev.com/6399fce56b534cdda130e50858d95d07d78c3754 Cr-Commit-Position: refs/heads/master@{#33594}

Patch Set 1 #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : Fix compile error #

Total comments: 14

Patch Set 4 : Review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -57 lines) Patch
M src/compiler/interpreter-assembler.h View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 2 3 11 chunks +28 lines, -22 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M src/interpreter/bytecode-array-iterator.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.cc View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 5 chunks +28 lines, -26 lines 0 comments Download
M src/interpreter/interpreter.cc View 3 chunks +30 lines, -1 line 0 comments Download
M src/objects.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/runtime/runtime-interpreter.cc View 1 2 3 2 chunks +106 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (11 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1640213002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1640213002/20001
4 years, 11 months ago (2016-01-27 12:15:54 UTC) #2
rmcilroy
Orion: Please review at the whole CL. Michi: Please review compiler changes.
4 years, 11 months ago (2016-01-27 12:17:12 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/2099)
4 years, 11 months ago (2016-01-27 12:28:43 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1640213002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1640213002/40001
4 years, 11 months ago (2016-01-27 13:24:54 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-27 14:02:36 UTC) #10
oth
Very nice. lgtm, thanks. https://codereview.chromium.org/1640213002/diff/20001/src/interpreter/bytecode-array-iterator.cc File src/interpreter/bytecode-array-iterator.cc (right): https://codereview.chromium.org/1640213002/diff/20001/src/interpreter/bytecode-array-iterator.cc#newcode119 src/interpreter/bytecode-array-iterator.cc:119: OperandType next_operand_type = Can you ...
4 years, 11 months ago (2016-01-27 15:10:09 UTC) #11
Michael Starzinger
LGTM. Just nits. https://codereview.chromium.org/1640213002/diff/40001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/1640213002/diff/40001/src/interpreter/interpreter.cc#newcode108 src/interpreter/interpreter.cc:108: // Regenerate table to add bytecode ...
4 years, 10 months ago (2016-01-28 12:07:06 UTC) #12
Michael Starzinger
https://codereview.chromium.org/1640213002/diff/40001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1640213002/diff/40001/src/compiler/interpreter-assembler.h#newcode181 src/compiler/interpreter-assembler.h:181: void CallEpilogue(); nit: Also the declaration of CallEpilogue can ...
4 years, 10 months ago (2016-01-28 12:32:26 UTC) #13
Michael Starzinger
https://codereview.chromium.org/1640213002/diff/40001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1640213002/diff/40001/src/compiler/interpreter-assembler.h#newcode217 src/compiler/interpreter-assembler.h:217: Node* bytecode_offset_; nit: Also, the {bytecode_offset} field can now ...
4 years, 10 months ago (2016-01-28 15:36:21 UTC) #14
rmcilroy
https://codereview.chromium.org/1640213002/diff/20001/src/interpreter/bytecode-array-iterator.cc File src/interpreter/bytecode-array-iterator.cc (right): https://codereview.chromium.org/1640213002/diff/20001/src/interpreter/bytecode-array-iterator.cc#newcode119 src/interpreter/bytecode-array-iterator.cc:119: OperandType next_operand_type = On 2016/01/27 15:10:09, oth wrote: > ...
4 years, 10 months ago (2016-01-28 16:39:51 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1640213002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1640213002/80001
4 years, 10 months ago (2016-01-28 16:40:35 UTC) #18
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-01-28 17:04:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1640213002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1640213002/80001
4 years, 10 months ago (2016-01-28 18:15:57 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 10 months ago (2016-01-28 18:17:43 UTC) #24
commit-bot: I haz the power
4 years, 10 months ago (2016-01-28 18:18:23 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/6399fce56b534cdda130e50858d95d07d78c3754
Cr-Commit-Position: refs/heads/master@{#33594}

Powered by Google App Engine
This is Rietveld 408576698