Web Inspector: use individual samples to construct CPU profile flame chart
https://bugs.webkit.org/show_bug.cgi?id=112569

Reviewed by Pavel Feldman.

Added an optional array of samples to the CPU profile returned over the
protocol. Each sample is id of the profile node corresponding to the top frame
of the sample's stack trace. The array of samples if present is used to draw
the flame chart on the CPU profile panel, otherwise flame chart is drawn based
on the aggregated profile data.

* bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::buildInspectorObjectForSamples):
* bindings/js/ScriptProfile.h:
(ScriptProfile):
* bindings/v8/ScriptProfile.cpp:
(WebCore::buildInspectorObjectFor):
(WebCore):
(WebCore::ScriptProfile::buildInspectorObjectForSamples):
* bindings/v8/ScriptProfile.h:
(ScriptProfile):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::start):
* inspector/Inspector.json:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getCPUProfile):
* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
(WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart.prototype._calculateTimelineData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146587 268f45cc-cd09-0410-ab3c-d52691b4dbfc