diff options
author | vadimt <vadimt@chromium.org> | 2014-10-10 19:17:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-11 02:17:35 +0000 |
commit | 7faaa25711b1ded3674bda660b84fb47f22632e8 (patch) | |
tree | 23ab9905b676c6b46e6f46b7a9107c6d6d1aeb14 /components/translate | |
parent | 2b628ae2ef33a0ffaa89e7522125b807186b3c69 (diff) | |
download | chromium_src-7faaa25711b1ded3674bda660b84fb47f22632e8.zip chromium_src-7faaa25711b1ded3674bda660b84fb47f22632e8.tar.gz chromium_src-7faaa25711b1ded3674bda660b84fb47f22632e8.tar.bz2 |
Adding instrumentation to locate the source of jankiness.
Mechanical change that adds instrumentation required to locate the source of jankiness (i.e. a long-running fragment of code executed as a part of the task that causes jank) in the code. See the bug for details on what kind of jank we are after.
A number of similar CLs were landed, and none of them caused issues. The code of the instrumentation is highly optimized and is not expected to affect performance. The code simply creates a diagnostic task which is identical to ones created by PostTask or IPC message handlers.
Landing as TBR since this is a mechanical, safe and temporary change.
This CL instruments a part of overloads of URLFetcherDelegate::OnURLFetchComplete. More overloads will be instrumented if the source of the jank is not in one of instrumented methods.
BUG=422577
TBR=mek@chromium.org, toyoshim@chromium.org, dconnelly@chromium.org, pkasting@chromium.org, mmenke@chromium.org, zea@chromium.org, dcheng@chromium.org, noelutz@google.com, thestig@chromium.org, zelidrag@chromium.org
Review URL: https://codereview.chromium.org/648873003
Cr-Commit-Position: refs/heads/master@{#299230}
Diffstat (limited to 'components/translate')
-rw-r--r-- | components/translate/core/browser/translate_url_fetcher.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/translate/core/browser/translate_url_fetcher.cc b/components/translate/core/browser/translate_url_fetcher.cc index 09704fd..3505ddb 100644 --- a/components/translate/core/browser/translate_url_fetcher.cc +++ b/components/translate/core/browser/translate_url_fetcher.cc @@ -4,6 +4,7 @@ #include "components/translate/core/browser/translate_url_fetcher.h" +#include "base/profiler/scoped_profile.h" #include "components/translate/core/browser/translate_download_manager.h" #include "net/base/load_flags.h" #include "net/http/http_status_code.h" @@ -67,6 +68,11 @@ bool TranslateURLFetcher::Request( } void TranslateURLFetcher::OnURLFetchComplete(const net::URLFetcher* source) { + // TODO(vadimt): Remove ScopedProfile below once crbug.com/422577 is fixed. + tracked_objects::ScopedProfile tracking_profile( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "422577 TranslateURLFetcher::OnURLFetchComplete")); + DCHECK(fetcher_.get() == source); std::string data; |