Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/UseCounter.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| index 3f8b28145a80dd664e03efecd65de04f7d4df42d..30e7053181cfc5a0e8786fea25437c55b7906b82 100644 |
| --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp |
| @@ -36,6 +36,7 @@ |
| #include "core/inspector/ConsoleMessage.h" |
| #include "core/workers/WorkerGlobalScope.h" |
| #include "platform/Histogram.h" |
| +#include "platform/TraceEvent.h" |
| namespace blink { |
| @@ -663,6 +664,7 @@ void UseCounter::count(const Frame* frame, Feature feature) |
| return; |
| ASSERT(Deprecation::deprecationMessage(feature).isEmpty()); |
| + TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), "FeatureUsed", "feature", feature); |
|
Rick Byers
2016/08/03 01:08:32
I believe this will double count (Calls into the o
Pat Meenan
2016/08/03 13:20:27
It doesn't because it is calling directly into rec
|
| host->useCounter().recordMeasurement(feature); |
| } |
| @@ -751,12 +753,14 @@ void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID feature) |
| if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) |
| return; |
| + TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), "FeatureUsed", "feature", feature); |
|
Rick Byers
2016/08/03 01:08:32
This 'feature' has a different range/semantics tha
Pat Meenan
2016/08/03 13:20:27
Doh. Good catch, thanks. Done.
|
| m_CSSFeatureBits.quickSet(feature); |
| } |
| void UseCounter::count(Feature feature) |
| { |
| ASSERT(Deprecation::deprecationMessage(feature).isEmpty()); |
| + TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), "FeatureUsed", "feature", feature); |
|
Rick Byers
2016/08/03 01:08:32
There are a few features which are used a LOT, do
Pat Meenan
2016/08/03 13:20:27
Is there value in knowing how often features were
|
| recordMeasurement(feature); |
| } |