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

Issue 140683011: Improve positions tracking inside the HGraphBuilder. (Closed)

Created:
6 years, 10 months ago by Vyacheslav Egorov (Chromium)
Modified:
6 years, 10 months ago
CC:
v8-dev, rsturgell, danno
Visibility:
Public.

Description

Improve positions tracking inside the HGraphBuilder. Instead of tracking simple absolute offset from the start of the script like other places do, track a pair of (inlining id, offset from the start of inlined function). This enables us to pinpoint with inlining path an instruction came from. Previously in multi-script environments we emitted positions that made very little sense because inside a single optimized function they would point to different scripts without a way to distinguish them. Start dumping the source of every inlined function to make possible IR viewing tools with integrated source views as there was previously no way to acquire this information from IR dumps. We also dump source position at which each inlining occured. Tracked positions are written into hydrogen.cfg as pos:<inlining-id>_<offset>. Flag --emit-opt-code-positions is renamed by this change into --hydrogen-track-positions to better convey it's meaning. In addition this change assigned global unique identifier to each optimization performed inside isolate. This allows to precisely match compilation artifacts (e.g. IR and disassembly) and deoptimizations. BUG= R=yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=19360

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -127 lines) Patch
M src/arm/lithium-codegen-arm.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/codegen.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler.h View 1 3 chunks +5 lines, -0 lines 0 comments Download
M src/compiler.cc View 1 5 chunks +9 lines, -5 lines 0 comments Download
M src/deoptimizer.cc View 1 3 chunks +8 lines, -5 lines 0 comments Download
M src/flag-definitions.h View 1 3 chunks +4 lines, -3 lines 0 comments Download
M src/hydrogen.h View 1 17 chunks +72 lines, -17 lines 0 comments Download
M src/hydrogen.cc View 1 40 chunks +174 lines, -47 lines 0 comments Download
M src/hydrogen-instructions.h View 1 10 chunks +92 lines, -32 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 4 chunks +16 lines, -5 lines 0 comments Download
M src/hydrogen-representation-changes.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/isolate.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M src/isolate.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M src/lithium-codegen.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/objects.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
Vyacheslav Egorov (Chromium)
(cc rstrurgell fyi) Hi Daniel! This is the CL explores some of the improvements in ...
6 years, 10 months ago (2014-01-29 16:41:36 UTC) #1
Vyacheslav Egorov (Chromium)
Adding Yang as a reviewer per Danno's suggestion.
6 years, 10 months ago (2014-02-03 14:17:00 UTC) #2
Vyacheslav Egorov (Google)
ping. don't want this CL to rot :)
6 years, 10 months ago (2014-02-10 12:25:13 UTC) #3
Yang
LGTM with comments. https://codereview.chromium.org/140683011/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/140683011/diff/1/src/hydrogen-instructions.h#newcode1170 src/hydrogen-instructions.h:1170: // TODO(vegorov): what we really want ...
6 years, 10 months ago (2014-02-12 17:32:05 UTC) #4
Vyacheslav Egorov (Chromium)
Committed patchset #2 manually as r19360 (presubmit successful).
6 years, 10 months ago (2014-02-13 16:09:45 UTC) #5
Vyacheslav Egorov (Chromium)
6 years, 10 months ago (2014-02-13 16:17:42 UTC) #6
Message was sent while issue was closed.
Thanks for the review. Landed.

https://codereview.chromium.org/140683011/diff/1/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

https://codereview.chromium.org/140683011/diff/1/src/hydrogen-instructions.h#...
src/hydrogen-instructions.h:1170: // TODO(vegorov): what we really want to track
here is a combination of
On 2014/02/12 17:32:06, Yang wrote:
> Is this still a TODO?

Done.

https://codereview.chromium.org/140683011/diff/1/src/hydrogen-instructions.h#...
src/hydrogen-instructions.h:1250: const intptr_t result = (val <<
kPositionShift) | kPositionTag;
Good catch!

I was using 31 bits originally to avoid loosing any, but then I was cleaning up
some code and ended up with 32 bits in HSourcePosition. I will fix it.

https://codereview.chromium.org/140683011/diff/1/src/hydrogen.h
File src/hydrogen.h (right):

https://codereview.chromium.org/140683011/diff/1/src/hydrogen.h#newcode2091
src/hydrogen.h:2091: function_state_ = state;
On 2014/02/12 17:32:06, Yang wrote:
> stray edit?

Done.

Powered by Google App Engine
This is Rietveld 408576698