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

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

Issue 1544273002: Switch to standard integer types in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « content/gpu/gpu_watchdog_thread.h ('k') | content/gpu/in_process_gpu_thread.h » ('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 "content/gpu/gpu_watchdog_thread.h" 5 #include "content/gpu/gpu_watchdog_thread.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8 #include <stdint.h>
9 #if defined(OS_WIN)
10 #include <windows.h>
11 #endif
12 9
13 #include "base/bind.h" 10 #include "base/bind.h"
14 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
15 #include "base/command_line.h" 12 #include "base/command_line.h"
16 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
17 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
18 #include "base/location.h" 15 #include "base/location.h"
16 #include "base/macros.h"
19 #include "base/power_monitor/power_monitor.h" 17 #include "base/power_monitor/power_monitor.h"
20 #include "base/process/process.h" 18 #include "base/process/process.h"
21 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
22 #include "build/build_config.h" 20 #include "build/build_config.h"
23 #include "content/public/common/content_switches.h" 21 #include "content/public/common/content_switches.h"
24 #include "content/public/common/result_codes.h" 22 #include "content/public/common/result_codes.h"
25 23
24 #if defined(OS_WIN)
25 #include <windows.h>
26 #endif
27
26 namespace content { 28 namespace content {
27 namespace { 29 namespace {
28 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
29 const base::FilePath::CharType 31 const base::FilePath::CharType
30 kTtyFilePath[] = FILE_PATH_LITERAL("/sys/class/tty/tty0/active"); 32 kTtyFilePath[] = FILE_PATH_LITERAL("/sys/class/tty/tty0/active");
31 #endif 33 #endif
32 #if defined(USE_X11) 34 #if defined(USE_X11)
33 const unsigned char text[20] = "check"; 35 const unsigned char text[20] = "check";
34 #endif 36 #endif
35 } // namespace 37 } // namespace
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 kernel_time64.HighPart = kernel_time.dwHighDateTime; 391 kernel_time64.HighPart = kernel_time.dwHighDateTime;
390 kernel_time64.LowPart = kernel_time.dwLowDateTime; 392 kernel_time64.LowPart = kernel_time.dwLowDateTime;
391 393
392 // Time is reported in units of 100 nanoseconds. Kernel and user time are 394 // Time is reported in units of 100 nanoseconds. Kernel and user time are
393 // summed to deal with to kinds of hangs. One is where the GPU process is 395 // summed to deal with to kinds of hangs. One is where the GPU process is
394 // stuck in user level, never calling into the kernel and kernel time is 396 // stuck in user level, never calling into the kernel and kernel time is
395 // not increasing. The other is where either the kernel hangs and never 397 // not increasing. The other is where either the kernel hangs and never
396 // returns to user level or where user level code 398 // returns to user level or where user level code
397 // calls into kernel level repeatedly, giving up its quanta before it is 399 // calls into kernel level repeatedly, giving up its quanta before it is
398 // tracked, for example a loop that repeatedly Sleeps. 400 // tracked, for example a loop that repeatedly Sleeps.
399 return base::TimeDelta::FromMilliseconds(static_cast<int64>( 401 return base::TimeDelta::FromMilliseconds(static_cast<int64_t>(
400 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000)); 402 (user_time64.QuadPart + kernel_time64.QuadPart) / 10000));
401 } 403 }
402 #endif 404 #endif
403 405
404 } // namespace content 406 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_watchdog_thread.h ('k') | content/gpu/in_process_gpu_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698