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

Side by Side Diff: src/v8utils.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/v8utils.h ('k') | test/cctest/test-platform-linux.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 47
48 void PrintF(FILE* out, const char* format, ...) { 48 void PrintF(FILE* out, const char* format, ...) {
49 va_list arguments; 49 va_list arguments;
50 va_start(arguments, format); 50 va_start(arguments, format);
51 OS::VFPrint(out, format, arguments); 51 OS::VFPrint(out, format, arguments);
52 va_end(arguments); 52 va_end(arguments);
53 } 53 }
54 54
55 55
56 void PrintPID(const char* format, ...) {
57 OS::Print("[%d] ", OS::GetCurrentProcessId());
58 va_list arguments;
59 va_start(arguments, format);
60 OS::VPrint(format, arguments);
61 va_end(arguments);
62 }
63
64
56 void Flush(FILE* out) { 65 void Flush(FILE* out) {
57 fflush(out); 66 fflush(out);
58 } 67 }
59 68
60 69
61 char* ReadLine(const char* prompt) { 70 char* ReadLine(const char* prompt) {
62 char* result = NULL; 71 char* result = NULL;
63 char line_buf[256]; 72 char line_buf[256];
64 int offset = 0; 73 int offset = 0;
65 bool keep_going = true; 74 bool keep_going = true;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 start_of_line = p; 360 start_of_line = p;
352 line_no++; 361 line_no++;
353 } 362 }
354 } 363 }
355 364
356 return is_ascii; 365 return is_ascii;
357 } 366 }
358 367
359 368
360 } } // namespace v8::internal 369 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/v8utils.h ('k') | test/cctest/test-platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698