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

Issue 24957003: Add tool to visualize machine code/lithium. (Closed)

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

Description

Add tool to visualize machine code/lithium. In the process: - Add a command-line flag --opt-code-positions to track source position information throughout optimized code. - Add a subclass of the hydrogen graph builder to ensure that the source position is properly set on the graph builder for all generated hydrogen code. - Overhaul handling of source positions in hydrogen to ensure they are passed through to generated code consistently and in most cases transparently.

Patch Set 1 #

Patch Set 2 : Remove .DS_Store file #

Patch Set 3 : Add CSS #

Patch Set 4 : Fix style nits #

Patch Set 5 : Fix use strict #

Patch Set 6 : Fix small issues #

Patch Set 7 : Review first round of Dmitry's offline comments #

Patch Set 8 : Fix stuff #

Patch Set 9 : Implement x64 fully #

Patch Set 10 : Whitespace fixes #

Patch Set 11 : Tweak features #

Patch Set 12 : Implement all platforms #

Patch Set 13 : Final polish before review #

Total comments: 18

Patch Set 14 : Review feedback #

Patch Set 15 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+885 lines, -372 lines) Patch
src/arm/lithium-arm.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +0 lines, -11 lines 0 comments Download
src/arm/lithium-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -2 lines 0 comments Download
src/arm/lithium-codegen-arm.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -6 lines 0 comments Download
src/arm/lithium-codegen-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +6 lines, -20 lines 0 comments Download
src/code-stubs-hydrogen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -4 lines 0 comments Download
src/codegen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -1 line 0 comments Download
src/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +40 lines, -1 line 0 comments Download
src/flag-definitions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -0 lines 0 comments Download
src/hydrogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 23 chunks +75 lines, -50 lines 0 comments Download
src/hydrogen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 122 chunks +169 lines, -182 lines 0 comments Download
src/hydrogen-instructions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -1 line 0 comments Download
src/hydrogen-instructions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +13 lines, -0 lines 0 comments Download
src/hydrogen-osr.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
src/hydrogen-representation-changes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
src/ia32/lithium-codegen-ia32.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -6 lines 0 comments Download
src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +7 lines, -21 lines 0 comments Download
src/ia32/lithium-ia32.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +0 lines, -13 lines 0 comments Download
src/ia32/lithium-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +1 line, -3 lines 0 comments Download
src/lithium.h View 1 2 3 4 5 6 7 3 chunks +1 line, -4 lines 0 comments Download
src/lithium.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
src/lithium-codegen.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
src/lithium-codegen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -1 line 0 comments Download
src/x64/lithium-codegen-x64.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -6 lines 0 comments Download
src/x64/lithium-codegen-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +6 lines, -19 lines 0 comments Download
src/x64/lithium-x64.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +0 lines, -13 lines 0 comments Download
src/x64/lithium-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +1 line, -3 lines 0 comments Download
tools/sodium/index.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +36 lines, -0 lines 0 comments Download
tools/sodium/sodium.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +409 lines, -0 lines 0 comments Download
tools/sodium/styles.css View 1 2 3 4 5 6 7 8 9 10 1 chunk +70 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danno
PTAL. Dmitry, could you please check out the .js/.html code again? Michael, could you please ...
7 years, 2 months ago (2013-10-16 10:02:01 UTC) #1
Michael Starzinger
LGTM, only a few nits. I only reviewed the Crankshaft changes, didn't look at the ...
7 years, 2 months ago (2013-10-18 13:04:21 UTC) #2
Dmitry Lomov (no reviews)
LGTM Some style comments https://codereview.chromium.org/24957003/diff/32001/tools/sodium/index.html File tools/sodium/index.html (right): https://codereview.chromium.org/24957003/diff/32001/tools/sodium/index.html#newcode8 tools/sodium/index.html:8: <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> Are you sure ...
7 years, 2 months ago (2013-10-18 16:07:53 UTC) #3
danno
7 years, 2 months ago (2013-10-19 17:11:40 UTC) #4
I can't upload new patch sets of this CL, moving to:
https://codereview.chromium.org/29123008

https://codereview.chromium.org/24957003/diff/32001/src/codegen.cc
File src/codegen.cc (right):

https://codereview.chromium.org/24957003/diff/32001/src/codegen.cc#newcode138
src/codegen.cc:138: code->kind() == Code::FUNCTION;
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: Indentation is off.

Done.

https://codereview.chromium.org/24957003/diff/32001/src/flag-definitions.h
File src/flag-definitions.h (right):

https://codereview.chromium.org/24957003/diff/32001/src/flag-definitions.h#ne...
src/flag-definitions.h:827: DEFINE_bool(opt_code_positions, false, "annotate
optimize code with source code positions")
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: s/opt_code_positions/print_opt_code_positions/

Done.

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen-instructions...
src/hydrogen-instructions.cc:748: ASSERT(next->position() ==
RelocInfo::kNoPosition);
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: This if cascade looks awfully complex, especially because this ASSERT
will
> always hold. Can we merge that into just one if-statement?

Done.

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen-instructions...
src/hydrogen-instructions.cc:789: ASSERT(previous->position() ==
RelocInfo::kNoPosition);
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: Likewise.

Done.

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen-instructions...
src/hydrogen-instructions.cc:789: ASSERT(previous->position() ==
RelocInfo::kNoPosition);
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: Likewise.

Done.

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen.h
File src/hydrogen.h (right):

https://codereview.chromium.org/24957003/diff/32001/src/hydrogen.h#newcode195
src/hydrogen.h:195: // Add the inlined function exit sequence, adding an
HLeaveInlined
On 2013/10/18 13:04:21, Michael Starzinger wrote:
> nit: Can we add an empty new-line before the comment, makes it easier to read.

Done.

https://codereview.chromium.org/24957003/diff/32001/tools/sodium/index.html
File tools/sodium/index.html (right):

https://codereview.chromium.org/24957003/diff/32001/tools/sodium/index.html#n...
tools/sodium/index.html:8: <script
src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
On 2013/10/18 16:07:53, Dmitry Lomov (chromium) wrote:
> Are you sure you want to load it from there? It is an svn server hit.

Yeah, for now. It's ugly, but that what is recommended in the documentation and
because of some licensing issues I don't want to include a local copy yet.

https://codereview.chromium.org/24957003/diff/32001/tools/sodium/sodium.js
File tools/sodium/sodium.js (right):

https://codereview.chromium.org/24957003/diff/32001/tools/sodium/sodium.js#ne...
tools/sodium/sodium.js:366: asmDivElement.innerHTML = '<div id=\"asm-text\">' +
newHtml + '</div>';
On 2013/10/18 16:07:53, Dmitry Lomov (chromium) wrote:
> Use createElement here

Done.

https://codereview.chromium.org/24957003/diff/32001/tools/sodium/sodium.js#ne...
tools/sodium/sodium.js:394:
document.getElementById('log-file-id').addEventListener('change',
On 2013/10/18 16:07:53, Dmitry Lomov (chromium) wrote:
> Consider replacing getElementById with parameters to Sodium, populated from
the
> caller

Done.

Powered by Google App Engine
This is Rietveld 408576698