Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: storage/browser/blob/blob_storage_context.cc

Issue 992753002: [Storage] Added tracing for blob creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed offsets for file operations Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « storage/browser/blob/blob_data_snapshot.h ('k') | storage/browser/blob/blob_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_storage_context.cc
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc
index b673930c217603c9ccfc29c106eab49dea184ef1..71e8939a27a580d1bfaf5ae4ce49937ccb191423 100644
--- a/storage/browser/blob/blob_storage_context.cc
+++ b/storage/browser/blob/blob_storage_context.cc
@@ -14,6 +14,7 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/histogram.h"
#include "base/stl_util.h"
+#include "base/trace_event/trace_event.h"
#include "storage/browser/blob/blob_data_builder.h"
#include "storage/browser/blob/blob_data_handle.h"
#include "url/gurl.h"
@@ -92,6 +93,7 @@ scoped_ptr<BlobDataHandle> BlobStorageContext::GetBlobDataFromPublicURL(
scoped_ptr<BlobDataHandle> BlobStorageContext::AddFinishedBlob(
BlobDataBuilder* external_builder) {
+ TRACE_EVENT0("Blob", "Context::AddFinishedBlob");
StartBuildingBlob(external_builder->uuid_);
BlobMap::iterator found = blob_map_.find(external_builder->uuid_);
DCHECK(found != blob_map_.end());
@@ -163,6 +165,7 @@ void BlobStorageContext::StartBuildingBlob(const std::string& uuid) {
void BlobStorageContext::AppendBlobDataItem(
const std::string& uuid,
const storage::DataElement& ipc_data_element) {
+ TRACE_EVENT0("Blob", "Context::AppendBlobDataItem");
DCHECK(IsBeingBuilt(uuid));
BlobMap::iterator found = blob_map_.find(uuid);
if (found == blob_map_.end())
@@ -202,6 +205,7 @@ void BlobStorageContext::FinishBuildingBlob(const std::string& uuid,
UMA_HISTOGRAM_COUNTS("Storage.Blob.TotalSize", total_memory / 1024);
UMA_HISTOGRAM_COUNTS("Storage.Blob.TotalUnsharedSize",
nonshared_memory / 1024);
+ TRACE_COUNTER1("Blob", "MemoryStoreUsageBytes", memory_usage_);
}
void BlobStorageContext::CancelBuildingBlob(const std::string& uuid) {
« no previous file with comments | « storage/browser/blob/blob_data_snapshot.h ('k') | storage/browser/blob/blob_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698