diff options
author | vadimt <vadimt@chromium.org> | 2014-12-30 14:17:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-30 22:18:35 +0000 |
commit | 6f25e7abcbb96a0c5eefae918f0302f7d89e21b0 (patch) | |
tree | 94d3891aaf90d4ca9af54b1b2db2f6cf6ae9c520 /storage | |
parent | 7c9665ef172a0260ac0b06040a9459026121cdde (diff) | |
download | chromium_src-6f25e7abcbb96a0c5eefae918f0302f7d89e21b0.zip chromium_src-6f25e7abcbb96a0c5eefae918f0302f7d89e21b0.tar.gz chromium_src-6f25e7abcbb96a0c5eefae918f0302f7d89e21b0.tar.bz2 |
Instrumenting ReadRawData and InformDelegateDownloadProgress to find jank.
Prior instrumentations showed that:
ReadRawData = 16 jph
InformDelegateDownloadProgress = 4.8 jph
Instrumenting deeper.
The jank in InformDelegateDownloadProgress is a surprise since this method does nothing but posting a task. But still, who knows, and I'm instrumenting it too.
BUG=423948
TBR=jianli@chromium.org, jhawkins@chromium.org, zork@chromium.org, jochen@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/821073003
Cr-Commit-Position: refs/heads/master@{#309783}
Diffstat (limited to 'storage')
-rw-r--r-- | storage/browser/blob/blob_url_request_job.cc | 6 | ||||
-rw-r--r-- | storage/browser/fileapi/file_system_dir_url_request_job.cc | 6 | ||||
-rw-r--r-- | storage/browser/fileapi/file_system_url_request_job.cc | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/storage/browser/blob/blob_url_request_job.cc b/storage/browser/blob/blob_url_request_job.cc index 507ade3..41e7942 100644 --- a/storage/browser/blob/blob_url_request_job.cc +++ b/storage/browser/blob/blob_url_request_job.cc @@ -17,6 +17,7 @@ #include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_proxy.h" #include "base/numerics/safe_conversions.h" +#include "base/profiler/scoped_tracker.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -88,6 +89,11 @@ void BlobURLRequestJob::Kill() { bool BlobURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "423948 BlobURLRequestJob::ReadRawData")); + DCHECK_NE(dest_size, 0); DCHECK(bytes_read); DCHECK_GE(remaining_bytes_, 0); diff --git a/storage/browser/fileapi/file_system_dir_url_request_job.cc b/storage/browser/fileapi/file_system_dir_url_request_job.cc index cce9c56..07b8f8d 100644 --- a/storage/browser/fileapi/file_system_dir_url_request_job.cc +++ b/storage/browser/fileapi/file_system_dir_url_request_job.cc @@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/compiler_specific.h" #include "base/message_loop/message_loop.h" +#include "base/profiler/scoped_tracker.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" @@ -47,6 +48,11 @@ FileSystemDirURLRequestJob::~FileSystemDirURLRequestJob() { bool FileSystemDirURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size, int *bytes_read) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "423948 FileSystemDirURLRequestJob::ReadRawData")); + int count = std::min(dest_size, static_cast<int>(data_.size())); if (count > 0) { memcpy(dest->data(), data_.data(), count); diff --git a/storage/browser/fileapi/file_system_url_request_job.cc b/storage/browser/fileapi/file_system_url_request_job.cc index 8b2eae0..d2c242c 100644 --- a/storage/browser/fileapi/file_system_url_request_job.cc +++ b/storage/browser/fileapi/file_system_url_request_job.cc @@ -12,6 +12,7 @@ #include "base/files/file_util_proxy.h" #include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_proxy.h" +#include "base/profiler/scoped_tracker.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" #include "build/build_config.h" @@ -84,6 +85,11 @@ void FileSystemURLRequestJob::Kill() { bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size, int* bytes_read) { + // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. + tracked_objects::ScopedTracker tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "423948 FileSystemURLRequestJob::ReadRawData")); + DCHECK_NE(dest_size, 0); DCHECK(bytes_read); DCHECK_GE(remaining_bytes_, 0); |