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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 5 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 | Annotate | Revision Log
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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 383
384 GetContentClient()->renderer()->RenderThreadStarted(); 384 GetContentClient()->renderer()->RenderThreadStarted();
385 385
386 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 386 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
387 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) 387 if (command_line.HasSwitch(switches::kEnableGpuBenchmarking))
388 RegisterExtension(GpuBenchmarkingExtension::Get()); 388 RegisterExtension(GpuBenchmarkingExtension::Get());
389 389
390 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) 390 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
391 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking)) 391 if (command_line.HasSwitch(switches::kEnableMemoryBenchmarking))
392 RegisterExtension(MemoryBenchmarkingExtension::Get()); 392 RegisterExtension(MemoryBenchmarkingExtension::Get());
393 trace_memory_controller_.reset(new base::debug::TraceMemoryController(
394 GetMessageLoop()->message_loop_proxy()));
393 #endif // USE_TCMALLOC 395 #endif // USE_TCMALLOC
394 396
395 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) { 397 if (command_line.HasSwitch(switches::kEnableSkiaBenchmarking)) {
396 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension."; 398 LOG(WARNING) << "Enabling unsafe Skia benchmarking extension.";
397 RegisterExtension(SkiaBenchmarkingExtension::Get()); 399 RegisterExtension(SkiaBenchmarkingExtension::Get());
398 } 400 }
399 401
400 context_lost_cb_.reset(new GpuVDAContextLostCallback()); 402 context_lost_cb_.reset(new GpuVDAContextLostCallback());
401 403
402 // Note that under Linux, the media library will normally already have 404 // Note that under Linux, the media library will normally already have
(...skipping 16 matching lines...) Expand all
419 // Wait for all databases to be closed. 421 // Wait for all databases to be closed.
420 if (web_database_observer_impl_) 422 if (web_database_observer_impl_)
421 web_database_observer_impl_->WaitForAllDatabasesToClose(); 423 web_database_observer_impl_->WaitForAllDatabasesToClose();
422 424
423 // Shutdown in reverse of the initialization order. 425 // Shutdown in reverse of the initialization order.
424 if (devtools_agent_message_filter_.get()) { 426 if (devtools_agent_message_filter_.get()) {
425 RemoveFilter(devtools_agent_message_filter_.get()); 427 RemoveFilter(devtools_agent_message_filter_.get());
426 devtools_agent_message_filter_ = NULL; 428 devtools_agent_message_filter_ = NULL;
427 } 429 }
428 430
431 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
432 trace_memory_controller_.reset();
433 #endif
434
429 RemoveFilter(audio_input_message_filter_.get()); 435 RemoveFilter(audio_input_message_filter_.get());
430 audio_input_message_filter_ = NULL; 436 audio_input_message_filter_ = NULL;
431 437
432 RemoveFilter(audio_message_filter_.get()); 438 RemoveFilter(audio_message_filter_.get());
433 audio_message_filter_ = NULL; 439 audio_message_filter_ = NULL;
434 440
435 RemoveFilter(vc_manager_->video_capture_message_filter()); 441 RemoveFilter(vc_manager_->video_capture_message_filter());
436 442
437 RemoveFilter(db_message_filter_.get()); 443 RemoveFilter(db_message_filter_.get());
438 db_message_filter_ = NULL; 444 db_message_filter_ = NULL;
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1252
1247 void RenderThreadImpl::SetFlingCurveParameters( 1253 void RenderThreadImpl::SetFlingCurveParameters(
1248 const std::vector<float>& new_touchpad, 1254 const std::vector<float>& new_touchpad,
1249 const std::vector<float>& new_touchscreen) { 1255 const std::vector<float>& new_touchscreen) {
1250 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, 1256 webkit_platform_support_->SetFlingCurveParameters(new_touchpad,
1251 new_touchscreen); 1257 new_touchscreen);
1252 1258
1253 } 1259 }
1254 1260
1255 } // namespace content 1261 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698