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

Side by Side Diff: src/base/platform/platform-win32.cc

Issue 360783006: Reland "Linux perf tool support update + refactoring." (r22118) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove perf support in Android Created 6 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
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/flag-definitions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // Platform-specific code for Win32. 5 // Platform-specific code for Win32.
6 6
7 // Secure API functions are not available using MinGW with msvcrt.dll 7 // Secure API functions are not available using MinGW with msvcrt.dll
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to
9 // disable definition of secure API functions in standard headers that 9 // disable definition of secure API functions in standard headers that
10 // would conflict with our own implementation. 10 // would conflict with our own implementation.
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 int OS::GetLastError() { 510 int OS::GetLastError() {
511 return ::GetLastError(); 511 return ::GetLastError();
512 } 512 }
513 513
514 514
515 int OS::GetCurrentProcessId() { 515 int OS::GetCurrentProcessId() {
516 return static_cast<int>(::GetCurrentProcessId()); 516 return static_cast<int>(::GetCurrentProcessId());
517 } 517 }
518 518
519 519
520 int OS::GetCurrentThreadId() {
521 return static_cast<int>(::GetCurrentThreadId());
522 }
523
524
520 // ---------------------------------------------------------------------------- 525 // ----------------------------------------------------------------------------
521 // Win32 console output. 526 // Win32 console output.
522 // 527 //
523 // If a Win32 application is linked as a console application it has a normal 528 // If a Win32 application is linked as a console application it has a normal
524 // standard output and standard error. In this case normal printf works fine 529 // standard output and standard error. In this case normal printf works fine
525 // for output. However, if the application is linked as a GUI application, 530 // for output. However, if the application is linked as a GUI application,
526 // the process doesn't have a console, and therefore (debugging) output is lost. 531 // the process doesn't have a console, and therefore (debugging) output is lost.
527 // This is the case if we are embedded in a windows program (like a browser). 532 // This is the case if we are embedded in a windows program (like a browser).
528 // In order to be able to get debug output in this case the the debugging 533 // In order to be able to get debug output in this case the the debugging
529 // facility using OutputDebugString. This output goes to the active debugger 534 // facility using OutputDebugString. This output goes to the active debugger
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 ASSERT(result); 1420 ASSERT(result);
1416 } 1421 }
1417 1422
1418 1423
1419 1424
1420 void Thread::YieldCPU() { 1425 void Thread::YieldCPU() {
1421 Sleep(0); 1426 Sleep(0);
1422 } 1427 }
1423 1428
1424 } } // namespace v8::base 1429 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698