Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/Resource.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| index 20b69e38de6bd385ea801e11c98a8aafe177faef..20691353bf0ef31b5719e3deb64a3a1d27647b33 100644 |
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| @@ -564,6 +564,9 @@ bool Resource::unlock() |
| if (RuntimeEnabledFeatures::doNotUnlockSharedBufferEnabled()) |
| return false; |
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, unlockHistogram, new EnumerationHistogram("Blink.SharedBuffer.Unlock", Manifest + 1)); |
|
bashi
2016/07/11 08:02:27
nit: does it make sense to change the name of metr
hiroshige
2016/07/11 08:15:58
I also considered that option, but I names Blink.S
bashi
2016/07/11 08:23:22
I see. Thanks for the explanation.
Ilya Sherman
2016/07/11 19:28:33
Please document (in the header file, where the enu
hiroshige
2016/07/12 10:06:29
Done.
|
| + unlockHistogram.count(getType()); |
| + |
| m_data->unlock(); |
| return true; |
| } |
| @@ -986,11 +989,18 @@ bool Resource::lock() |
| // If locking fails, our buffer has been purged. There's no point |
| // in leaving a purged resource in MemoryCache. |
| if (!m_data->lock()) { |
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, failedLockHistogram, new EnumerationHistogram("Blink.SharedBuffer.FailedLock", Manifest + 1)); |
|
Ilya Sherman
2016/07/11 19:28:33
Using "Manifest + 1" as a boundary value is a bit
hiroshige
2016/07/12 10:06:29
Added |kLastResourceType|.
I avoid adding |Last|
|
| + failedLockHistogram.count(getType()); |
| + |
| m_data.clear(); |
| setEncodedSize(0); |
| memoryCache()->remove(this); |
| return false; |
| } |
| + |
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, successfulLockHistogram, new EnumerationHistogram("Blink.SharedBuffer.SuccessfulLock", Manifest + 1)); |
| + successfulLockHistogram.count(getType()); |
| + |
| return true; |
| } |