Currently fields "head" and "bottomUpHead" of Profile object returned by Profiler.getProfile is untyped (type = object). That's not good both for client side (protocol users may only guess on output content) and backend side (field names are hardcoded in source code). This patch defines "head" and "bottomUpHead" to be of new "ProfileNode" type and updates serialization code to use builders to create output.
Created attachment 175186 [details] Patch
Comment on attachment 175186 [details] Patch We should first split Heap snapshots and CPU profiles. Currently they are all described by Profiler.Profile object in the protocol which seems wrong and makes front-end implementation too complicated.
Created attachment 185223 [details] Patch
Created attachment 185225 [details] Patch
Comment on attachment 185225 [details] Patch Attachment 185225 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/16200205
Comment on attachment 185225 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185225&action=review > Source/WebCore/bindings/v8/ScriptProfile.h:38 > +#if ENABLE(INSPECTOR) Can we hide the whole file behind the guard?
(In reply to comment #6) > (From update of attachment 185225 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185225&action=review > > > Source/WebCore/bindings/v8/ScriptProfile.h:38 > > +#if ENABLE(INSPECTOR) > > Can we hide the whole file behind the guard? Not sure. Collecting profile is a console feature.
Comment on attachment 185225 [details] Patch Clearing flags on attachment: 185225 Committed r141273: <http://trac.webkit.org/changeset/141273>
All reviewed patches have been landed. Closing bug.