Bug 167717 - Support Performance API (performance.now(), UserTiming) in Workers
Summary: Support Performance API (performance.now(), UserTiming) in Workers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-01 17:07 PST by Joseph Pecoraro
Modified: 2017-02-02 14:10 PST (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (75.00 KB, patch)
2017-02-01 17:16 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (76.44 KB, patch)
2017-02-01 17:56 PST, Joseph Pecoraro
rniwa: review+
Details | Formatted Diff | Diff
[PATCH] Additional Changes (13.23 KB, patch)
2017-02-02 11:48 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots (90.16 KB, patch)
2017-02-02 12:01 PST, Joseph Pecoraro
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-elcapitan (789.75 KB, application/zip)
2017-02-02 13:09 PST, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-elcapitan (1.46 MB, application/zip)
2017-02-02 13:18 PST, Build Bot
no flags Details
[PATCH] For Bots (90.07 KB, patch)
2017-02-02 13:19 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-02-01 17:07:35 PST
Summary:
Support Performance API (performance.now(), UserTiming) in Workers

Level 2 of these specifications brings support to workers.
Comment 1 Joseph Pecoraro 2017-02-01 17:16:05 PST
Created attachment 300374 [details]
[PATCH] Proposed Fix
Comment 2 Sam Weinig 2017-02-01 17:55:46 PST
Comment on attachment 300374 [details]
[PATCH] Proposed Fix

Can we use WTF's Seconds class instead of double for all this timeOrigin passing?
Comment 3 Joseph Pecoraro 2017-02-01 17:56:02 PST
Created attachment 300377 [details]
[PATCH] Proposed Fix
Comment 4 Joseph Pecoraro 2017-02-01 17:56:33 PST
(In reply to comment #2)
> Comment on attachment 300374 [details]
> [PATCH] Proposed Fix
> 
> Can we use WTF's Seconds class instead of double for all this timeOrigin
> passing?

Sure! I'll look into that and put up another patch.
Comment 5 Ryosuke Niwa 2017-02-01 20:48:43 PST
Comment on attachment 300377 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=300377&action=review

restrictedMarkFunction in PerformanceUserTiming.cpp is not thread safe.
Please fix that before landing this patch.

> Source/WebCore/page/GlobalPerformance.idl:2
> - * Copyright (C) 2012 Intel Inc. All rights reserved.
> + * Copyright (C) 2017 Apple Inc. All rights reserved.

I don't think we can get rid of Intel's copyright.
Comment 6 Joseph Pecoraro 2017-02-02 11:44:36 PST
Comment on attachment 300377 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=300377&action=review

>> Source/WebCore/page/GlobalPerformance.idl:2
>> + * Copyright (C) 2017 Apple Inc. All rights reserved.
> 
> I don't think we can get rid of Intel's copyright.

That is because my git diff thinks we are copying this file from PerformanceMeasure.idl, but we aren't. This is a new file with WebIDL just copied from the spec (extracted from Performance.idl).
Comment 7 Joseph Pecoraro 2017-02-02 11:48:14 PST
Created attachment 300426 [details]
[PATCH] Additional Changes

These additional changes (mostly tests and a minor tweak to User Timing for Workers) came up because of some comments rniwa raised in person.

I haven't forgotten about moving to MonotonicTime / Seconds classes. I have that patch right now but I'll put it up for review as a follow-up since it reaches into more and more places not relevant for this bug. Also, converting everything related to Performance APIs at once will be nice.
Comment 8 Joseph Pecoraro 2017-02-02 12:01:50 PST
Created attachment 300428 [details]
[PATCH] For Bots
Comment 9 Build Bot 2017-02-02 13:09:13 PST
Comment on attachment 300428 [details]
[PATCH] For Bots

Attachment 300428 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2993036

New failing tests:
imported/w3c/web-platform-tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html
Comment 10 Build Bot 2017-02-02 13:09:16 PST
Created attachment 300438 [details]
Archive of layout-test-results from ews103 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 11 Build Bot 2017-02-02 13:18:24 PST
Comment on attachment 300428 [details]
[PATCH] For Bots

Attachment 300428 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2993051

New failing tests:
imported/w3c/web-platform-tests/user-timing/test_user_timing_mark_and_measure_exception_when_invoke_with_timing_attributes.html
Comment 12 Build Bot 2017-02-02 13:18:27 PST
Created attachment 300441 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 13 Joseph Pecoraro 2017-02-02 13:19:27 PST
Created attachment 300442 [details]
[PATCH] For Bots
Comment 14 Ryosuke Niwa 2017-02-02 13:44:01 PST
Comment on attachment 300426 [details]
[PATCH] Additional Changes

Sure, this change looks good to me.
Comment 15 Joseph Pecoraro 2017-02-02 14:10:18 PST
<https://trac.webkit.org/changeset/211594>