RESOLVED FIXED 72316
[MutationObservers] Add histogram collection for usage of DOM Mutation Events
https://bugs.webkit.org/show_bug.cgi?id=72316
Summary [MutationObservers] Add histogram collection for usage of DOM Mutation Events
Rafael Weinstein
Reported 2011-11-14 15:15:51 PST
So we can make an informed decision at some point about removing their support
Attachments
Patch (2.93 KB, patch)
2011-11-14 15:19 PST, Rafael Weinstein
no flags
Patch (3.03 KB, patch)
2011-11-14 15:48 PST, Rafael Weinstein
no flags
Patch (2.98 KB, patch)
2011-11-14 16:34 PST, Rafael Weinstein
no flags
Patch (3.09 KB, patch)
2011-11-14 16:53 PST, Rafael Weinstein
no flags
Rafael Weinstein
Comment 1 2011-11-14 15:19:21 PST
Early Warning System Bot
Comment 2 2011-11-14 15:23:48 PST
Ryosuke Niwa
Comment 3 2011-11-14 15:27:07 PST
Comment on attachment 115041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115041&action=review > Source/WebCore/dom/Document.cpp:499 > +static void histogramMutationEventUsage(const unsigned short& listenerTypes) > +{ > + PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMSubtreeModified", listenerTypes & Document::DOMSUBTREEMODIFIED_LISTENER, 2); I don't these functions are available on non-Chromium ports. You need to wrap it in #if PLATFORM(CHROMIUM)
Rafael Weinstein
Comment 4 2011-11-14 15:48:34 PST
Rafael Weinstein
Comment 5 2011-11-14 15:52:57 PST
Comment on attachment 115041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115041&action=review >> Source/WebCore/dom/Document.cpp:499 >> + PlatformSupport::histogramEnumeration("DOMAPI.PerDocumentMutationEventUsage.DOMSubtreeModified", listenerTypes & Document::DOMSUBTREEMODIFIED_LISTENER, 2); > > I don't these functions are available on non-Chromium ports. You need to wrap it in #if PLATFORM(CHROMIUM) ifdef'd
Ryosuke Niwa
Comment 6 2011-11-14 16:06:33 PST
Comment on attachment 115048 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115048&action=review > Source/WebCore/dom/Document.cpp:118 > +#if PLATFORM(CHROMIUM) > +#include "PlatformSupport.h" > +#endif This should be listed separately see below for examples.
Rafael Weinstein
Comment 7 2011-11-14 16:34:10 PST
Rafael Weinstein
Comment 8 2011-11-14 16:34:27 PST
Comment on attachment 115048 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115048&action=review >> Source/WebCore/dom/Document.cpp:118 >> +#endif > > This should be listed separately see below for examples. done
Rafael Weinstein
Comment 9 2011-11-14 16:53:46 PST
Rafael Weinstein
Comment 10 2011-11-14 16:55:03 PST
Sorry. I realized that I don't want to collect the bit in each of these cases, I actually want a 1 or a 0.
WebKit Review Bot
Comment 11 2011-11-14 17:23:53 PST
Comment on attachment 115061 [details] Patch Clearing flags on attachment: 115061 Committed r100222: <http://trac.webkit.org/changeset/100222>
WebKit Review Bot
Comment 12 2011-11-14 17:24:03 PST
All reviewed patches have been landed. Closing bug.
Sam Weinig
Comment 13 2011-11-15 11:31:18 PST
It seems unfortunate adding platform specific code to Document.cpp. Is there another cross-platform way to do this?
Ojan Vafai
Comment 14 2011-11-15 11:34:35 PST
(In reply to comment #13) > It seems unfortunate adding platform specific code to Document.cpp. Is there another cross-platform way to do this? We could have a stub implementation of PlatformSupport.h for other platforms? This would be similar to the other *Client interfaces we have.
Rafael Weinstein
Comment 15 2011-11-15 13:27:36 PST
I'm happy to do whatever you guys think is most appropriate.
Adam Barth
Comment 16 2011-11-15 13:34:35 PST
IMHO, we should have a header that exposes only the histogram functions which has stub implementations on non-Chromium platforms. The Chromium implementation would just trampoline through PlatformSupport.
Sam Weinig
Comment 17 2011-11-16 11:37:16 PST
(In reply to comment #16) > IMHO, we should have a header that exposes only the histogram functions which has stub implementations on non-Chromium platforms. The Chromium implementation would just trampoline through PlatformSupport. I think this would be the right approach.
Rafael Weinstein
Comment 18 2011-11-23 10:04:52 PST
opened 73026 for cleanup
Note You need to log in before you can comment on or make changes to this bug.