diff options
author | vadimt <vadimt@chromium.org> | 2014-10-27 17:13:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-28 00:14:05 +0000 |
commit | 535be343134bb9d67ae4f05d1b11eb3de07c8317 (patch) | |
tree | ab916eac36dd5f8355f623db1d0d16aee3dff46a /net/http/http_network_transaction.cc | |
parent | b17047cc2007ca299baf2e3b2de12c2afdad6e5b (diff) | |
download | chromium_src-535be343134bb9d67ae4f05d1b11eb3de07c8317.zip chromium_src-535be343134bb9d67ae4f05d1b11eb3de07c8317.tar.gz chromium_src-535be343134bb9d67ae4f05d1b11eb3de07c8317.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. They've helped to find and fix janky code. 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 code invoked from HttpStreamParser::OnIOComplete's callback, which is responsible for 16.2 jph
BUG=424359
TBR=mmenke@chromium.org
Review URL: https://codereview.chromium.org/675273004
Cr-Commit-Position: refs/heads/master@{#301504}
Diffstat (limited to 'net/http/http_network_transaction.cc')
-rw-r--r-- | net/http/http_network_transaction.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 532f9de..a7e248b 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -15,6 +15,7 @@ #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" #include "base/metrics/stats_counters.h" +#include "base/profiler/scoped_profile.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -597,7 +598,18 @@ void HttpNetworkTransaction::DoCallback(int rv) { } void HttpNetworkTransaction::OnIOComplete(int result) { + // TODO(vadimt): Remove ScopedProfile below once crbug.com/424359 is fixed. + tracked_objects::ScopedProfile tracking_profile1( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "424359 HttpNetworkTransaction::OnIOComplete 1")); + int rv = DoLoop(result); + + // TODO(vadimt): Remove ScopedProfile below once crbug.com/424359 is fixed. + tracked_objects::ScopedProfile tracking_profile2( + FROM_HERE_WITH_EXPLICIT_FUNCTION( + "424359 HttpNetworkTransaction::OnIOComplete 2")); + if (rv != ERR_IO_PENDING) DoCallback(rv); } |