You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2020. It is now read-only.
This is the second and final part of adding source line support in Chromium CPU profiler that needs to be done to move XDK CPU profiler on the same way as CDT uses.
In brief, we need to do two things:
1) Map the samples to source lines during profiling session and add new V8 public API to get the hit source lines. These changes are already merged into v8-crosswalk.
2) The Chrome profilers works as follows: Chrome Browser ==(a "start/stop profiling" command)==> WebKit (WebSocket) ==> WebKit(InspectorBackendDispatcher) =="start/stop profiling"==> WebKit(InspectorProfilerAgent) ==V8 Public APIs (StartProfiling/Stopprofiling)==> V8.
So, on StopProfiling command, WebKit(InspectorProfilerAgent) gets the collected results (using V8 public API) and packs them into JSON to send back to Chrome browser.
This patch implements writing info about the hit source lines in JSON data to be sent back to Chromium browser.
(cherry picked from commit f16d920)
Re-enabling CPU profiling feature broken after migration to new v8.
{ "name": "deoptReason", "type": "string", "description": "The reason of being not optimized. The function may be deoptimized or marked as don't optimize."},
3641
-
{ "name": "id", "type": "integer", "description": "Unique id of the node." }
3641
+
{ "name": "id", "type": "integer", "description": "Unique id of the node." },
3642
+
{ "name": "lineTicks", "type": "array", "items": { "$ref": "LineTick" }, "description": "A set of source line ticks." }
3642
3643
]
3643
3644
},
3644
3645
{
@@ -3652,6 +3653,15 @@
3652
3653
{ "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." },
3653
3654
{ "name": "timestamps", "optional": true, "type": "array", "items": { "type": "number" }, "description": "Timestamps of the samples in microseconds." }
3654
3655
]
3656
+
},
3657
+
{
3658
+
"id": "LineTick",
3659
+
"type": "object",
3660
+
"description": "Specifies a number of samples attributed to a certain source line.",
3661
+
"properties": [
3662
+
{ "name": "line", "type": "integer", "description": "Source line number." },
3663
+
{ "name": "ticks", "type": "integer", "description": "Number of samples attributed to a source line number." }
0 commit comments