Intent to Experiment: JS Self-Profiling API

247 views
Skip to first unread message

Andrew Comminos

unread,
Aug 22, 2019, 7:25:06 PM8/22/19
to blin...@chromium.org

Contact emails

acom...@fb.com, n...@chromium.org, tdre...@chromium.org


Spec

https://github.com/WICG/js-self-profiling


Summary

A web-exposed sampling profiler for measuring client JavaScript execution time.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/cl_WCx9OEcg/9b-6_7DPDAAJ


Goals for experimentation

Primarily, we’d like to test our hypothesis that JS CPU samples can shed light into hard-to-diagnose issues with web performance in the wild.


Additionally, gathering qualitative feedback on the workability of the trace format would be very helpful in shaping the spec.


Experimental timeline

M78 to M80.


Note that we’re currently waiting on security/privacy reviews (crbug.com/985391) before launching.


Any risks when the experiment finishes?

No, other than sites losing access to JS CPU profile collection.


Ongoing technical constraints

None.


Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?

This experiment is shipping only on platforms with Site Isolation initially due to exposing new high-resolution timers in the form of sample timestamps. As it’s unclear whether or not reducing the precision of these timestamps will be sufficient to prevent timing attacks, the OT will be restricted to require strict site isolation.


If a process is not locked to a site, promises returned by performance.profile will be rejected.


Link to entry on the feature dashboard

https://chromestatus.com/feature/5170190448852992



Chris Harrelson

unread,
Aug 22, 2019, 8:31:57 PM8/22/19
to Andrew Comminos, blin...@chromium.org
LGTM!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/BYAPR15MB3176A0316AA5B7754237C210C7A50%40BYAPR15MB3176.namprd15.prod.outlook.com.

Michael Hablich

unread,
Nov 27, 2019, 8:17:21 AM11/27/19
to Andrew Comminos, Yang Guo, Benedikt Meurer, mk...@chromium.org, blin...@chromium.org, cl...@chromium.org
Hi folks,

is it planned to control the availability of the API via COOP/COEP? The current explainer says something different and I am wondering if we are not building a similar, custom-build (and weaker) mechanism into the JS profiling API instead of using COOP/COEP gating.


Cheers,
Michael

Andrew Comminos

unread,
Nov 27, 2019, 3:45:22 PM11/27/19
to blin...@chromium.org
That's correct that we're considering blocking a shipping version of
this API on COOP/COEP plus context filtering. The CORS-based filtration
described by the explainer is indeed unnecessary when going that route
(as it was written in a pre-COOP/COEP world).

I'll update the explainer to make mention of this- thanks for the heads up!

Best,
Andrew

On 11/27/19 5:16 AM, Michael Hablich wrote:
> Hi folks,
>
> is it planned to control the availability of the API via COOP/COEP? The
> current explainer says something different and I am wondering if we are
> not building a similar, custom-build (and weaker) mechanism into the JS
> profiling API instead of using COOP/COEP gating.
>
> +cl...@chromium.org <mailto:cl...@chromium.org> +Yang Guo
> <mailto:yan...@chromium.org> +Benedikt Meurer
> <mailto:bme...@chromium.org> +mk...@chromium.org
> <mailto:mk...@chromium.org> on their thoughts about this.
>
> Cheers,
> Michael
>
> On Fri, Aug 23, 2019 at 1:25 AM Andrew Comminos <acom...@fb.com
> <mailto:acom...@fb.com>> wrote:
>
> *
>
> Contact emails
>
> acom...@fb.com <mailto:acom...@fb.com>, n...@chromium.org
> <mailto:n...@chromium.org>, tdre...@chromium.org
> <mailto:tdre...@chromium.org>
>
>
> Spec
>
> https://github.com/WICG/js-self-profiling
>
>
> Summary
>
> A web-exposed sampling profiler for measuring client JavaScript
> execution time.
>
>
> Link to “Intent to Implement” blink-dev discussion
>
> https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/cl_WCx9OEcg/9b-6_7DPDAAJ
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_a_chromium.org_forum_-23-21msg_blink-2Ddev_cl-5FWCx9OEcg_9b-2D6-5F7DPDAAJ&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=J7BcC417M_X-_ZJGo88kWVJcreaf5vbezT_iqZM72vo&e=>
>
>
> Goals for experimentation
>
> Primarily, we’d like to test our hypothesis that JS CPU samples can
> shed light into hard-to-diagnose issues with web performance in the
> wild.
>
>
> Additionally, gathering qualitative feedback on the workability of
> the trace format would be very helpful in shaping the spec.
>
>
> Experimental timeline
>
> M78 to M80.
>
>
> Note that we’re currently waiting on security/privacy reviews
> (crbug.com/985391
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__crbug.com_985391&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=3gI6tqc8cIYgSKKjvU5iIC_mgDeDLVngUPrnDHaR-Ug&e=>)
> before launching.
>
>
> Any risks when the experiment finishes?
>
> No, other than sites losing access to JS CPU profile collection.
>
>
> Ongoing technical constraints
>
> None.
>
>
> Will this feature be supported on all five Blink platforms supported
> by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?
>
> This experiment is shipping only on platforms with Site Isolation
> initially due to exposing new high-resolution timers in the form of
> sample timestamps. As it’s unclear whether or not reducing the
> precision of these timestamps will be sufficient to prevent timing
> attacks, the OT will be restricted to require strict site isolation.
>
>
> If a process is not locked to a site, promises returned by
> performance.profile will be rejected.
>
>
> Link to entry on the feature dashboard
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.chromestatus.com_&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=AOLbVLZBM1F9JVFnqMJCOkyV0ik6NLYg11L0X3aicDs&e=>
>
> https://chromestatus.com/feature/5170190448852992
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__chromestatus.com_feature_5170190448852992&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=qF5sMGAVoniisi_kzbQhT6LstwkLxNPtybC77_A_44c&e=>
>
> *
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_a_chromium.org_d_msgid_blink-2Ddev_BYAPR15MB3176A0316AA5B7754237C210C7A50-2540BYAPR15MB3176.namprd15.prod.outlook.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=ADAGJp88gDHE-igD2NTx8bJ9nU--m6iCjPVJmFYWZSs&e=>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAF2MX8ghUxAwbH7Wsg1GBpVq%3DRYAmt8C%3DeVXaF%3Ds9teQQAKpWw%40mail.gmail.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_a_chromium.org_d_msgid_blink-2Ddev_CAF2MX8ghUxAwbH7Wsg1GBpVq-253DRYAmt8C-253DeVXaF-253Ds9teQQAKpWw-2540mail.gmail.com-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dfooter&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=f4IqI-T64EhPzlPNDufP_w&m=n4P9U4bBCZpoGIA2AMyOufJ4wNKNDXstsUvwBQyIA9A&s=vah1igVEN3dZADyz6SB7fVAxkTbfkMn8xRgfwTr1Ac8&e=>.

Mike West

unread,
Dec 4, 2019, 5:15:33 AM12/4/19
to Andrew Comminos, blin...@chromium.org
I'm comfortable shipping this as an origin trial, as it's strictly less capable of being abused than SharedArrayBuffers, which we're currently shipping. Since the origin trial is explicitly time-limited, I'm not particularly concerned with locking ourselves into supporting this API without COOP/COEP.

I would indeed be concerned about _shipping_ this API without those restrictions, as that would make it harder for us in the near future when we get COOP/COEP out the door and begin gating API access. I think we're all on the same page on that point.

-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/80341d92-c519-1785-e818-657013230188%40fb.com.
Reply all
Reply to author
Forward
0 new messages