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

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

Issue 9817002: Add OS::GetCurrentProcessId and prepend output from trace-gc with the current pid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: updates Created 8 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/platform-posix.cc ('k') | src/v8utils.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 int64_t offset = Time(time).DaylightSavingsOffset(); 620 int64_t offset = Time(time).DaylightSavingsOffset();
621 return static_cast<double>(offset); 621 return static_cast<double>(offset);
622 } 622 }
623 623
624 624
625 int OS::GetLastError() { 625 int OS::GetLastError() {
626 return ::GetLastError(); 626 return ::GetLastError();
627 } 627 }
628 628
629 629
630 int OS::GetCurrentProcessId() {
631 return static_cast<int>(::GetCurrentProcessId());
632 }
633
634
630 // ---------------------------------------------------------------------------- 635 // ----------------------------------------------------------------------------
631 // Win32 console output. 636 // Win32 console output.
632 // 637 //
633 // If a Win32 application is linked as a console application it has a normal 638 // If a Win32 application is linked as a console application it has a normal
634 // standard output and standard error. In this case normal printf works fine 639 // standard output and standard error. In this case normal printf works fine
635 // for output. However, if the application is linked as a GUI application, 640 // for output. However, if the application is linked as a GUI application,
636 // the process doesn't have a console, and therefore (debugging) output is lost. 641 // the process doesn't have a console, and therefore (debugging) output is lost.
637 // This is the case if we are embedded in a windows program (like a browser). 642 // This is the case if we are embedded in a windows program (like a browser).
638 // In order to be able to get debug output in this case the the debugging 643 // In order to be able to get debug output in this case the the debugging
639 // facility using OutputDebugString. This output goes to the active debugger 644 // facility using OutputDebugString. This output goes to the active debugger
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 2122
2118 2123
2119 void Sampler::Stop() { 2124 void Sampler::Stop() {
2120 ASSERT(IsActive()); 2125 ASSERT(IsActive());
2121 SamplerThread::RemoveActiveSampler(this); 2126 SamplerThread::RemoveActiveSampler(this);
2122 SetActive(false); 2127 SetActive(false);
2123 } 2128 }
2124 2129
2125 2130
2126 } } // namespace v8::internal 2131 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-posix.cc ('k') | src/v8utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698