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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 2951413003: Add UMA for High Resolution Timer Usage (Closed)
Patch Set: Removed NaCl changes Created 3 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
« no previous file with comments | « base/timer/hi_res_timer_manager_win.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/metrics/histogram_macros.h" 13 #include "base/metrics/histogram_macros.h"
14 #include "base/metrics/statistics_recorder.h" 14 #include "base/metrics/statistics_recorder.h"
15 #include "base/rand_util.h" 15 #include "base/rand_util.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 19 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
20 #include "base/threading/platform_thread.h" 20 #include "base/threading/platform_thread.h"
21 #include "base/timer/hi_res_timer_manager.h"
21 #include "base/trace_event/trace_event.h" 22 #include "base/trace_event/trace_event.h"
22 #include "build/build_config.h" 23 #include "build/build_config.h"
23 #include "content/child/child_process.h" 24 #include "content/child/child_process.h"
24 #include "content/common/content_constants_internal.h" 25 #include "content/common/content_constants_internal.h"
25 #include "content/gpu/gpu_child_thread.h" 26 #include "content/gpu/gpu_child_thread.h"
26 #include "content/gpu/gpu_process.h" 27 #include "content/gpu/gpu_process.h"
27 #include "content/public/common/content_client.h" 28 #include "content/public/common/content_client.h"
28 #include "content/public/common/content_switches.h" 29 #include "content/public/common/content_switches.h"
29 #include "content/public/common/main_function_params.h" 30 #include "content/public/common/main_function_params.h"
30 #include "content/public/common/result_codes.h" 31 #include "content/public/common/result_codes.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 child_thread->Init(start_time); 286 child_thread->Init(start_time);
286 287
287 gpu_process.set_main_thread(child_thread); 288 gpu_process.set_main_thread(child_thread);
288 289
289 #if defined(OS_ANDROID) 290 #if defined(OS_ANDROID)
290 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 291 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
291 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics", 292 tracing::GraphicsMemoryDumpProvider::GetInstance(), "AndroidGraphics",
292 nullptr); 293 nullptr);
293 #endif 294 #endif
294 295
296 base::HighResolutionTimerManager hi_res_timer_manager;
297
295 { 298 {
296 TRACE_EVENT0("gpu", "Run Message Loop"); 299 TRACE_EVENT0("gpu", "Run Message Loop");
297 base::RunLoop().Run(); 300 base::RunLoop().Run();
298 } 301 }
299 302
300 return dead_on_arrival ? RESULT_CODE_GPU_DEAD_ON_ARRIVAL : 0; 303 return dead_on_arrival ? RESULT_CODE_GPU_DEAD_ON_ARRIVAL : 0;
301 } 304 }
302 305
303 namespace { 306 namespace {
304 307
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return true; 343 return true;
341 } 344 }
342 345
343 return false; 346 return false;
344 } 347 }
345 #endif // defined(OS_WIN) 348 #endif // defined(OS_WIN)
346 349
347 } // namespace. 350 } // namespace.
348 351
349 } // namespace content 352 } // namespace content
OLDNEW
« no previous file with comments | « base/timer/hi_res_timer_manager_win.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698