Reviewers: Sven Panne, danno, alph, Denis Pravdin, Weiliang,

Message:
Created Revert of Extend CPU profiler with mapping ticks to source lines

Description:
Revert of Extend CPU profiler with mapping ticks to source lines (patchset #3
id:40001 of https://codereview.chromium.org/616963005/)

Reason for revert:
It broke layout test fast/events/window-onerror-02.html:

http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/652

Original issue's description:
Extend CPU profiler with mapping ticks to source lines

The idea behind of this solution is to use the existing "relocation info"
instead of consumption the CodeLinePosition events emitted by the V8 compilers.
During generation code and relocation info are generated simultaneously.
When code generation is done you each code object has associated "relocation
info".
Relocation information lets V8 to mark interesting places in the generated
code: the pointers that might need to be relocated (after garbage collection),
correspondences between the machine program counter and source locations for
stack walking.

This patch:
1. Add more source positions info in reloc info to make it suitable for source
level mapping.
The amount of data should not be increased dramatically because (1) V8 already
marks interesting places in the generated code and
(2) V8 does not write redundant information (it writes a pair (pc_offset, pos)
only if pos is changed and skips other).
I measured it on Octane benchmark - for unoptimized code the number of source
positions may achieve 2x ('lin_solve' from NavierStokes benchmark).

2. When a sample happens, CPU profiler finds a code object by pc, then use its
reloc info to match the sample to a source line.
If a source line is found that hit counter is increased by one for this line.

3. Add a new public V8 API to get the hit source lines by CDT CPU profiler. Note that it's expected a minor patch in Blink to pack the source level info
in JSON to be shown.

4.Add a test that checks how the samples are distributed through source lines. It tests two cases: (1) relocation info created during code generation and (2)
relocation info associated with precompiled function's version.

Patch from Denis Pravdin <denis.prav...@intel.com>
BUG=None
LOG=Y
R=svenpa...@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=24389

TBR=svenpa...@chromium.org,da...@chromium.org,a...@chromium.org,denis.prav...@intel.com,weiliang....@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=None

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

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

Affected files (+55, -346 lines):
  M include/v8-profiler.h
  M src/api.cc
  M src/cpu-profiler.cc
  M src/full-codegen.cc
  M src/profile-generator.h
  M src/profile-generator.cc
  M src/profile-generator-inl.h
  M test/cctest/test-cpu-profiler.cc


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to