Skip to content

Commit

Permalink
Removing instrumentations for task URLFetcherCore::OnCompletedURLRequest
Browse files Browse the repository at this point in the history
The jank almost disappeared, either because it was fixed, or its numbers were absorbed by other instrumentations.
At the current moment in Win, instrumentation for OAuth2AccessTokenFetcherImpl::OnURLFetchComplete shown 1.65 118ms jph, and remaining own jankiness of URLFetcherCore::OnCompletedURLRequest is 2.87.

BUG=422577
TBR=toyoshim@chromium.org, dconnelly@chromium.org, pkasting@chromium.org, zea@chromium.org, yoz@chromium.org, mmenke@chromium.org, dcheng@chromium.org, mattm@chromium.org, jhawkins@chromium.org, rogerta@chromium.org

Review URL: https://codereview.chromium.org/701463004

Cr-Commit-Position: refs/heads/master@{#302620}
  • Loading branch information
vadimt authored and Commit bot committed Nov 4, 2014
1 parent 16d4cbb commit c17c4cf
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 114 deletions.
6 changes: 0 additions & 6 deletions chrome/browser/intranet_redirect_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "base/command_line.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/profiler/scoped_tracker.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h"
Expand Down Expand Up @@ -95,11 +94,6 @@ void IntranetRedirectDetector::FinishSleep() {

void IntranetRedirectDetector::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 IntranetRedirectDetector::OnURLFetchComplete"));

// Delete the fetcher on this function's exit.
Fetchers::iterator fetcher = fetchers_.find(
const_cast<net::URLFetcher*>(source));
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/safe_browsing/client_side_detection_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/prefs/pref_service.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
Expand Down Expand Up @@ -199,11 +198,6 @@ bool ClientSideDetectionService::IsPrivateIPAddress(

void ClientSideDetectionService::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 ClientSideDetectionService::OnURLFetchComplete"));

std::string data;
source->GetResponseAsString(&data);
if (source == model_fetcher_.get()) {
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/safe_browsing/protocol_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/rand_util.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
Expand Down Expand Up @@ -227,11 +226,6 @@ void SafeBrowsingProtocolManager::GetNextUpdate() {
// required, the SafeBrowsing servers will tell us to get it again.
void SafeBrowsingProtocolManager::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 SafeBrowsingProtocolManager::OnURLFetchComplete"));

DCHECK(CalledOnValidThread());
scoped_ptr<const net::URLFetcher> fetcher;

Expand Down
6 changes: 0 additions & 6 deletions components/captive_portal/captive_portal_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "components/captive_portal/captive_portal_detector.h"

#include "base/logging.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
Expand Down Expand Up @@ -58,11 +57,6 @@ void CaptivePortalDetector::Cancel() {
}

void CaptivePortalDetector::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 CaptivePortalDetector::OnURLFetchComplete"));

DCHECK(CalledOnValidThread());
DCHECK(FetchingURL());
DCHECK_EQ(url_fetcher_.get(), source);
Expand Down
6 changes: 0 additions & 6 deletions components/google/core/browser/google_url_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "components/google/core/browser/google_pref_names.h"
#include "components/google/core/browser/google_switches.h"
Expand Down Expand Up @@ -107,11 +106,6 @@ void GoogleURLTracker::CancelGoogleURL() {
}

void GoogleURLTracker::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 GoogleURLTracker::OnURLFetchComplete"));

// Delete the fetcher on this function's exit.
scoped_ptr<net::URLFetcher> clean_up_fetcher(fetcher_.release());

Expand Down
6 changes: 0 additions & 6 deletions components/invalidation/gcm_network_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "base/base64.h"
#include "base/i18n/time_formatting.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
Expand Down Expand Up @@ -224,11 +223,6 @@ void GCMNetworkChannel::OnGetTokenComplete(
}

void GCMNetworkChannel::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 GCMNetworkChannel::OnURLFetchComplete"));

DCHECK(CalledOnValidThread());
DCHECK_EQ(fetcher_, source);
// Free fetcher at the end of function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "base/compiler_specific.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/profiler/scoped_tracker.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
Expand Down Expand Up @@ -481,11 +480,6 @@ std::string DeviceManagementService::GetServerUrl() {

void DeviceManagementService::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 DeviceManagementService::OnURLFetchComplete"));

JobFetcherMap::iterator entry(pending_jobs_.find(source));
if (entry == pending_jobs_.end()) {
NOTREACHED() << "Callback from foreign URL fetcher";
Expand Down
26 changes: 0 additions & 26 deletions components/translate/core/browser/translate_language_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "base/json/json_reader.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
Expand Down Expand Up @@ -229,11 +228,6 @@ void TranslateLanguageList::OnLanguageListFetchComplete(
int id,
bool success,
const std::string& data) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateLanguageList::OnLanguageListFetchComplete"));

if (!success) {
// Since it fails just now, omit to schedule resource requests if
// ResourceRequestAllowedNotifier think it's ready. Otherwise, a callback
Expand All @@ -256,22 +250,12 @@ void TranslateLanguageList::OnLanguageListFetchComplete(
}

void TranslateLanguageList::NotifyEvent(int line, const std::string& message) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateLanguageList::NotifyEvent"));

TranslateEventDetails details(__FILE__, line, message);
callback_list_.Notify(details);
}

void TranslateLanguageList::SetSupportedLanguages(
const std::string& language_list) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile1(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateLanguageList::SetSupportedLanguages 1"));

// The format is:
// sl({
// "sl": {"XX": "LanguageName", ...},
Expand All @@ -295,19 +279,9 @@ void TranslateLanguageList::SetSupportedLanguages(
kLanguageListCallbackNameLength,
language_list.size() - kLanguageListCallbackNameLength - 1);

// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile2(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateLanguageList::SetSupportedLanguages 2"));

scoped_ptr<base::Value> json_value(
base::JSONReader::Read(languages_json, base::JSON_ALLOW_TRAILING_COMMAS));

// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile3(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateLanguageList::SetSupportedLanguages 3"));

if (json_value == NULL || !json_value->IsType(base::Value::TYPE_DICTIONARY)) {
NOTREACHED();
return;
Expand Down
5 changes: 0 additions & 5 deletions components/translate/core/browser/translate_script.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ void TranslateScript::Request(const RequestCallback& callback) {

void TranslateScript::OnScriptFetchComplete(
int id, bool success, const std::string& data) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateScript::OnScriptFetchComplete"));

DCHECK_EQ(kFetcherId, id);

scoped_ptr<const TranslateURLFetcher> delete_ptr(fetcher_.release());
Expand Down
6 changes: 0 additions & 6 deletions components/translate/core/browser/translate_url_fetcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "components/translate/core/browser/translate_url_fetcher.h"

#include "base/profiler/scoped_tracker.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
Expand Down Expand Up @@ -68,11 +67,6 @@ bool TranslateURLFetcher::Request(
}

void TranslateURLFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 TranslateURLFetcher::OnURLFetchComplete"));

DCHECK(fetcher_.get() == source);

std::string data;
Expand Down
6 changes: 0 additions & 6 deletions extensions/browser/updater/extension_downloader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
Expand Down Expand Up @@ -492,11 +491,6 @@ void ExtensionDownloader::CreateManifestFetcher() {
}

void ExtensionDownloader::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 ExtensionDownloader::OnURLFetchComplete"));

VLOG(2) << source->GetResponseCode() << " " << source->GetURL();

if (source == manifest_fetcher_.get()) {
Expand Down
5 changes: 0 additions & 5 deletions google_apis/gaia/gaia_auth_fetcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,6 @@ void GaiaAuthFetcher::OnGetCheckConnectionInfoFetched(
}

void GaiaAuthFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 GaiaAuthFetcher::OnURLFetchComplete"));

fetch_pending_ = false;
// Some of the GAIA requests perform redirects, which results in the final
// URL of the fetcher not being the original URL requested. Therefore use
Expand Down
6 changes: 0 additions & 6 deletions google_apis/gaia/gaia_oauth_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "google_apis/gaia/gaia_urls.h"
Expand Down Expand Up @@ -227,11 +226,6 @@ void GaiaOAuthClient::Core::MakeGaiaRequest(
// URLFetcher::Delegate implementation.
void GaiaOAuthClient::Core::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 GaiaOAuthClient::Core::OnURLFetchComplete"));

bool should_retry = false;
HandleResponse(source, &should_retry);
if (should_retry) {
Expand Down
6 changes: 0 additions & 6 deletions google_apis/gaia/oauth2_access_token_fetcher_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "base/json/json_reader.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
Expand Down Expand Up @@ -259,11 +258,6 @@ void OAuth2AccessTokenFetcherImpl::OnGetTokenFailure(

void OAuth2AccessTokenFetcherImpl::OnURLFetchComplete(
const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 OAuth2AccessTokenFetcherImpl::OnURLFetchComplete"));

CHECK(source);
CHECK(state_ == GET_ACCESS_TOKEN_STARTED);
EndGetAccessToken(source);
Expand Down
6 changes: 0 additions & 6 deletions google_apis/gaia/oauth2_api_call_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <vector>

#include "base/basictypes.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/stringprintf.h"
#include "google_apis/gaia/gaia_urls.h"
#include "net/base/escape.h"
Expand Down Expand Up @@ -67,11 +66,6 @@ std::string OAuth2ApiCallFlow::CreateApiCallBodyContentType() {
}

void OAuth2ApiCallFlow::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 OAuth2ApiCallFlow::OnURLFetchComplete"));

CHECK(source);
CHECK_EQ(API_CALL_STARTED, state_);
EndApiCall(source);
Expand Down
6 changes: 0 additions & 6 deletions sync/internal_api/http_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "sync/internal_api/public/http_bridge.h"

#include "base/message_loop/message_loop.h"
#include "base/profiler/scoped_tracker.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
Expand Down Expand Up @@ -345,11 +344,6 @@ void HttpBridge::DestroyURLFetcherOnIOThread(net::URLFetcher* fetcher) {
}

void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422577 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422577 HttpBridge::OnURLFetchComplete"));

DCHECK(network_task_runner_->BelongsToCurrentThread());
base::AutoLock lock(fetch_state_lock_);
if (fetch_state_.aborted)
Expand Down

0 comments on commit c17c4cf

Please sign in to comment.