summaryrefslogtreecommitdiffstats
path: root/content/browser/loader/resource_dispatcher_host_impl.cc
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 /content/browser/loader/resource_dispatcher_host_impl.cc
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 'content/browser/loader/resource_dispatcher_host_impl.cc')
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index fa9c044..f8264c2 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -21,6 +21,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 "base/stl_util.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "content/browser/appcache/appcache_interceptor.h"
@@ -2151,6 +2152,11 @@ void LoadInfoUpdateCallback(const LoadInfoMap& info_map) {
} // namespace
void ResourceDispatcherHostImpl::UpdateLoadStates() {
+ // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is
+ // fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "455952 ResourceDispatcherHostImpl::UpdateLoadStates"));
// Populate this map with load state changes, and then send them on to the UI
// thread where they can be passed along to the respective RVHs.
LoadInfoMap info_map;