v8/test
yurys@chromium.org 6482fb3ee4 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.pravdin@intel.com>
BUG=None
LOG=Y
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/616963005

Patch from Denis Pravdin <denis.pravdin@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 09:20:37 +00:00
..
benchmarks Skip octane/pdfjs for now in debug mode because slow. 2014-09-15 14:28:06 +00:00
cctest Extend CPU profiler with mapping ticks to source lines 2014-10-02 09:20:37 +00:00
fuzz-natives Rename Runtime_CompileUnoptimized to Runtime_CompileLazy, because that is what it does. Split Compiler::GetUnoptimizedCode into two variants, one for lazy compilation (which can return optimized code!) and the other that actually returns unoptimized code. 2014-09-17 15:29:42 +00:00
intl Enable test cases that no longer timeout. 2014-08-26 08:44:25 +00:00
message Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
mjsunit Skip test on all architectures but arm. 2014-10-02 08:37:51 +00:00
mozilla Exact black-list of AST nodes for TurboFan. 2014-09-15 15:06:05 +00:00
perf-test/Collections Add Collections perf tests to v8 public repo. 2014-09-01 14:52:06 +00:00
preparser ES6: Duplicate properties are no longer an error 2014-08-20 14:25:48 +00:00
promises-aplus Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
test262 Enable test cases that no longer timeout. 2014-08-26 08:44:25 +00:00
test262-es6 Update test262-es6 2014-09-11 13:39:37 +00:00
unittests [turbofan] Fix lowering of typed loads/stores. 2014-10-02 08:38:37 +00:00
webkit Exact black-list of AST nodes for TurboFan. 2014-09-15 15:06:05 +00:00