summaryrefslogtreecommitdiffstats
path: root/google_apis
diff options
context:
space:
mode:
authorpkasting <pkasting@chromium.org>2015-02-05 19:49:16 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-06 03:50:07 +0000
commit3b6d4f8fc68682ba786a1a0c8fcb6b7005d7e8cf (patch)
treedf5816b8bb5fed687cbdc8371932efc94b2989a3 /google_apis
parentdbec99efb805e22b77b5c2d18a2f21e405fbc5cf (diff)
downloadchromium_src-3b6d4f8fc68682ba786a1a0c8fcb6b7005d7e8cf.zip
chromium_src-3b6d4f8fc68682ba786a1a0c8fcb6b7005d7e8cf.tar.gz
chromium_src-3b6d4f8fc68682ba786a1a0c8fcb6b7005d7e8cf.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. BUG=455884,455942,455952 TEST=none TBR=mmenke,michaeln,zea Review URL: https://codereview.chromium.org/900793009 Cr-Commit-Position: refs/heads/master@{#314970}
Diffstat (limited to 'google_apis')
-rw-r--r--google_apis/gcm/engine/connection_factory_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc
index 218f833..a8ec37f 100644
--- a/google_apis/gcm/engine/connection_factory_impl.cc
+++ b/google_apis/gcm/engine/connection_factory_impl.cc
@@ -7,6 +7,7 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/metrics/sparse_histogram.h"
+#include "base/profiler/scoped_tracker.h"
#include "google_apis/gcm/engine/connection_handler_impl.h"
#include "google_apis/gcm/monitoring/gcm_stats_recorder.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
@@ -342,6 +343,10 @@ base::TimeTicks ConnectionFactoryImpl::NowTicks() {
}
void ConnectionFactoryImpl::OnConnectDone(int result) {
+ // TODO(pkasting): Remove ScopedTracker below once crbug.com/455884 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "455884 ConnectionFactoryImpl::OnConnectDone"));
if (result != net::OK) {
// If the connection fails, try another proxy.
result = ReconsiderProxyAfterError(result);