v8/test
svenpanne@chromium.org d56a21ebff 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>;

R=svenpanne@chromium.org, yurys@chromium.org

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

Patch from Weiliang <weiliang.lin@intel.com>.

Cr-Commit-Position: refs/heads/master@{#25182}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:17:14 +00:00
..
benchmarks Revert "Enable turbofan deoptimization by default." 2014-10-27 14:37:10 +00:00
cctest The idea behind of this solution is to use the existing "relocation info" instead of consumption the CodeLinePosition events emitted by the V8 compilers. 2014-11-06 09:17:14 +00:00
intl Allow identifier code points from supplementary multilingual planes. 2014-10-10 07:13:46 +00:00
js-perf-test Add performance tests for Map/Set with String and Object keys 2014-10-29 10:18:38 +00:00
message Enable access check tests that no longer fail with TF. 2014-08-14 13:24:57 +00:00
mjsunit MIPS: Skip embenchen tests on big-endian. 2014-11-06 06:18:42 +00:00
mozilla Skipt tests with TF on windows. 2014-10-30 09:48:42 +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 Convert argument toObject() in Object.getOwnPropertyNames/Descriptors 2014-10-15 14:01:20 +00:00
test262-es6 Adjust test262-es6 following --harmony flag change 2014-11-04 18:38:08 +00:00
unittests [turbofan] Turn various diamonds into selects. 2014-11-06 09:10:32 +00:00
webkit Skip tests with TF. 2014-10-30 12:38:48 +00:00