Reviewers: danno,

Message:
(cc rstrurgell fyi)

Hi Daniel!

This is the CL explores some of the improvements in our IR dumps that we touched
some time ago.

Main motivation behind it is that it enables building very user friendly
IR/deopt viewers. Checkout the demo: http://www.youtube.com/watch?v=pycQWDuCBN8


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

https://codereview.chromium.org/140683011/diff/1/src/objects.h#newcode4941
src/objects.h:4941: static const int kOptimizationIdIndex = 5;
Rest of the change introduces no overhead unless
FLAG_track_hydrogen_positions is passed. This part however grows
DeoptimizationInputData by one word to store ID of the optimization.

In general DeoptimizationInputData is big and is also accompanied by a
multiword optimized code object so this overhead should not be
noticable.

However if we want to save space we can change encoding of this
structure to be more flexible. If we decide to pursue this as additional
benefit of such action we can remove OsrAstId and OsrPcOffset for many
object (my guess they are not used for many objects) and save 2 words.

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=

Please review this at https://codereview.chromium.org/140683011/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+418, -125 lines):
  M src/arm/lithium-codegen-arm.cc
  M src/codegen.cc
  M src/compiler.h
  M src/compiler.cc
  M src/deoptimizer.cc
  M src/flag-definitions.h
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc
  M src/hydrogen-representation-changes.cc
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/ia32/lithium-codegen-ia32.cc
  M src/isolate.h
  M src/isolate.cc
  M src/lithium-codegen.cc
  M src/mips/lithium-codegen-mips.cc
  M src/objects.h
  M src/x64/lithium-codegen-x64.cc


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to