summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorpkasting <pkasting@chromium.org>2015-04-07 21:42:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-08 04:42:40 +0000
commit379234c28f3856045a67af657296d6911156bbff (patch)
treec0d7f0cab2fb491b97efec10fc8c444c49fc1ade /net/disk_cache
parent8f0f3b63b8fd45d72ab957bdc12c714899199a72 (diff)
downloadchromium_src-379234c28f3856045a67af657296d6911156bbff.zip
chromium_src-379234c28f3856045a67af657296d6911156bbff.tar.gz
chromium_src-379234c28f3856045a67af657296d6911156bbff.tar.bz2
Remove unnecessary instrumentation for several jank bugs.
BUG=437890,436671,455423,424386,436634,422516 TEST=none TBR=jochen,cbentzel,jyasskin Review URL: https://codereview.chromium.org/1062413002 Cr-Commit-Position: refs/heads/master@{#324185}
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/blockfile/in_flight_backend_io.cc115
-rw-r--r--net/disk_cache/blockfile/in_flight_io.cc5
-rw-r--r--net/disk_cache/cache_creator.cc5
3 files changed, 18 insertions, 107 deletions
diff --git a/net/disk_cache/blockfile/in_flight_backend_io.cc b/net/disk_cache/blockfile/in_flight_backend_io.cc
index 5b3b904..28d7114 100644
--- a/net/disk_cache/blockfile/in_flight_backend_io.cc
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc
@@ -8,7 +8,6 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/blockfile/backend_impl.h"
@@ -65,14 +64,8 @@ void BackendIO::OnDone(bool cancel) {
if (result() == net::OK) {
static_cast<EntryImpl*>(*entry_ptr_)->OnEntryCreated(backend_);
- if (cancel) {
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is
- // fixed.
- tracked_objects::ScopedTracker tracking_profile(
- FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 BackendIO::OnDone"));
-
+ if (cancel)
(*entry_ptr_)->Close();
- }
}
}
@@ -341,57 +334,35 @@ InFlightBackendIO::~InFlightBackendIO() {
}
void InFlightBackendIO::Init(const net::CompletionCallback& callback) {
- // TODO(vadimt): Remove wrapping the callback with
- // ScopedTracker::TrackCallback() once crbug.com/422516 is fixed.
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_,
- tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 InFlightBackendIO::Init"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->Init();
PostOperation(operation.get());
}
void InFlightBackendIO::OpenEntry(const std::string& key, Entry** entry,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::OpenEntry"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->OpenEntry(key, entry);
PostOperation(operation.get());
}
void InFlightBackendIO::CreateEntry(const std::string& key, Entry** entry,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::CreateEntry"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->CreateEntry(key, entry);
PostOperation(operation.get());
}
void InFlightBackendIO::DoomEntry(const std::string& key,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::DoomEntry"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntry(key);
PostOperation(operation.get());
}
void InFlightBackendIO::DoomAllEntries(
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::DoomAllEntries"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomAllEntries();
PostOperation(operation.get());
}
@@ -399,22 +370,14 @@ void InFlightBackendIO::DoomAllEntries(
void InFlightBackendIO::DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::DoomEntriesBetween"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntriesBetween(initial_time, end_time);
PostOperation(operation.get());
}
void InFlightBackendIO::DoomEntriesSince(
const base::Time initial_time, const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::DoomEntriesSince"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->DoomEntriesSince(initial_time);
PostOperation(operation.get());
}
@@ -422,11 +385,7 @@ void InFlightBackendIO::DoomEntriesSince(
void InFlightBackendIO::OpenNextEntry(Rankings::Iterator* iterator,
Entry** next_entry,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::OpenNextEntry"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->OpenNextEntry(iterator, next_entry);
PostOperation(operation.get());
}
@@ -461,22 +420,14 @@ void InFlightBackendIO::DoomEntryImpl(EntryImpl* entry) {
}
void InFlightBackendIO::FlushQueue(const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::FlushQueue"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->FlushQueue();
PostOperation(operation.get());
}
void InFlightBackendIO::RunTask(
const base::Closure& task, const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_,
- tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 InFlightBackendIO::RunTask"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->RunTask(task);
PostOperation(operation.get());
}
@@ -484,11 +435,7 @@ void InFlightBackendIO::RunTask(
void InFlightBackendIO::ReadData(EntryImpl* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::ReadData"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadData(entry, index, offset, buf, buf_len);
PostOperation(operation.get());
}
@@ -497,11 +444,7 @@ void InFlightBackendIO::WriteData(EntryImpl* entry, int index, int offset,
net::IOBuffer* buf, int buf_len,
bool truncate,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::WriteData"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->WriteData(entry, index, offset, buf, buf_len, truncate);
PostOperation(operation.get());
}
@@ -509,11 +452,7 @@ void InFlightBackendIO::WriteData(EntryImpl* entry, int index, int offset,
void InFlightBackendIO::ReadSparseData(
EntryImpl* entry, int64 offset, net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::ReadSparseData"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadSparseData(entry, offset, buf, buf_len);
PostOperation(operation.get());
}
@@ -521,11 +460,7 @@ void InFlightBackendIO::ReadSparseData(
void InFlightBackendIO::WriteSparseData(
EntryImpl* entry, int64 offset, net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::WriteSparseData"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->WriteSparseData(entry, offset, buf, buf_len);
PostOperation(operation.get());
}
@@ -533,11 +468,7 @@ void InFlightBackendIO::WriteSparseData(
void InFlightBackendIO::GetAvailableRange(
EntryImpl* entry, int64 offset, int len, int64* start,
const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::GetAvailableRange"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->GetAvailableRange(entry, offset, len, start);
PostOperation(operation.get());
}
@@ -551,11 +482,7 @@ void InFlightBackendIO::CancelSparseIO(EntryImpl* entry) {
void InFlightBackendIO::ReadyForSparseIO(
EntryImpl* entry, const net::CompletionCallback& callback) {
- scoped_refptr<BackendIO> operation(new BackendIO(
- this, backend_, tracked_objects::ScopedTracker::TrackCallback(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::CancelSparseIO"),
- callback)));
+ scoped_refptr<BackendIO> operation(new BackendIO(this, backend_, callback));
operation->ReadyForSparseIO(entry);
PostOperation(operation.get());
}
@@ -569,14 +496,8 @@ void InFlightBackendIO::OnOperationComplete(BackgroundIO* operation,
BackendIO* op = static_cast<BackendIO*>(operation);
op->OnDone(cancel);
- if (!op->callback().is_null() && (!cancel || op->IsEntryOperation())) {
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
- tracked_objects::ScopedTracker tracking_profile(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "422516 InFlightBackendIO::OnOperationComplete"));
-
+ if (!op->callback().is_null() && (!cancel || op->IsEntryOperation()))
op->callback().Run(op->result());
- }
}
void InFlightBackendIO::PostOperation(BackendIO* operation) {
diff --git a/net/disk_cache/blockfile/in_flight_io.cc b/net/disk_cache/blockfile/in_flight_io.cc
index cbfcd17..9ada7c5 100644
--- a/net/disk_cache/blockfile/in_flight_io.cc
+++ b/net/disk_cache/blockfile/in_flight_io.cc
@@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"
#include "base/thread_task_runner_handle.h"
@@ -88,10 +87,6 @@ void InFlightIO::OnIOComplete(BackgroundIO* operation) {
// Runs on the primary thread.
void InFlightIO::InvokeCallback(BackgroundIO* operation, bool cancel_task) {
{
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
- tracked_objects::ScopedTracker tracking_profile(
- FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 InFlightIO::InvokeCallback"));
-
// http://crbug.com/74623
base::ThreadRestrictions::ScopedAllowWait allow_wait;
operation->io_completed()->Wait();
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index 93c06b3..8c4400c 100644
--- a/net/disk_cache/cache_creator.cc
+++ b/net/disk_cache/cache_creator.cc
@@ -4,7 +4,6 @@
#include "base/files/file_path.h"
#include "base/metrics/field_trial.h"
-#include "base/profiler/scoped_tracker.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "net/base/cache_type.h"
@@ -140,10 +139,6 @@ void CacheCreator::DoCallback(int result) {
// If the initialization of the cache fails, and |force| is true, we will
// discard the whole cache and create a new one.
void CacheCreator::OnIOComplete(int result) {
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
- tracked_objects::ScopedTracker tracking_profile(
- FROM_HERE_WITH_EXPLICIT_FUNCTION("422516 CacheCreator::OnIOComplete"));
-
if (result == net::OK || !force_ || retry_)
return DoCallback(result);