Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: content/browser/tcmalloc_internals_request_job.cc

Issue 653863003: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/tcmalloc_internals_request_job.h" 5 #include "content/browser/tcmalloc_internals_request_job.h"
6 6
7 #include "base/allocator/allocator_extension.h" 7 #include "base/allocator/allocator_extension.h"
8 #include "base/profiler/scoped_profile.h"
8 #include "content/common/child_process_messages.h" 9 #include "content/common/child_process_messages.h"
9 #include "content/public/browser/browser_child_process_host_iterator.h" 10 #include "content/public/browser/browser_child_process_host_iterator.h"
10 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
11 #include "content/public/browser/render_process_host.h" 12 #include "content/public/browser/render_process_host.h"
12 #include "content/public/common/process_type.h" 13 #include "content/public/common/process_type.h"
13 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 // static 18 // static
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( 102 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
102 &RequestTcmallocStatsFromChildRenderProcesses)); 103 &RequestTcmallocStatsFromChildRenderProcesses));
103 } 104 }
104 #endif 105 #endif
105 106
106 int TcmallocInternalsRequestJob::GetData( 107 int TcmallocInternalsRequestJob::GetData(
107 std::string* mime_type, 108 std::string* mime_type,
108 std::string* charset, 109 std::string* charset,
109 std::string* data, 110 std::string* data,
110 const net::CompletionCallback& callback) const { 111 const net::CompletionCallback& callback) const {
112 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed.
113 tracked_objects::ScopedProfile tracking_profile(
114 FROM_HERE_WITH_EXPLICIT_FUNCTION(
115 "422489 TcmallocInternalsRequestJob::GetData"));
116
111 mime_type->assign("text/html"); 117 mime_type->assign("text/html");
112 charset->assign("UTF8"); 118 charset->assign("UTF8");
113 119
114 data->clear(); 120 data->clear();
115 #if defined(USE_TCMALLOC) 121 #if defined(USE_TCMALLOC)
116 AboutTcmalloc(data); 122 AboutTcmalloc(data);
117 #endif 123 #endif
118 return net::OK; 124 return net::OK;
119 } 125 }
120 126
121 } // namespace content 127 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/histogram_internals_request_job.cc ('k') | extensions/browser/extension_protocols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698