Run in console: for (var i = 0; i < 3; ++i) {console.profile("Text"); console.profileEnd();} Result: Profile "Text" started. Profile "Text" finished. Profile "Text Run 2" started. Profile "Text Run 2.5" finished. Profile "Text Run 3" started. Profile "Text Run 3.5" finished. What does ".5" mean?
Created attachment 176381 [details] Patch
Comment on attachment 176381 [details] Patch Attachment 176381 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15010370 New failing tests: inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Comment on attachment 176381 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176381&action=review > Source/WebCore/inspector/front-end/ProfilesPanel.js:753 > + if (groupNumber > 2) { We should find out why it is incremented twice instead.
Comment on attachment 176381 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=176381&action=review >> Source/WebCore/inspector/front-end/ProfilesPanel.js:753 >> + if (groupNumber > 2) { > > We should find out why it is incremented twice instead. This is because both console.profile/profileEnd would like to linkify profile. There is no way to distinguish profiles - we have only profile title and profile type here. We couldn't use profile id - it is 0 when we start writing profile.
(In reply to comment #3) > (From update of attachment 176381 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=176381&action=review > > > Source/WebCore/inspector/front-end/ProfilesPanel.js:753 > > + if (groupNumber > 2) { > > We should find out why it is incremented twice instead. We can fix this by making InspectorProfilerAgent::getCurrentUserInitiatedProfileName parametrized with title (and removing this code at all)
Created attachment 183970 [details] Patch
Comment on attachment 183970 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183970&action=review > Source/WebCore/inspector/front-end/ProfilesPanel.js:758 > + var groupNumber = ++this._profileGroupsForLinks[titleKey]; What if this method gets called more than twice to e.g. linkify the same profile in different places in the front-end?
(In reply to comment #7) > (From update of attachment 183970 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=183970&action=review > > > Source/WebCore/inspector/front-end/ProfilesPanel.js:758 > > + var groupNumber = ++this._profileGroupsForLinks[titleKey]; > > What if this method gets called more than twice to e.g. linkify the same profile in different places in the front-end? Fixed. The drawback of new solution is: when profiles are not populated yet, then run number can't be calculated.
Created attachment 185721 [details] Patch
While you are at it, would you mind having a look on the following problem: I did console.profile today and the link to the profile was opening a new page in the browser, not showing the collected profile in the corresponding panel. I believe it was easily reproducible.
(In reply to comment #10) > While you are at it, would you mind having a look on the following problem: I did console.profile today and the link to the profile was opening a new page in the browser, not showing the collected profile in the corresponding panel. I believe it was easily reproducible. I know about this problem ad will take care on it.
Created attachment 186340 [details] Patch
Becomes obsolete, because of: https://bugs.webkit.org/show_bug.cgi?id=109790