Bug 96837 - We should make collecting metrics easier by adding an IDL attribute
Summary: We should make collecting metrics easier by adding an IDL attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-14 15:53 PDT by Adam Barth
Modified: 2012-09-17 11:53 PDT (History)
9 users (show)

See Also:


Attachments
Work in progress (18.89 KB, patch)
2012-09-14 15:57 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Work in progress (18.85 KB, patch)
2012-09-14 15:58 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (25.62 KB, patch)
2012-09-14 16:49 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (29.31 KB, patch)
2012-09-17 11:22 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2012-09-14 15:53:58 PDT
We should make collecting metrics easier by adding an IDL attribute
Comment 1 Adam Barth 2012-09-14 15:57:44 PDT
Created attachment 164243 [details]
Work in progress
Comment 2 Adam Barth 2012-09-14 15:58:28 PDT
Created attachment 164244 [details]
Work in progress
Comment 3 Eric Seidel (no email) 2012-09-14 15:59:42 PDT
I support this product and/or service.  Want to buy.
Comment 4 Adam Barth 2012-09-14 16:49:54 PDT
Created attachment 164249 [details]
Patch
Comment 5 Ojan Vafai 2012-09-14 17:00:53 PDT
Comment on attachment 164249 [details]
Patch

Non-bindings bits LGTM. Probably someone more familiar with V8 bindings should review that part though.
Comment 6 Adam Barth 2012-09-14 17:08:33 PDT
Maybe japhet or dglazkov?  I believe haraken in on vacation.
Comment 7 Kentaro Hara 2012-09-15 05:48:03 PDT
Comment on attachment 164249 [details]
Patch

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

The V8 binding LGTM. Do you have any plan to support [MeasureAs] in JSC?

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:1828
> +END
> +    push(@implContent, GenerateFeatureObservation($function->signature->extendedAttributes->{"MeasureAs"}));
> +
> +    push(@implContent, <<END);

Nit: For readability, shall we avoid the END? You can store the result of GenerateFeatureObservation() to some variable before line 1822 and use the variable here.

> Source/WebCore/bindings/scripts/CodeGeneratorV8.pm:2023
> +END
> +    push(@implContent, GenerateFeatureObservation($function->signature->extendedAttributes->{"MeasureAs"}));
> +
> +    push(@implContent, <<END);

Ditto.
Comment 8 Ojan Vafai 2012-09-15 08:23:22 PDT
Comment on attachment 164249 [details]
Patch

Bikeshed: MeasureAs is a confusing term to me. MeasureUsage maybe?
Comment 9 Ojan Vafai 2012-09-15 08:24:03 PDT
Comment on attachment 164249 [details]
Patch

Oh, never mind. I see now that it takes a name to measure as. Carry on. :)
Comment 10 Adam Barth 2012-09-15 11:41:21 PDT
> The V8 binding LGTM. Do you have any plan to support [MeasureAs] in JSC?

Currently Chromium is the only port that has a backend for Histograms.  It doesn't seem worth supporting in JSC since it will just be overhead at this point.
Comment 11 Kentaro Hara 2012-09-15 15:15:36 PDT
(In reply to comment #10)
> > The V8 binding LGTM. Do you have any plan to support [MeasureAs] in JSC?
> 
> Currently Chromium is the only port that has a backend for Histograms.  It doesn't seem worth supporting in JSC since it will just be overhead at this point.

Got it. Then [V8MeasureAs] might be a better name.
Comment 12 Adam Barth 2012-09-17 11:22:34 PDT
Created attachment 164422 [details]
Patch for landing
Comment 13 Adam Barth 2012-09-17 11:28:10 PDT
Comments addressed!  Thanks.
Comment 14 WebKit Review Bot 2012-09-17 11:53:14 PDT
Comment on attachment 164422 [details]
Patch for landing

Clearing flags on attachment: 164422

Committed r128788: <http://trac.webkit.org/changeset/128788>
Comment 15 WebKit Review Bot 2012-09-17 11:53:18 PDT
All reviewed patches have been landed.  Closing bug.